Hello, i am trying to crosscompile the SDL-LIB for the mini2440: i have used the following commands: export ARCH=arm export CROSS_COMPILE=arm-linux- export PATH=...... export HOST=arm-linux in the SDL dir i have typed: ./confiure --host=arm-linux everything runs trough ... but: make says: ERROR SDL_dmaaudio.c in function 'DMA_WaitAudio' error: impossible constrsint in 'asm' -------------------------------------------------------------- Can anyone help me crosscompiling the SDL lib for my mini2440 (3,5" NEC display) Yours Andreas
Need help crosscompiling SDL-LIB
You have to disable the audio subsystem. .... configure .... --disable-audio. The reason is, sdl's audio subsystem is written with some cpu-specific assembler code which can't be used for ARM. AFAIK there's a "real" ARM port of SDL, but i can't remember nor find it...
Thx, I got it... was quite simple .. i had to disabled X11 support, esd audio, jack audio .. and a few other things. I have used ALSA Audio wich is working. I have also managed to get my touch screen working within sdl. I am happy for now. Now i can start programming SDL programs. b.t.w. all the SDL testprograms compiled fine but i had to remove the GL relevant tests. Yours Andreas
./configure --host=arm-linux --prefix=/usr --sysconfdir=/etc --libdir=/lib --datadir=/usr/share --disable-video-x11 --disable-alsatest --disable-esdtest --disable-arts LDFLAGS="-L/rootfs/lib" CPPFLAGS="-I/rootfs/usr/include" --disable-esd You can also visit: http://cchia-cwp.blogspot.com/ b.t.w. if you have trouble with the ts lib .... export LD_LIBRARY_PATH=/lib:/usr/local/lib and make a node (mknode) /dev/input/ts i am using the default qtopia image... wich some modification on the rcS file thats all..... make shure you have already calibrated the touch... and you should set an SDL-mouse driver (its a environmant variable too) wich tells SDL witch mouse type you use.... thats all....
forget the node /dev...../ts here is the better solution: export TSLIB_TSDEVICE=/dev/input/event0 export SDL_MOUSEDEV=$TSLIB_TSDEVICE export SDL_MOUSEDRV=TSLIB
Andreas: I was able to build SDL for ARM9, I'm using a similar board but not 100% compatible with FriendlyArm. When I try to run the 'stars' demo program (witch I was able to compile and link) it returns "SDL can't find the mouse". I don't want to run my software over qtopia, so I am using the serial port terminal. I already checked tslib and ts_calibrate works fine. Do you know what can be wrong? Regards, Luiz
Did you check your TS_LIB enviroment variabeles and your LD_LIBRARY_PATH? I am not shure but you must compile SDL against the TS_LIB but maybe i am wrong.... In my case the correct environment variables did the job Yours Andreas
Andreas: I was able to compile SDL against ts_lib. Now I can run the soft, but the mouse pointer is behaving strangely: When I press the touchscreen, it 'flies' randomly around the screen. Any idea?
Hi, nice to hear that.... may you please also post me your SDL-LIB ./configure line? I asume you have not correctly calibrated your touchscreen.. or the enviroment varialbe for the cal file is wrong...... Yours Andreas
Andreas: I'm trying t use the SDL and tslib already found on the board /lib. I think I messed up with something when cross-compiled SD, since when I link to it I get a "illegal instruction" error. But it runs using the 'original' SDL. on ts.conf I have: module_raw input module pthres pmin=1 module variance delta=30 module dejitter delta=100 module linear The environment variables are set to: TSLIB_CONSOLEDEVICE=none TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/event0 TSLIB_CALIBFILE=/etc/pointercal TSLIB_CONFFILE=/etc/ts.conf TSLIB_PLUGINDIR=/lib/ts SDL_MOUSEDRV=TSLIB SDL_MOUSEDEV=/dev/event0 SDL_NOMOUSE=1 SDL_FBDEV=/dev/fb0 SDL_VIDEODRIVER=fbcon ts_calibrate works perfectly. On my test program, I run this on an infinite loop: int x,y; while(SDL_PollEvent(&event)) { switch (event.type) { case SDL_MOUSEMOTION: SDL_GetMouseState(&x, &y); printf("Mx: %i - My: %i\n", x, y); break; } } When I press the touchscreen, it prints a list of xy coordinates with apparently random pair of numbers - but inside the 320x240 range of the display resolution. Regards, Luiz
If you still have the issue with SDL and tslib i just had this problem and figured it out. 1. SDL must be built after tslib. If the build process was building things in parallel and SDL's configure stage happened before tslib was built - then SDL doesn't report correct touchscreen presses. 2. The tsib support for SDL depends on a configuration file /etc/fb.modes to read the framebuffer settings for the current LCD. You can generate this by running this command through the console. fbset > /etc/fb.modes 3. The environment variables for this are in profile.environment. Only these two need to be added to it (or before your application is called) export SDL_MOUSEDRV=TSLIB export SDL_MOUSEDEV=$TSLIB_TSDEVICE
Hi, I was able to cross compile the library. I have another question to ask. Is the library needed just on the host linux computer at the time of compilation or it has to be installed on the mini 2440 too? If it needs to be installed on mini2440 I guess I will have to copy couple of files on 2440. If I am correct what all files I will have to copy to mini 2440? Thanks in advance!