Sunday, May 20th 2018, 12:01pm UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

akabel

Beginner

Date of registration: Jan 31st 2011

Posts: 3

1

Tuesday, February 1st 2011, 3:19am

[SOLVED]gdbserver can't flash STM32F103C8

I'm using a Jlink edu v8.0 and the Linux gdb server v4.22 with an STM32F103C8T6 board.
With the included JLinkExe, I can program the STM's flash without any issue. Trying to
do the same using gdb,

target remote localhost:2331
monitor flash download 1
monitor flash device STM32F103C8
load main.elf,

I can see the contents of main.elf in memory, but they don't overwrite the flash.
What gives? What am I doing wrong?

SEGGER - Alex

Super Moderator

Date of registration: Dec 18th 2007

Posts: 1,516

2

Tuesday, February 1st 2011, 3:41pm

Hi,

the flash programming itself is only triggered when really necessary.
So in your case nothing than download has been done, so the J-Link lib caches the data to download.

If you add the following line at the end of your script, a flash download should be triggered:

monitor reset

Best regards
Alex

akabel

Beginner

Date of registration: Jan 31st 2011

Posts: 3

3

Wednesday, February 2nd 2011, 9:29am

Hi,

the flash programming itself is only triggered when really necessary.
So in your case nothing than download has been done, so the J-Link lib caches the data to download.

If you add the following line at the end of your script, a flash download should be triggered:

monitor reset

Best regards
Alex
Alex -- thanks for your prompt reply. Unfortunately, this results in


ERROR: No matching RAMCode found (11713201)
Failed to download RAMCode.
Please check your flash settings!
Connection to debugger closed !

Is "STM32F103C8" the correct device string? (There's no way of knowing -- gdbserver accepts arbitrary strings without error).

SEGGER - Alex

Super Moderator

Date of registration: Dec 18th 2007

Posts: 1,516

4

Wednesday, February 2nd 2011, 2:43pm

Hi,

is it possible that you are running the GDB Server in big endian mode?

To be sure that it is running in little endian mode, could you please add
monitor endian little
as the first line in your GDB Init?

Quoted

Is "STM32F103C8" the correct device string? (There's no way of knowing -- gdbserver accepts arbitrary strings without error).

Yes, it is correct.


Best regards
Alex

akabel

Beginner

Date of registration: Jan 31st 2011

Posts: 3

5

Thursday, February 3rd 2011, 4:51am

Hi,

is it possible that you are running the GDB Server in big endian mode?

Yes -- that was it. Works like a charm now. Thank you very much!