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-06-12 09:37 PM
Hi Clive1,
Thanks for your reply,With the boot-loader I am able to boot from the Image1 and flash the Image2 contents, applying software reset(NIVC_SystemReset()), control will boot from the boot_loader and jump into newly flashed location and executing.For this need to update 3 parameters in boot loader:1. Image IVT address,2. Image Stack pointer,3. Program counter.It will jump to the new Image location.Please ref:2013-06-13 02:44 AM
Ok, not sure how that gets me to the fault handler problem.
So is this a hard fault? When does it occur? At the jump? This could occur if you set the PC to an illegal address, or one that's not ODD. The M3 can only run THUMB (16-bit) code, an EVEN address means ARM (32-bit) code, and will cause the CPU to fault. To understand the nature of the fault you're either going to have to get the fault handler to output diagnostic information about the location/registers at the fault, or step into the code with a debugger and observe the failure first hand. What does your current debugging tell you about the issue?2013-06-13 05:44 AM
Hi Clive1
Yes, Your are right. Jumping into the invalid location is causing the Hard_Fault(). By setting the starting address of image, IVT, Stack pointer and Program counter the Issue is resolved.Thanks,Ram.2015-02-25 01:12 PM
Hello venkat.ram,
I have a question about your dual boot approach.I am also using IAR. Did you need to make distinct software images for App-1 and App-2? Suppose it is the same software. Did you need to run the linker twice - Once create an image with base 0x08003000, and again to create an image with base 0x08010000?I am thinking of doing this with .SREC file format, however, I wonder if I chose a different file format if the programming could be done (somehow) using the one image together with offset information.Thanks for any suggestions,Owen2015-02-25 01:23 PM
The thread was started by a different OP two years ago, the forum never send me tickler emails.
If you want the flash loader to ''address'' this, then you'd typically want to use a Relocatable Object Format (some variants of .ELF, etc). Hex files like Intel or Motorola tend to be fixed address formats output once the linker has resolved everything.2015-03-03 08:12 AM
I am restricted to SREC format, so my solution has been to generate a linked image in SREC format for each intended load-offset.
In the IAR toolchain, the solution was to create distinct configurations (IAR | Project | Edit Configurations...), each with their own .icf file. Then create a batch that builds multiple configurations at the same time (IAR | Project | Batch build...). Thank you for your help.Owen