2013-01-01 02:25 AM
Hi,
Is there a way we can have dual boot feature in STM32 L-152(Flash-128k & driver size is 50k).Thanks #srec #clarify #bootloader2013-01-01 06:43 AM
What, exactly, do you mean by ''dual boot'' in this context?
2013-01-01 06:53 AM
Couldn't you just split the space in half and have your secondary application in the upper half (0x08010000) ?
Or if you need a boot loader to pick which image to run, that would likely work too, allocate a 4 or 8K block. In either case you just have to relocate the vector table to point at your respective firmware images. Tell your linker, via GUI, linker script or scatter file the base/size of your images as they fit into the 128KB of flash. The IAP app note may give you some ideas. Possible memory map 0x08000000 0x02000 Boot Loader 0x08002000 0x0F000 App 1 0x08011000 0x0F000 App 22013-01-01 08:16 AM
That would have been my question, too ...
If you mean two alternative ''applications'', depending on a condition during startup, I would realise it as two execution paths in one single application.2013-01-01 09:33 AM
Hi Clive1,
Thanks for the reply.As you said , lets say I have my App1 running @0x08002000 - 0x0F000 will get the app2 from UART and will write @0x08011000 - 0x0F000 .Now how can I make it(without bootloader) to boot from address 0x08011000 (App2).2013-01-01 10:51 AM
App1 or the bootloader would need to jump to it. The STM32 is always going to start executing firmware in flash at 0x08000000, you can however jump to other code, and change the vector table address (512 byte boundary)
2013-06-03 10:05 PM
Hi clive1,
For dual boot in STM32L152 need common Interrupt Vector Table (or) different IVT?For my case i am able to flash the FW file(IVT+IMAGE) 2nd project location. After software reset control again comes to 1st project but i want to boot from 2nd project. Can you help me.Thanks,ram.2013-06-04 04:16 AM
As previously stated it is always going to boot from the same address, after that you can relocate the Vector Table using SCB->VTOR to different sections of FLASH, or you can build a dynamic table in RAM and point to that. I would suggest building each image in a free standing manner, and pick which one I wanted to use.
If the function of the Cortex-M3 is unclear, please refer to the TRM (Technical Reference Manual) for the core, or review Joseph Yiu's book2013-06-07 06:09 AM
Hi Clive1,
Thanks for your Reply,Asyou said in the previous post I developed boot-loader , App1&App2like:
Boot_loader: 0x08000000to 0x08002FFF(12k)
App-1: 0x08003000to 0x0800FFFF(51k)
App-2: 0x08010000to 0x0801FFFF(63k) (App-1 and App-2 images size is 34K each)
1.Flashedthe boot-loader.
2.LoadedApp1 through IAR and Upgraded App2 through USART, then did areset(NVIC_SystemReset()),
3.Boot_loadergot executed and jumped to App2 .
4.InApp 2 , at the start I updated SCB->VTOR and initializedBSP.
5.But it is hitting the App_Fault_Handler()
Can youhelp me in figuring out this issue..? Am I missing anything..?
Thanks,Ram.2013-06-07 07:55 AM
4.In App 2 , at the start I updated SCB->VTOR and initialized BSP.
5.But it is hitting the App_Fault_Handler()
Can you help me in figuring out this issue..? Am I missing anything..? I can't make a diagnosis with the information presented. Pay attention to what SystemInit() is doing, and understand/explain what instructions are causing the fault condition. Pay attention to what the boot loader is doing, how it's setting up the CPU, peripherals, and if it is leaving any interrupts enabled, etc. Ideally the boot loader should transfer control to the application with near boot conditions, or have a hand-over state which is clearly understood and implemented between the two.