[SOLVED] Problems debugging NXP RT1052 with Ozone

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

  • [SOLVED] Problems debugging NXP RT1052 with Ozone

    Hello,

    I'm working with an NXP i.MX RT1052 MCU and have working debugging in NXP MCUXpresso IDE v10.3.1_2233 with JLink_V645b and a newly bought J-Link PRO (firmware is updated). Works very reliable but Eclipse (which is the base for MCUXpresso) is a bit of a beast and not as nice as Ozone for debugging, so now when I'm chasing a specially annoying bug I decided to switch over to Ozone V2.62, but it just refuses to work.

    In MCUXPresso the Debugger settings are:

    Device: MCIMXRT1052
    Target interface: SWD
    Speed: auto

    In Ozone it's set to:
    Target device: MCIMXRT1052 or MIMXRT1052DVL6B (tried both)
    Target interface: SWD: 1 MHz (tried some other speeds, and auto, as well)

    It flashes the device but then all I get is:

    J-Link: connected to target device
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via AIRCR.SYSRESETREQ.
    Elf.GetBaseAddr();
    Target.SetReg ("SP", 0xC0C0C0C);
    Target.SetReg ("PC", 0x0);
    Can not read register 15 (R15) while CPU is runningCan not read register 7 (R7) while CPU is runningCan not read register 6 (R6) while CPU is runningCan not read register 5 (R5) while CPU is runningCan not read register 4 (R4) while CPU is runningCan not read register 3 (R3) while CPU is runningCan not read register 2 (R2) while CPU is runningCan not read register 1 (R1) while CPU is runningCan not read register 0 (R0) while CPU is runningCan not read register 15 (R15) while CPU is runningPC of target system has unexpected value after preparing target. (PC = 0x00000000)!
    ---------------------------------------------------------------------- Registers -------------------------------------------------------------------------------------
    PC = 00000000
    Current: R0 = 00000000, R1 = 00000000, R2 = 00000000, R3 = 00000000
    R4 = 00000000, R5 = 00000000, R6 = 00000000, R7 = 00000000
    --------------------------------------------------------------------------------------

    The board is an Embedded Artists devkit:

    embeddedartists.com/products/imx-rt1052-developers-kit/

    Very annoying, but electrically everything seems fine since it works with MCUXPresso.
    Let me know if I can try something out to to either fix the problem or give you more information about what's going wrong.

    /M
  • Hello,

    Thank you for your inquiry.
    The reported behaviour is most likely related to the wrong SP and PC values being set by the default Ozone project config.
    Is your application running in RAM only or in QSPI?
    In any case the SP and PC values need to be set correctly.
    For more information see here:
    wiki.segger.com/SEGGER_Ozone#S…g_session_with_bootloader
    wiki.segger.com/I.MXRT1050


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

    Sorry for late response but I've found the time to dig a bit deeper into this and it seems that the MCUXpresso does a lot of setup of the RT1052 before actually start to run anything on the MCU. It can be found in the file
    workspace/.mcuxpressoide_packages_support/MIMXRT1052xxxxB_support/Script/evkbimxrt1050_sdram_init.jlinkscript in the MCUXpresso project but apparently the syntax is not accepted as is by Ozone. The first obstacles are the instructions MEM_ReadU32 and MEM_WriteU32, but I bet it doesn't end there.

    Just noting it down here in case someone else is trying to find his/her way down the same rabbit hole.

    I'll see if I find the time to dig down further at a later time, but for now this will be put on hold. If I find the time I'll get back to this thread.
  • Hello,

    JLinkScript and Ozone scripting syntax is not compatible as they communicate with different software.
    But you can set a JLinkScript inside your Ozone project.
    More information can be found in the Ozone user manual or here:
    wiki.segger.com/Using_J-Link_Script_Files

    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.