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

Scatter file for segmenting the MCU flash

Hello,

I am using Keil for development with my FRDM-LKL03Z board. It has the PKL03Z32VFK4 on-board.
I would like to segment the flash memory into 3 parts:

1. For storing application(user) data.
2. For storing incoming FW binary for FOTA update.
3. For a custom bootloader.
4. For the running code.

Could you please help me with a template scatter file with these 4 segments defined? I will then modify the bounds of each section to suit my needs.

Thanks very much!

Parents
  • The application data doesn't need a separate partition, unless you have some logic to reconfiguring individual data values.

    So one region for boot loader.
    One region for application.
    And maybe a third region for a downloaded copy. But this doesn't need to be a separate region in the Scatter file unless you plan to build your application in two versions for running at 2 different load addresses.

    If all you need is a region for temporary storage of a new application, then it's enough to use the settings in the dialog to "hide" a large enough part of the flash. Then the application can use direct IAP commands to store the downloaded binary to this region. And then set a flag and reboot to request the boot loader to copy the fully retrieved new application image into the normal application flash region.

    But as noted - boot loader and application should be built as individual projects or at least as individual targets, to make sure they are independent.

Reply
  • The application data doesn't need a separate partition, unless you have some logic to reconfiguring individual data values.

    So one region for boot loader.
    One region for application.
    And maybe a third region for a downloaded copy. But this doesn't need to be a separate region in the Scatter file unless you plan to build your application in two versions for running at 2 different load addresses.

    If all you need is a region for temporary storage of a new application, then it's enough to use the settings in the dialog to "hide" a large enough part of the flash. Then the application can use direct IAP commands to store the downloaded binary to this region. And then set a flag and reboot to request the boot loader to copy the fully retrieved new application image into the normal application flash region.

    But as noted - boot loader and application should be built as individual projects or at least as individual targets, to make sure they are independent.

Children
No data