[SOLVED] J-Link does not set the StackPointer

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

  • [SOLVED] J-Link does not set the StackPointer

    Hi there,

    i currently work with an iMX6SX. I already read in some threads here, that the DAP is not correctly implemented from NXP/Freescale so you cannot load code to the M4 with the J-Link probe directly.
    So i have a small A9-Boot program which i load via gdb, which enables the M4 core and load a minimal program which directly hits a wfi so that the processor remains in a valid state until i load the real application to the M4 core.
    The gdb and j-link are correctly loading the program and it starts correctly and my reset_isr which is the second value in the VectorTable.

    I now recognized that PC is loaded correctly but the SP is not loaded with the correct value from the first position of the VectorTable. I would expect that the debugger would do this for me or am i wrong here ?

    I am using a J-Link plus and newest J-Link software 6.32e

    Best,
    Hans
  • Hello Hans,

    Thank you for your inquiry.
    J-Link sets only SP and PC manually if the IDE or debug software that you use tells J-Link to set it.
    Otherwise J-Link will not do anything automatically.

    Which debug software are you using in your setup?
    We recommend using the Ozone debugger: segger.com/products/development-tools/ozone-j-link-debugger/
    It is multi-platform, can be used with J-Link Plus or higher and supports all J-Link debug features.
    Ozone can also work with numerous output formats from the most popular tool chains on the market.

    Best regards,
    Nino
    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.
  • Hi Nino,

    sorry my notification settings were not set anymore. I am using the GNU Arm Eclipse tools at the moment for debugging. I will have a close look at OZone.
    I use a small piece of assembler code at the moment to set the SP at the beginning of my ResetISR.

    Thanks for the answer i might forward this to the GNU Arm guys.

    Best,
    Hans