2015-07-16 05:12 AM
Hi,
I have an application running on the stm32F030.It has a 'bootloader' application at 0x08000000, which successfully jumps to the 'real' application, at 0x08002000.The jump and relocation was done according to/public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/Cortex%20M0%20Vector%20relocation%20issue&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F¤tviews=1159
.Till now everything was working fine - SPI, 2 UARTs, GPIOs, etc.My problem:I added code waiting on an external interrupt.This code works fine when the code is linked normally (0x08000000, no relocation), but the interrupt isn't called when relocated.I see the interrupt happening on a scope.Thanks. #stm32f0 #vector-table #code-relocation2015-11-04 04:52 AM
It's
/* Enable the SYSCFG peripheral clock*/ RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE); /* Remap SRAM at 0x00000000 */ SYSCFG_MemoryRemapConfig(SYSCFG_MemoryRemap_SRAM); You need to ensure that the VectorTable address is 0x20000000, and if you're doing the copy in the boot loader, you should probably advance the SRAM base in the app to 0x200000C0 so it doesn't get over written. You are going to have to step through the transition code with the debugger to understand what's actually happening. Make sure you don't have interrupts running (ie SysTick, etc), when you move the table, because you'll be replacing all the handlers.2015-11-04 07:42 PM
Hi Clive,
my purpose is boot by ImageA(0x08000000) and jump to ImageB(0x08004000) to run the real code, my chip is STM32F030R8, does it possible to do this feature ? because I saw the discuss of other topic said that M0 series can not change address like M3/M4. Thanks.2018-08-31 09:26 PM
Hi Rami Rosenbaum, Can you tell me how to solve that problem, my program had jump to application successed but interrupt not working? In application function I just edit FLASH_BASE from 0x8000000 to 0x8003000 (0x3000 i use for bootloader function)
thanks
2018-08-31 09:37 PM
This thread is from 3-years ago.
For the CM0 parts you have to copy the vector table into the from of the SRAM, and then remap the SRAM to Zero.
For the CM0+ based parts there is a SCB->VTOR so you can point to a new table.
2018-09-01 07:40 AM
New thread was started here https://community.st.com/s/question/0D50X00009fGTWBSA4/jump-application-bootloader-0x8003000-interrupt-not-working
2019-02-14 05:43 AM
This is exactly what I did in my case and it worked 100%. I later changed the Bootloader address to 0x08007000. At this address there is no direct map with 0x00000000 (Vector Table). How can I do the mapping at 0x08007000?
2019-02-14 07:46 AM
You have to copy the vector table into RAM, and remap the RAM so 0x20000000 maps at 0x00000000