Author Topic: Analyzing FLASH - Address does not point to reset_handler, but program works?  (Read 428 times)

0 Members and 1 Guest are viewing this topic.

Offline eTobeyTopic starter

  • Frequent Contributor
  • **
  • Posts: 557
  • Country: de
What i learned is, that the first adress in a FLASH program is loaded into the SP. Then the next address is loaded to the PC, which points to the reset_handler that will be executed.
But when analyzing the memory, it does not match.

Its an STM32G431RBT6 and i use CudeIDE 1.12. And the data is from the memory while debugging, and from the buildanalyzer

I am confused.

« Last Edit: December 22, 2023, 04:38:51 pm by eTobey »
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant." (Maxim Gorki)
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11261
  • Country: us
    • Personal site
It should match, make sure that the Reset_Handler function is what actually in the vector table.

Also, since bootloader is mentioned, make sure you are not confusing bootloader and the application.
Alex
 

Offline eTobeyTopic starter

  • Frequent Contributor
  • **
  • Posts: 557
  • Country: de
I think i found my problem: A problem that is really annoying.
I use Cube IDE, aka eclipse, and if you change the configuration, then "build" will build the current configuration, but the launch button will have the old configuration still in it.   :palm:
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant." (Maxim Gorki)
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 5912
  • Country: es
Yes, build twice or right-click on the project / refresh.
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf