[SOLVED] How to get binary size using open flash loader ?

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] How to get binary size using open flash loader ?


    Our definitive application is loaded by a custom loader, which checks the applicative header (that contains the binary size) and its CRC.
    I've created my open Flash Loader to use with our custom board with Cortex-M0 and SPI flash. My Flash loader creates a "dummy" header of the flashed binary, so that when i reboot the board, my custom loader can check the CRC of the application, gets the binary size and starts it (copy to RAM etc...).

    My problem is that i need the binary size at the beginning of the CRC computation but the flash loader has function init(), programPage() that does not provide binary size. And even at the end, we don't known the real size, because it is only multiple of page size.

    Is it possible to get the binary size in another way?
    Will it be possible to do that in a future version, in init for example?

    Note that it is already possible with IAR workbench.
  • Hello,

    Thank you for your inquiry.
    For binary file manipulation we suggest using the J-Flash tool. The Flash loader then just needs to Flash the whole image.

    Best regards,
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.