cancel
Showing results for 
Search instead for 
Did you mean: 

ST-LINK_gdbserver and load to Ram

Uwe Bonnes
Principal III

It seem that ST-LINK_gdbserver does not implement load to run.

(gdb) tar ext :61234
Remote debugging using :61234
0x0800004e in ?? ()
(gdb) info mem
Using memory regions provided by the target.
Num Enb Low Addr   High Addr  Attrs 
0   y   0x00000000 0x08000000 rw nocache 
1   y   0x08000000 0x08200000 flash blocksize 0x2000 nocache 
2   y   0x08200000 0x0c000000 rw nocache 
3   y   0x0c000000 0x0c200000 flash blocksize 0x2000 nocache 
4   y   0x0c200000 0xffffffff rw nocache 
(gdb) load
Loading section .isr, size 0x2c lma 0x20000000
Loading section .text, size 0x4d08 lma 0x20000230
Loading section .data, size 0x32c lma 0x20004f38
Loading section .vtable, size 0x2b8 lma 0x20005264
Start address 0x2000027c, load size 21272
Transfer rate: 692 KB/sec, 4254 bytes/write.
(gdb) compare-section
Section .isr, range 0x20000000 -- 0x2000002c: MIS-MATCHED!
Section .text, range 0x20000230 -- 0x20004f38: MIS-MATCHED!
Section .data, range 0x20004f38 -- 0x20005264: MIS-MATCHED!
Section .vtable, range 0x20005264 -- 0x2000551c: MIS-MATCHED!
warning: One or more sections of the target image does not match
the loaded file

 The same sequence works when runing the blackmagic hosted application:

(gdb) tar ext :2000
Remote connection closed
(gdb) tar ext :2000
Remote debugging using :2000
(gdb) mon s
Target voltage: 3.29V
Available Targets:
No. Att Driver
 1      STM32U575/585 M33
(gdb) att 1
Attaching to program: /samsung/home/bon/devel/en_apps/mrf89xa/nucleo_h7s3l8/mrf89xa.elf, Remote target
<signal handler called>
(gdb) load
Loading section .isr, size 0x2c lma 0x20000000
Loading section .text, size 0x4d08 lma 0x20000230
Loading section .data, size 0x32c lma 0x20004f38
Loading section .vtable, size 0x2b8 lma 0x20005264
Start address 0x2000027c, load size 21272
Transfer rate: 187 KB/sec, 886 bytes/write.
(gdb) compare-section
Section .isr, range 0x20000000 -- 0x2000002c: matched.
Section .text, range 0x20000230 -- 0x20004f38: matched.
Section .data, range 0x20004f38 -- 0x20005264: matched.
Section .vtable, range 0x20005264 -- 0x2000551c: matched.
(gdb) 

 Both debuggers tag the RAM as "rw nocache". "info mem"

Stlink :4 y 0x0c200000 0xffffffff rw nocache

BMDA:3 y 0x20000000 0x200c0000 rw nocache

Stlink firmware and ST_Link_gdbserver are recent:

STMicroelectronics ST-LINK GDB server. Version 7.7.0

ST-LINK Firmware version : V3J13M4

2 REPLIES 2
Aziz BRIGUI
ST Employee

Hello @Uwe Bonnes,

Sorry for the late reply,

What do you mean by "load to run" ? Is it a typo and you meant load to RAM ? If yes, are you able to load to ram using standalone CubeProgrammer ?

Thanks,

Aziz


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Sorry for the typo. As the title and the commands shown tell, ST gdb server does not implement "load to ram". Are you able to upload to RAM via standalone CubeProgrammer ?