cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F2xx start program not from 0x08000000

Barbie
Associate II
Posted on April 16, 2013 at 08:37

Hello.

Can I put my program start from diffrent address then 0x08000000 ?

I have same data sector I need and because I can't know the size of my program I want to make it this way:

Sector 0-1 will be for data.

My program start on sector 2.

I change the vector offset and also confige VTOR to start on sector 2.

My program run O.K. with debbuger but when I let it run free it doesn't do any thing.

I look on  the memory map and see that my code start on 0x08008000 but no code on 0x08000000 or 0x0 (mirror of  0x08000000). As I understand the reset vector always jump on power up to 0x0 . And if it so I understand why it won't run.

If so do I have always put the vector reset on 0x08000000 and lost this sector in any case?

Bar.
3 REPLIES 3
Posted on April 16, 2013 at 13:06

Another thread? The purpose of threads is to keep stuff around the same topic together, ie ''booting and loaders'', yet you keep starting and abandoning them. Final warning, do it again you'll be ignored.

All the processor cares about is that the initial SP/PC values are stored at the base 0x08000000, after that you can put in anything you want (ie 16KB - 8 bytes of your data), and relocate the vector table address (SCB->VTOR) in your Reset_Handler code. You could also put a copy of the whole vector table there. How much data storage space do you need?

I, personally, would not put data in sector 0, but rather carve out space in the subsequent 16KB blocks.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Barbie
Associate II
Posted on April 16, 2013 at 17:20

It is not the same thread because this is about diffrent program not using IAP at all.

About what you say. ''All the processor cares about is that the initial SP/PC values are stored at the base 0x08000000''

So it mean that I can't put data that will be change on the same sector because on change it will be arease also?

Bar.

Posted on April 16, 2013 at 18:06

You can use everything other that the first 8 bytes for your data, if you chose.

Try to put stuff there that is permanent, rather than being constantly erased and rewritten, otherwise you will have a failure window when it has been erased, but doesn't contain useful data.

You're idea of a thread might be different to mine, but you're conversing with me and walking away from threads revolving around the booting/vectors, I find that rude, this is a problem for you and impacts my desire to respond.

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