Skip to main content
Abhi1
Associate II
Apr 7, 2019 1:55 PM UTC
Question

Flashing and debugging STM32F103C

Hello Everyone,

I got a new board for then  STM32F103C and I want to debug as well as dump code.

I connect the BOOT0 to GND, and connect the respective pins of STLink (Nrst Pin- NC).

However I am not able to do anything.

It gives hardFault error

This topic has been closed for replies.

8 replies

Abhi1
Abhi1Author
Associate II
Apr 7, 2019 1:58 PM UTC

Images for reference

Abhi1
Abhi1Author
Associate II
Apr 7, 2019 1:59 PM UTC

..

Tesla DeLorean
Guru
Apr 8, 2019 1:20 AM UTC

Don't see any code that you are building or downloading.

Can you download the code you have built with the ST-LINK Utilities or STM32 Cube Programmer application?

Not a lot to work with here.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Abhi1
Abhi1Author
Associate II
Apr 10, 2019 6:49 AM UTC

Dear Clive,

Thanks for responding.

This is what I get from cube programmer: it remains same if I connect boot0 high or low

12:16:04 : Time elapsed during download operation: 00:00:00.426

12:16:04 : Verifying ...

12:16:04 : Read progress:

12:16:05 : Download verified successfully 

12:16:05 : RUNNING Program ... 

12:16:05 : Address: : 0x08000000

12:16:05 : Application is running

12:16:05 : Start operation achieved successfully

Abhi1
Abhi1Author
Associate II
Apr 10, 2019 6:52 AM UTC

it doesn't work

Abhi1
Abhi1Author
Associate II
Apr 10, 2019 6:51 AM UTC

if I connect boot0 to high,

and debug thru eclipse it works but after reset their is no code.

if I connect boot0 to low,

it gives error- unable to erase flash

Tesla DeLorean
Guru
Apr 10, 2019 12:33 PM UTC

Suggests the code you are loading is interfering with pins or sleeping the device. Your code is likely running, just not doing what you want. No visibility on what's been programmed.

Sorry, not going to work through Eclipse and OpenOCD/GDB issues.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Abhi1
Abhi1Author
Associate II
Apr 10, 2019 2:33 PM UTC

So does that mean that problem is in eclipse.. or ...

what should I do to make it work, Please suggest some work around