Preserving a Sub-Range of QSPI-NOR Flash with J-Link Commander on NXP RT1xxx

  • Hello everyone,
    I’m using Segger J-Link v8.30 and an NXP RT1xxx MCU that boots from external QSPI-NOR flash mapped, for example, at 0x3000 0000. Although the NOR flash supports 4 KiB sector erases at the hardware level, J-Link Commander (and the GDB Server) currently always performs erases in 64 KiB blocks. When I write the FW into the flash I need to preserve 512 bytes at 0x3000 0400–0x3000 05FF, which contain data that must survive every download.
    Key details:

    • Hardware sector erase size: 4 KiB
    • J-Link software erase granularity: 64 KiB
    • Regions to rewrite:

      • 0x3000 0000–0x3000 03FF
      • 0x3000 0600–0x300x xxxx
    • Region to preserve: 0x3000 0400–0x3000 05FF

    In development and debugging I use the GDB Server, but for simple production programming I rely on J-Link Commander.

    How can I achieve this with J-Link software?

    Thank you!

  • Hello,

    I read this: https://kb.segger.com/ConfigTargetSe…illegal_regions

    and I tried this script:

    Template_ExcludeIllegalRegions.JLinkScript

    Then I try to attach to MIMXRT1021-EVK:

    /opt/SEGGER/JLink/JLinkExe -if SWD -speed auto -device MIMXRT1021xxx5A -autoconnect 1 -JLinkScriptFile Template_ExcludeIllegalRegions.JLinkScript

    I get this:


    I want to override the area 0x60000000-0x600001FF , I need to do this.

    I don't even know how memory regions are defined now (how can I print them?).

    How can I solve it?

    best regards
    Max

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!