Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 8 months ago.
mbed NXP LPC1768 hangs using nanopb
Hello,
My program hangs when using the nanopb library (http://koti.kapsi.fi/~jpa/nanopb/) to decode and encode simple messages. Weirdly the success of the message encoding depends on where printf statements occur. Included an example: media/uploads/afking/mbed_nano_2.bin, /media/uploads/afking/mbed_nano_3.bin, /media/uploads/afking/nano.zip . bin2 is successful and bin3 fails. Difference between the bins are the number of printf("hello\n"); statements in the encoding decoding loop.
I've hit a wall and don't know how to proceed. If anyone has access to debugging tools, gdb and could run the following commands, "backtrace" "info registers", I would be very grateful.
Thanks for any assistance,
Ed
To debug with GDB, you should build your binaries with GCC instead of the online compiler as it doesn't make the symbols available for debugging.
Some links that might help get mbed-LPC1768 code building with GCC and then running under GDB:
posted by Adam Green 20 Apr 2015How to export to GCC
LPC1768 mbed interface firmware which supports CMSIS-DAP debugging
How to install and use pyOCD with GDB
Thanks for the response. The binaries are already complied with GCC. Ill look into the links.
posted by Edward McFarlane 20 Apr 2015