gdb with STM32F0

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
M1Sports20
Posts: 20
Joined: Tue May 28, 2013 2:58 pm

gdb with STM32F0

Post by M1Sports20 »

Hello,
I have the ST32F051XX discovery board. I have added a couple of chprintf lines to your demo applications for the ST32F0

sdStart(&SD1, NULL);
palSetPadMode(...);
palSetPadMode(...);

chprintf(&SD1, "Test 1234\r\n"); // Added
chprintf(&SD1, "Test 1234\r\n"); // Added
chprintf(&SD1, "Test 1234\r\n"); // Added

Only when connected to the target with gdb I see the following:
After 16 characters added to the SD1 queue the main thread gets stuck in an idle loop. It appears like sdStart was never called, but it has been as you are doing it in your demo program. The demo with chprintf works for the STM32F4 demo. The F0 just doesn't appear to work correctly.

Everything works normally if gdb is not connected to the target.

Have you seen the same thing?

I am using st-util (I have also tried openocd). I am using the tool chain and gdb found here: https://launchpad.net/gcc-arm-embedded

thanks...
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: gdb with STM32F0

Post by Giovanni »

Hi,

It never happened to me, it appears to be a problem somewhere in the toolchain. Could you try to use ChibiStudio? it integrates everything is required.

http://sourceforge.net/projects/chibios ... ibiStudio/

Just unzip the archive under C:\ and it is ready to go.

Giovanni
Post Reply