1

I am developing software to run on two different pos terminals and I have shared libraries running on arm-xscale-linux-gnueabi-gcc compiler which I want to use for the other arm-linux-gcc terminal. I differentiated gcc (for PC) and arm-xscale-linux-gnueabi-gcc (for first terminal) using code below and I could emulate well. The two compilers have the below macro arm defined. Please help me differentiate these so I can use the same libraries

#ifdef __arm__
 // terminal specific code
#else
 // pc specific code
#endif

Also, if you have a way of transferring files between pc and this terminal (arm-linux-gcc) over serial connection, please assist. I have tried minicom with lrzsz but I couldn't cross-compile lrzsz for lack of libnsl libraries whose source code I couldn't find.

Note: I'm new here, but I haven't found this question discussed yet.

Thanks.

mike
  • 23
  • 2
  • the xscale might be big endian. and you might have different default architectures (armv4 vs armv5 for example) generating different code. Other than endianness it should be possible to build on binary for both arm platforms. (may even be possible with big endian but arm can do be8 or be32 where xscale just be32, you have to know what your arm capabilities are). endianness could definitely interfere with sharing libraries. – old_timer Jul 18 '12 at 11:08
  • dwelch - sorry I took long to react but after I got the 2 devices, I checked the endianness and both are Little Endian. I however haven't been able to check for BE-8, BE-32 - I haven't seen how to. My goal is to be able to write a function that behaves as per platform, say `void showMessage( char *msg){ #ifdef __arm__ #ifdef xscale-differentiator //display #else //display #endif #else //PC display #endif }` This way, I can test code on PC and use shared libraries on both architectures without having to copy code across projects. Thank you. – mike Aug 05 '12 at 13:15
  • Any help on this will be highly appreciated. Note, development on the x-scale is much faster for me as I have a good emulator, whereas I have to reboot the arm-linux-gcc terminal, switch into a different mode, load newly compiled s/w and reboot to test. Thank you. – mike Aug 28 '12 at 12:40

0 Answers0