Compiling with debug symbols

Hi,

I’m currently playing around with a LPC1549Xpresso board (in mbed configuration) to try to access cm1101 radio-modules.

I have an issue that I do not seams to find immediatly, so I like to do troubleshooting it with gdb and openocd and step throu the code.
I found the (.elf) image file in (in my case) .pioencs/lpc1549/firmware.elf, … but that does file not contain the debug symbols.

So … how do I make platformIO compile code with the debug-option enabled, so I can use it to step throu the code with gdb/openocd ?

Cheerio!
Kristoff

Hi @krbonne!
Have you tried build_flags option?
Something like this:
[env:lpc1549] platform = nxplpc framework = mbed board = lpc1549 build_flags = -g3

Hi Valeros,

Works great. Thanks!

Also interesting to pointing to the config-file. It looks like I will be using it more in the future :slight_smile:

Cheerio! Kr. Bonne.