Nucleo F767ZI - linker script and breakpoints

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

Moderators: barthess, RoccoMarco

crispus
Posts: 23
Joined: Sat Aug 27, 2016 10:14 am
Has thanked: 4 times
Been thanked: 3 times

Nucleo F767ZI - linker script and breakpoints

Postby crispus » Sun Jan 13, 2019 5:31 pm

Hi,

I was complaining some time ago about H7 linker script
I have similar issue with F767ZIH. After loading the binary with the gdb:

Code: Select all

(gdb) load
Loading section .vectors, size 0x200 lma 0x8000000
Loading section .xtors, size 0x8 lma 0x8000200
Loading section .text, size 0x89e8 lma 0x8000210
Loading section .rodata, size 0xf88 lma 0x8008bf8
Loading section .data, size 0x60c lma 0x8009b80
Start address 0x2002e8, load size 41348
Transfer rate: 32 KB/sec, 5906 bytes/write.
(gdb) b main
Note: breakpoints 1, 2, 3 and 4 also set at pc 0x208112.
Breakpoint 5 at 0x208112: file main.cpp, line 24.
(gdb) c
Continuing.
Warning:
Cannot insert breakpoint 1.
Cannot access memory at address 0x208112
Command aborted.

Instead if I modify STM32F76xx.ld to use only flash0 it works just fine:

Code: Select all

(gdb) load
Loading section .vectors, size 0x200 lma 0x8000000
Loading section .xtors, size 0x8 lma 0x8000200
Loading section .text, size 0x89e8 lma 0x8000210
Loading section .rodata, size 0xf88 lma 0x8008bf8
Loading section .data, size 0x60c lma 0x8009b80
Start address 0x80002e8, load size 41348
Transfer rate: 33 KB/sec, 5906 bytes/write.
(gdb) b main
Breakpoint 1 at 0x8008112: file main.cpp, line 24.
(gdb) c
Continuing.
Note: automatically using hardware breakpoints for read-only addresses.

Breakpoint 1, main () at main.cpp:24
24          halInit();

Did I miss any build flag? a configuration?

Thank you

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

Re: Nucleo F767ZI - linker script and breakpoints

Postby Giovanni » Sun Jan 13, 2019 9:02 pm

Hi,

Note that in the 2nd case GDB is using HW breakpoints, enforce HW breakpoints everywhere.

Giovanni


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 2 guests