cancel
Showing results for 
Search instead for 
Did you mean: 

Reset Configuration "set $pc=xxxxxxx", possible to use function name instead of its address ?

ferro
Senior III

Hi,

I created this Reset config

ferro_0-1729099154820.png

The address of Reset_Hnadler () is from a .map file.

ferro_0-1729099354664.png

As the adress changes with builds, would be great to use function name.

'set $pc=Reset_Handler'

Is that possible ? What language is that 'set $pc ...'

 

See chapter '3.1.5.6.2 Restart configurations' in 'UM2609 STM32CubeIDE user guide'

ferro_0-1729102881170.png

 

(Eventually I'll port the handler from .s to .cpp and place it at a fixed address so that the address never change)

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
ferro
Senior III

Yes, it is possible and the code in question works as it is.

ferro_0-1729102421389.png

Still, I wonder what laguage it is, is it possible to execute some other code/commands/call a script there ?

View solution in original post

2 REPLIES 2
ferro
Senior III

Yes, it is possible and the code in question works as it is.

ferro_0-1729102421389.png

Still, I wonder what laguage it is, is it possible to execute some other code/commands/call a script there ?


@ferro wrote:

Still, I wonder what laguage it is, is it possible to execute some other code/commands/call a script there ?


Language is GDB commands. I assume pc is the program counter register, so the dumb IDE thinks you are in the reset handler, while in fact you are nowhere since the MCU isn't running your program yet.
I'm not familiar with GDB commands. I tried the print command and nothing happened, nothing showed in the debugger console. It's all so poorly documented. Hard to find examples.

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.