This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

building tslib on am3517

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.

 

 

 

  • First, note that my QWS_MOUSE_PROTO above is WRONG, don't use that.

    Next, I did have ts_test working, and I thought that I had ts_calibrate working too, but when I got back to it today, ts_calibrate couldn't open the input module.

    Looked like something wrong with the way the kernel was loading the touch screen input  kernel module or something.

    I spent hours flailing around studying linux kernel modules and I could not figure out what was wrong.

    Then I decided to look into rebuilding tslib once more.  Maybe I had screwed something up.

    Looking into it, it looked like I had been inconsistent in configuring the build, I had multiple copies of ts_test etc.

    2 were recent, from my builds.  1 was older, looked like it came with the SDK filesystem.

    Looking further, I found multiple library installations as well, and it looked like the TI SDK libraries were tslib-1.0 while what I was building was tslib-0.0.

    I cleaned out, as well as I could, all the stuff that I built, and went back to using the ts_calibrate and libs that came with the SDK.

    It worked.

    I would sure like to be able to build and run tslib, but this will do for now.

    I would advise anyone else who is considering rebuilding tslib to think carefully about it.  It would probably help if you really, really truly understand the configure and make process and options, which I did not.