This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to download program to defined address

This question seems to have been asked several times, like http://www.keil.com/forum/18689/. What I want to know is how to burn the program in a customized flash address. I am using STM32F407 and it has 12 flash sectors, 0 ~11. sector 0 starting address 0x08000000 is by default where the program starts. If I want to make the program be burned in sector 11, starting address 0x080E0000, how can I realize it? Following are the steps I have tried but failed.

1. change Option for target -> target -> IROM1 to 0x080E0000
2. change Option for target -> linker -> R/O base to 0x080E0000
3. change Option for target -> debug -> setting -> flash download address to 0x080E0000
4. change FLASH_BASE and VECT_TAB_OFFSET values in SystemInit()

So how I can tell ResetHandler the new address of my main() function which is now in sector 11?

Parents
  • So once you've put your entire program at an entirely different address than the only one where the CPU actually looks for code to run: how do you imagine the CPU will find your code at that other address? Did you find any mechanism in the datasheet that suggests this would be even remotely possible?

Reply
  • So once you've put your entire program at an entirely different address than the only one where the CPU actually looks for code to run: how do you imagine the CPU will find your code at that other address? Did you find any mechanism in the datasheet that suggests this would be even remotely possible?

Children