Re: [Barry-devel] Cross compiling for the ARM linux
Status: Beta
Brought to you by:
ndprojects
From: Toby G. <tob...@re...> - 2011-03-15 13:25:40
|
On 15/03/2011 12:31, nav...@ya... wrote: > Hi > > We cross compiled and loaded the barry(static) and libusb(dynamic) libraries on to the board. Excellent. Glad to hear you got it working. > But when I run the usbclient application on the board we are getting below error > > Alignment trap: usbclient (517) PC=0x0000f9bc Instr=0xe1dc00b2 Address=0x0004140f FSR 0x001 > > Bus error That'll be because code somewhere is trying to load an unaligned value (e.g. reading a 32-bit integer from an address which isn't a multiple of 4). Is it possible to compile barry with debug information and run within GDB so that we can see which source line is causing an unaligned read? Do you get a similar error when running a different sample or tool (such as 'btool -l')? Are you using the 0.17 code or building from the git repository? If the latter then what's the head commit ID? I've certainly managed to have the channel support (which usbclient uses) working successfully on ARM hardware. I can't remember if I had alignment checking enabled or disabled though and I've not used usbclient on ARM ever. > Please suggest me, what could be the problem for getting above error. It's most likely that an unsigned char* is being cast to a large type and then dereferenced. If you get GDB working then it should be immediately obvious from the line where the unaligned access comes from. > Additionally pls explain me how to build a barry shared libraries. I've always just configured and made barry as normal and always got shared libraries from it. Did you explicitly disable shared libraries from being build for some reason? Regards, Toby |