Memory initialization while connectiong to S32K322

  • Hi.

    I have a problem with disabling the memory initialization procedure performed by JLink while connecting to running target for debugging with Ozone. This is especially problematic with second core. The guide (https://kb.segger.com/NXP_S32K3xx#ECC_RAM) says that:
    "In order to skip the ECC RAM init, the exec ForceAttachTarget=1 command string needs to be used."

    If I understand correctly, to do so, I should use Exec.Command console command to issue this. However, even if I do so, this gets ignored and memory is still initialized with 0xDEADBEEF pattern(see attached screenshot)


    How can I prevent this from happening?

  • Hello,

    The reason ForceAttachTarget is not working is because the exec command is being called before the J-Link DLL session has started.
    To set global DLL variables like ForceAttachTarget, you can add a J-Link script file to your project that includes the ConfigTargetSettings() function.
    This function is called after the J-Link DLL session starts, but before the target is connected.

    C
    int ConfigTargetSettings(void) {
      JLINK_ExecCommand("ForceAttachTarget=1");
      return 0;
    }

    You can find more information on J-Link script files here:
    https://kb.segger.com/J-Link_script_files#AfterResetTarget()

    Best regards,
    Simon

    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: https://www.segger.com/ticket/

    Or you can contact us via e-mail.

Participate now!

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