Re: Issue when debugging STM32 board with zephyr openocd


Erwan Gouriou
 

Hi Felipe,

Thanks for this answer.
I did not build with specific optimization flag, I did not enable symbol generation neither.

Steps to reproduce are as follows:
$make BOARD=nucleo_f4... debug
>>b function
>>rst
>>c
[..]
>>si
after few steps I end up in unexpected function

Using mainline openocd, with same .elf and same sequence, gdb runs as expected.

Erwan

On 17 February 2017 at 16:45, Felipe Neves <ryukokki.felipe@...> wrote:
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@...ct.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-users




--
Felipe S. Neves 
Embedded software & systems engineer
Skype: fneves1989

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