Skip to main content
Ekim.1
Associate III
March 12, 2020
Solved

What does the data at the end of the inserted code mean when downloading the code?

  • March 12, 2020
  • 1 reply
  • 1487 views

Hello, everyone.

I downloaded the code to STM32H753 and then used STM32 Community to look at the data on the flash memory and suddenly I got one question.

0693W000000Tj0sQAC.png

I downloaded my code on flash memory bank 2 sector 0 (address 0x08100000) and found that the data value was written on the area that is supposed to be the last part of the code I downloaded.

The constant area was filled with 0xF7FFBFFE before the data appeared

This was also found in the source code .bin file I downloaded

0693W000000Tj0xQAC.png

What do these data mean?

This topic has been closed for replies.
Best answer by Tesla DeLorean

Your project, check the .MAP file

Beyond the CODE/TEXT section is usually the BSS/STATIC section which copies into RAM every time you start. This would be initialized data in global variables, arrays, bitmaps, etc.

1 reply

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
March 12, 2020

Your project, check the .MAP file

Beyond the CODE/TEXT section is usually the BSS/STATIC section which copies into RAM every time you start. This would be initialized data in global variables, arrays, bitmaps, etc.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Ekim.1
Ekim.1Author
Associate III
March 12, 2020

Thanks for your help!

If you don't mind, may I ask you one more question?

I didn’t download it when I downloaded it with IAR, so I checked it out, and there were cases where data was not written down in this area. Can you tell why this is happening?

Tesla DeLorean
Guru
March 12, 2020

No idea, STM32 Cube Programmer is going to write whatever is in the .BIN file.

The .BIN is 0xD4F8 bytes in size, neither screen shot seems to exceed that, so not exactly sure what behaviour you're flagging here.

Review how you're generating the .BIN file if the content is not what you expect.

The static area might be compressed, not sure about IAR, but KEIL does, and the startup code unpacks it.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..