[SOLVED] JLink with NXP IMXRT106x and modified flexRAM

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

  • [SOLVED] JLink with NXP IMXRT106x and modified flexRAM

    Hi

    I am using a Segger JLink for debugging/programming a NXP IMXRT106x micro with external QSPI flash.

    The IMXRT106x has 1MB of on-chip RAM, 512KB of which is "flexRAM" which can be re-configured to be either ITCM, DTCM or OCRAM.

    When I connect to these boards using a CMSIS-DAP linkserver debugger, I have to use a different connect script so that the debugger is aware of the different changed flexRAM configuration, otherwise the debugger cannot connect and this can lead to problems erasing/programming the external flash.

    How does a JLINK handle this? Does it expect/presume a particular or default flexRAM configuration? Can this be changed or is there a setting for this somewhere?

    many thanks!

    UPDATE: I spotted a note on the link below that says "we expect that the first 0x10000 bytes of the RAM are configured to execute instructions from" - this suggests to me ITCM is required. I tried changing the flexRAM configuration so that 32kB of ITCM was available and the erase/program seemed to work OK.

    wiki.segger.com/i.MXRT1060

    So the question is - how do you erase/program a target that has none of the flexRAM assigned to ITCM? (a pretty common use case I think). Hopefully there is a way .......

    The post was edited 1 time, last by mrwaljit: UPDATE ().

  • Hi,
    Thank you for your inquiry.

    You would have to reconfigure the device to apply to the requirements.
    The best way to do so depends on the Tools you are using.

    Examples:
    1) J-Flash:
    The Init. steps (Project Settings > MCU > Init. steps) provide a good way to achieve this.
    This would be a good choice for a production environment.

    2) J-Link Commander:
    A J-Link command file utilizing the "Write" commands would probably be the best choice here.

    3) General:
    A J-Link Script file would work well in nearly all scenarios.

    Which ever way you choose, you would have to somehow make sure that the requirements are met.
    How you achieve this is up to you.

    Does this answer your question?

    Best regards,
    Fabian
    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.
  • Hello Fabian,

    Thank you for your reply, it is appreciated.

    My use case is for erasing and programming the flash memory, using either the IDE (mcuxpresso) or an external script/command file would also be OK.

    The issue I have at the moment is this: I am using a modified script.jlink file that, in theory, writes the correct values into the MCU registers so that the required memory is available. But, this is not working, I get an error message that says:

    ****** Error: Failed to prepare RAMCode using RAM
    Error while determining flash info (Bank @ 0x60000000)
    Unspecified error -1

    Script processing completed.

    Here are the contents of my modified script.jlink file:

    ExitOnError 1
    r
    h
    w4 0x400AC040,0x00200007
    w4 0x400AC044,0xaaaaaabb
    w4 0x400AC038,0x00a70000
    loadfile "C:\mcuxpresso_ws_11p4\XXXXX\Debug\XXXXX.hex" 0x60000000
    qc

    qc

    You can see the 3 x memory writes to setup the flexRAM memory.

    Please can you help me to know what I might be doing wrong, or missing a step?

    many thanks
    -Nick
  • Hi Nick,
    I can see that you also contacted us via the support ticket system.
    Therefore I will close this thread here to keep communication to one channel.

    Could you please keep to one channel for future requests?
    Otherwise, this increases our workload, resulting in slower response times.
    Also, critical information might be lost between the channels.

    Best regards,
    Fabian
    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.