[SOLVED] Ozone: Memory View: When deleting flash on the device, content doesn't change if region contains a const variable

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

  • [SOLVED] Ozone: Memory View: When deleting flash on the device, content doesn't change if region contains a const variable

    I have the following situation:
    • a dedicated region in the linker script for configuration.

      Source Code

      1. ...
      2. m_config (RX) : ORIGIN = 0x00007C00, LENGTH = 0x00000400
      3. ...
      4. .config :
      5. {
      6. __CONFIG_A_START = .;
      7. KEEP (*(.config*))
      8. } > m_config

    • declared and initialized const variable in this region

      C Source Code

      1. __attribute__((section(".config"),aligned(4)))
      2. const uint8_t config[CONFIG_LENGTH] = { 0 };

    • a function deleting and reprogramming the config region at runtime

    when stepping through the code, the memory view doesn't change when the device performs an erase on the associated flash sector, but it changes if I also delete another sector which doesn't contain such variables.
    For me it seems Ozone always displays the content it reads in the elf file.

    Thanks
  • Hello,

    Thank you for your inquiry.
    J-Link generally caches Flash contents due to performance reasons as it is usually not expected that ROM content would change during run time.
    However in some cases as yours it is needed for debugging.
    For this reason exec command ExcludeFlashCacheRange has been implemented. More information about this command can be found in the J-Link user manual.
    To execute it in Ozone action Exec.Command can be used which is described in the Ozone user manual.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    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.
  • Hi,

    Great to hear that you are up and running again.
    We will consider this thread as solved now.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    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.