Debugging Issue with STM32 NUCLEO-G0B1RE and OpenOCD 0.12.0

Discussions and support about ChibiOS/RT, the free embedded RTOS.
progressivedesigns
Posts: 2
Joined: Thu Oct 26, 2023 6:07 am

Debugging Issue with STM32 NUCLEO-G0B1RE and OpenOCD 0.12.0

Postby progressivedesigns » Thu Oct 26, 2023 12:32 pm

Hi,

I am new to ChibiOS and started evaluating it ( Latest 21.11.x ) using Board NUCLEO-G0B1RE, Since the board is not supported in OpenOCD 0.11.0, I am using latest prebuilt OpenOCD 0.12.0 in which I can start debugging RT-STM32G0B1RE-NUCLEO64 Demo Project in ChibiStudio, but the issue is that while debugging, when I Step Over functions

halInit();
chSysInit();

instead of executing function

sdStart(&SD2, NULL);

it Jumps back to executing halInit() and chSysInit() again after I continue Stepping Over, it then executes

sdStart(&SD2, NULL);

and then runs normally as expected, LED blinks

My query:
Is this normal and expected or something strange happening here ?

Thanks

User avatar
Giovanni
Site Admin
Posts: 14458
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Debugging Issue with STM32 NUCLEO-G0B1RE and OpenOCD 0.12.0

Postby Giovanni » Thu Oct 26, 2023 2:21 pm

Hi,

Compiler optimizations, when debugging use -O0 instead of -O2 in the makefile.

Giovanni

progressivedesigns
Posts: 2
Joined: Thu Oct 26, 2023 6:07 am

Re: Debugging Issue with STM32 NUCLEO-G0B1RE and OpenOCD 0.12.0

Postby progressivedesigns » Fri Oct 27, 2023 5:19 am

It worked,

Now I will continue exploring ChibiOS more

Thanks :)


Return to “ChibiOS/RT”

Who is online

Users browsing this forum: No registered users and 3 guests