Showing results for 
Search instead for 
Did you mean: 

STM32 bin file at address 0x4

Associate III

Accepted Solutions

This seems unnecessarily complex and laboured.

Typically you build an app for a specific address, via the linker. The Vector Table is part of the image. The SystemInit() code can set the address of SCB->VTOR based on the symbol the linker assigns the table in a given build. The application should and can be agnostic to the location it's built to live.

You put the Loader at 0x08000000, App1 at 0x08008000, App2 at 0x08020000, or however they need to space related to the size of the respective images and the space available in the FLASH. These BASE addresses are the only thing the Loader really needs to know.

The Vector Table contains the entry point (Reset_Handler) and you hand off control there.

It's also not hard to embedded length of image data in there too if need be.

Most of the CM3 from ST will want the vector table to live at a 512-byte boundary, but this depends on the size and total number of vectors, rounded to the next power of 2

The LINKER is DESIGNED to compute and solve placement problems, and fixate addresses, it can use and generate symbols, let it do the hard work by doing it's job.

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

View solution in original post

Andrew Neil
Chief III

What about it?


Associate III

Sorry. Here the question :
I made a testing soft who start at 0x2B200
I notice than bin file has the (org address+1) at 0x04 
That's OK and I used it for controlling file.
But when the file increase in size I noticed value at 0x4 was now 0x35B29   !
What can I do for this ?

"Small"  one

Bigger one, at the same adress



And big soft has about 50ko lenght (at always start at 0x2B200)


> What can I do for this ?

Why do you want to do something about it? What problem is it presenting?

That is the location of Reset_Handler within the binary.

If you feel a post has answered your question, please click "Accept as Solution".

With the value of bin file at 0x4 , how do you calculate address to jum to ?


Sorry for my keyboard.
I try again.
If my soft has a low size, I can calculate jump address will be (value at 0x4)-1
But if the soft is bigger, how do you calculate jump adress using 0x4 value ?


I don't understand why the value matters. The calculation is the same. (value at 0x04 - 1).

If you feel a post has answered your question, please click "Accept as Solution".

0x35B29-1=0x35B28, not 0x2B200