Other Parts Discussed in Thread: AM3517
This is probably another one of those cases where I either just went way too deep, or else didn't read the instructions carefully enough.
I am implementing a touchscreen app in an embedded linux environment, starting out with a LogicPC am3517 EVM.
I wanted to get down into how the touchscreen works so that when I plug in my own touchscreen instead of the little one that comes with the board, and it doesn't work, I will have something to work from.
But what a nightmare.
When I found that one of the test apps (maybe ts_test) was complaining that it couldn't find tslib-0.0 when I was building tslib-1.0, I figured I needed to build from scratch.
I have gone a couple of rounds with toolchains, starting out with code sorcery before learning that the arm-arago-linux-gnueabi set in the V5 SDK is preferred. So stuff that I have tried to build before, I might have used the other toolchain, so the makefile is all screwed up relative to what I want done now.
So first I had to get my tslib build reconfigured. I used the SDK linux-devkit environment-setup but that didn't seem to set CXX for me. So to be sure I added CC and CXX to my configure arguments. I always have trouble figuring out what --prefix does, and since I am cross compiling, I think I often screw up by having it point to my Ubuntu build host. I think what it's really used for is "make install', to know where to put the libraries, executables, etc. for tslib, in my case that is on the NFS hosted filesystem.
Here is what I think I ended up with for configure:
./configure CC=arm-arago-linux-gnueabi-gcc CXX=arm-arago-linux-gnueabi-g++ --host=arm-linux-gnu --prefix=/home/user/ti-sdk-am3517-evm-05.02.00.00/targetNFS ac_cv_func_malloc_0_nonnull=yes
(that finally got me to an error free build, but your mileage may vary)
"make install" seemed to go OK and put things where they should be but nothing worked.
I went back to the somewhat sketchy TI building tslib page:
http://processors.wiki.ti.com/index.php/Tslib#Configuration.28required_for_execution.29.
I also found another here:
http://www.simiolabs.com/developer/wiki/index.php?title=Cross-compiling_and_installing_Tslib
I had missed some of the environment setup.
Here are the environment bits I found I needed at the target::
TSLIB_TSDEVICE=/dev/input/touchscreen0
LD_LIBRARY_PATH=/usr/local/lib/ts
TSLIB_FBDEVICE=/dev/fb0
TSLIB_CONFFILE=/etc/ts.conf
TSLIB_PLUGINS_DIR=/usr/local/lib/ts
QWS_MOUSE_PROTO=tslib:/dev/event0
I also found the test apps complaining about "No raw modules loaded"
It turned out that that was because everything was commented out in /etc/tsconf.
Uncommenting this line fixed that and now I have ts_test running.
Another way I wasted a large amount of time was wrestling with code composter to try to build the ts test apps there so I could debug in the ui.
I gave that up in favor of the much more comprehensible and easy-to-use ./configure;make;make install route.
I'll probably return to code composter now that it's working and see if it can build things now, and see if I can debug from there.
Good luck to all.