AnsweredAssumed Answered

Debugging STM32F4 from SRAM

Question asked by Mohammad A on Apr 7, 2017
Latest reply on Apr 7, 2017 by Clive One

I am trying to program and debug from SRAM but it seems that I'm not doing something right.

This is what I do to start debugging:

  • I use TrueStudio to generate ld script to compile and assemble for SRAM.
  • BOOT0 and BOOT1 pins are pulled HIGH.
  • Then I start texan's st-util from terminal.
  • when st-link is connected to board, I start arm-none-eabi-gdb followed by location of ELF file.
  • then these commands in the gdb interface:
    • target remote localhost:4242
    • load
    • continue

it does not work.

When I try to do the samething in TrueStudio debugger, I see that it is looking for some creppy address which I don't know where they are supposed to be. something like 0x78a212b .

What steps have I forgotten to do? Reference manual has mentioned that

When the device boots from SRAM, in the application initialization code, you have to
relocate the vector table in SRAM using the NVIC exception table and the offset register.

but I don't know what I am supposed to add inside the code.

Outcomes