This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

STM32F103ZG FW Upgrade

I am working on FirmWare upgrade on STM32F103ZG with 1MB flash.
Our application is 250K but generated .axf file is 1781KB. So

1. How to extract binary from this .axf file?
2. If I load this file in Flash in some other area (Other than current old App) with the Vector table remapped, will that work
3. Or I need to use .axf file in external SRAM for the new image execution?

Any examples / directions in this upgrade are appreciated.

Thanks,
Venkat

Parents
  • Thanks Mike...

    Appreciate your quick answer.

    The new application(app) is sitting in the Serial Flash. In boot loader I will check for the flag set by old application (some non-volatile means ) and once that is set I will erase the old app and read new app from serial flash and overwrite the old app area.

    In this case I think vector remapping is not required as we are not moving the app execution area. Is it correct?

    So my scatter file should have 2 execution areas one for BootLoader (will have it's own main) and one for main app.
    So I should use sector 1 for boot loader and some other sector(s) for App.

    I am thinking I should not disturb sector 0 as it will have vector table.

    Venkat

Reply
  • Thanks Mike...

    Appreciate your quick answer.

    The new application(app) is sitting in the Serial Flash. In boot loader I will check for the flag set by old application (some non-volatile means ) and once that is set I will erase the old app and read new app from serial flash and overwrite the old app area.

    In this case I think vector remapping is not required as we are not moving the app execution area. Is it correct?

    So my scatter file should have 2 execution areas one for BootLoader (will have it's own main) and one for main app.
    So I should use sector 1 for boot loader and some other sector(s) for App.

    I am thinking I should not disturb sector 0 as it will have vector table.

    Venkat

Children
  • In this case I think vector remapping is not required as we are not moving the app execution area. Is it correct?

    Yes. Except if you use interrupts in both the bootloader and the main app, you'll have to switch the vector table from the former to the latter somehow.

    So my scatter file should have 2 execution areas one for BootLoader (will have it's own main) and one for main app.

    Actually, you should develop the bootloader and the main app as separate programs, each with their own scatter file.

    I am thinking I should not disturb sector 0 as it will have vector table.

    There is no need for that. The Cortex-M3 CPU allows you to place the vector table anywhere in memory. Have a look at the Vector Table Offset Register of the NVIC (at address 0xE000ED08).

  • Excellent Mike...
    Thanks for the Help...