Re: Issue when debugging STM32 board with zephyr openocd


Felipe Neves
 

Hi Erwan,

Did you build the zephyr project with some optimization flags? such -Os?
Also, in menu config during kernel configuration phase, have you enabled the debug symbol generation?

Also, you need to tell your gdb instance to break in main, for exemple after start the openocd and gdb issue load command to halt microcontroller and flash the firmware
then before start the debug, set a break command on main function, then issue run command, It should work properly.


If you have further question I'll happy to help you :)

Best,

Felipe

2017-02-17 12:48 GMT-02:00 Erwan Gouriou <erwan.gouriou@...>:

Hi,

I've faced an issue when trying to debug using zephyr openocd ("make BOARD=... debug").
Problem happens in step by step debug where I suddenly jump in an unrelated function.

I don't face such behavior using mainline openocd.

Has someone already observed this behavior ?
I'll raise an issue but I'd like to know if this is specific to ARM or STM32 or..


Thanks
Erwan

_______________________________________________
Zephyr-users mailing list
Zephyr-users@lists.zephyrproject.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-users




--
Felipe S. Neves 
Embedded software & systems engineer
Skype: fneves1989
+55 11 96610 – 0855 

Join {users@lists.zephyrproject.org to automatically receive all group messages.