[SOLVED] Ozone Cortex-M - download part of hex file or elf file

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

  • [SOLVED] Ozone Cortex-M - download part of hex file or elf file

    I have a project that writes configuration data into part of the flash memory. It is always in the same memory range. I would like to be able to preserve that data in flash between downloads. I was trying to find in the manual a description of this use case, but couldn't find any. I compile with GCC, that section of my linker script looks like:

    /* Memories definition */
    RAM (xrw): ORIGIN = 0x20000000, LENGTH = 160K
    /* Pages 0 - 250 : System Firmware*/
    ROM (rx): ORIGIN = 0x08000000, LENGTH = 502K
    /* Page 251 : FW update checksum and decryption */
    CFG_DATA1 (rx) : ORIGIN = 0x0807D800, LENGTH = 2K
    /* Pages 252 - 255 : AWS thing name and keys */
    CFG_DATA2 (rx) : ORIGIN = 0x0807E000, LENGTH = 8K

    So basically, I would normally like to erase and program only the MEMORY section called ROM above and not CFG_DATA1 or CFG_DATA2. There are times that I may need to erase those sections as well, but normally, I'd like to preserve their contents.

    I think that I probably need a custom script for TargetDownload, but I'm not sure. It seems to me that this is a fairly common use-case, but I can't find any help on the web for this.

    Any help would be greatly appreciated.
  • Hello,

    Thank you for your inquiry.
    How to tell J-Link to preserve larger areas of Flash memory is explained here:

    How to use the command string in Ozone is explained in the Ozone user manual.

    Is that what you were looking for?

    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.