Forum : ARM
Post Information | Post |
---|---|
April 30, 2013 - 7:43pm
|
Hi, I'm trying to create some start-up code. I used it on a previous product, but now I want to change it. Depending on a switch, it would either jump to Bootloader, or the main program. The problem is that when I updated Ride7, it changed the Reset Vectors in my code when compiled. So what I decided was to put an address in that contains the Reset Vector. That way when the code is upgraded, it will reflect the new Reset Vector. The trouble is I'm not sure how to jump to an address that is in a FLASH register. I'll include the code below, and that should make things a little more clear. What it seems to be doing is jumping to the addresses that contain the Reset Vectors. I'm just not sure what command to use. We're using an STM32F103VBT6 Thanks, #define BootSwitch (*(__IO bool*) 0x08001400) // BOOL: False for Main boot. True for Bootloader boot int main(void) And for my Bootloader I have the address defined: (I know this is getting written correctly) And for my Main Program I have the address defined: (I know this is getting written correctly) |