cancel
Showing results for 
Search instead for 
Did you mean: 

My own BOOTLOADER with STM32F0

lisa
Associate
Posted on April 16, 2015 at 15:59

Hi!

 I'm  using MTF32F030R8 and I need to   develope  my own bootloader.

 I use the first 8K of flash for bootloader (from 0x800000 to 0x8001FFF) and from 0x8002000 my SW  application.

I'm not finding how to set the interrupt vector table at a different address than 0x00000000.

Is it possible? How can i do?

Thank you

Lisa
4 REPLIES 4
Posted on April 16, 2015 at 17:21

You can't relocate the vector table.

What you have to do is copy it to the base of RAM, in a space you've carved out, and map the RAM at ZERO.

Look for some IAP examples, or other thread's I've posted to on the forum on this topic.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on April 16, 2015 at 18:07

I haven't tried this, but -

There is a register called VTOR, the vector table offset register, that holds a 30 bit offset that is used to calculate the address of the vector table. VTOR points at a 128 ''word'' aligned table, you will have to figure out what a word is in this architecture.

This sort of thing is essential when working with bootloaders and RTOS'.

The 68000 family had a register called VBR, the vector base register, that did the same thing.
Posted on April 17, 2015 at 03:07

There is a register called VTOR....

And the Cortex-M0 doesn't have this.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on April 17, 2015 at 03:11

Thread that's on point, there are others too, use Google the search here sucks.

[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/STM32F051K6%20NVIC_SetVectorTable&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&currentviews=59]https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2FSTM32F051K6%20NVIC_SetVectorTable&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=59

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