[SOLVED] Using Segger GDBServer with mx6ull EVK, and getting message: "Unable to start core"...

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

  • [SOLVED] Using Segger GDBServer with mx6ull EVK, and getting message: "Unable to start core"...

    Hello,

    We are developing with a NXP mx6ull evk (has IMX6ULL processor), and attempting to perform some 'bare metal' development with the Segger JLink Plus.

    NXP supports such development with a SDK called 'SDK_2.2_MCIM6ULL', which can be downloaded from NXP's site here...
    nxp.com/webapp/Download?colCod…ype=license&location=null

    Folks following instructions from this SDK are given instructions for installing required toolchains are provided within this download at path:
    '\SDK_2.2_MCIM6ULL\docs\Getting Started with MCUXpresso SDK for i.MX 6ULL Derivatives.pdf'.

    After successfully installing the armgcc toolchain path -> we are getting a message from Segger's "JLinkGDBServer.exe"... where we observe failure to start the core, with exact message through the GDB server console: "ERROR: Could not start CPU core. (ErrorCode: -1)".


    And so, my question is... Has anyone else observed issues initiating a "monitor go" response through the GDB Server console?

    Other information...
    - Demo app being tested is ''\SDK_2.2_MCIM6ULL\boards\evkmcimx6ull\demo_apps\hello_world\"
    - From 'GNU ARM Embedded Toolchain in Launchpad' we are using the latest version build '5.4 2016q3'.
    - The full GDB server console session is attached (see file: 'gdb_debug_hello_world.elf.txt'.
    - The 'hello_world.elf' file resulting from executing the 'build_ddr_debug.bat' is in attached file 'hello_world.zip'.

    Thoughts? Troubleshooting ideas?

    Thanks much,
    --DJ Regan
    Files

    The post was edited 2 times, last by djregan42 ().

  • Cannot execute monitor reset command after JlinkGDBServer is invoked...

    All, FYI...


    I have found a sequence of steps that allows the program to execute successfully...


    While following 'Getting Started with MCUXpresso SDK for i.MX 6ULL Derivatives.pdf'...
    It it is necessary to skip steps 9.b, 9.c (do not use 'monitor reset' and 'monitor halt' during the gdb environment startup procedure). It seems as though command 'monitor reset' is clearing out initialization that was established by the necessary jlinkscriptfile


    See attached file 'do not execute step 9b.png'.



    Running steps: 9 a., 9.d, 9.e (skip steps 9.b, 9.c) results in program execution success.

    Regards,
    --DJ Regan

    The post was edited 4 times, last by djregan42 ().

  • Hello,

    Thank you for your inquiry.

    Generally we recommend to do a reset before programming as the MCU could be in a state where connections are not allowed or similar.
    In this case it worked out it seems but in many other cases it can lead to unpredictable behaviour.
    As you correctly assumed the reset command clears any active initialization and puts the MCU back to reset values.
    This is the behaviour 99% of our customers expect.
    So all you need to do is edit your JLinkScript and put your init steps in the AfterResetTarget() function described in the J-Link User Manual.
    That way your peripheral init gets executed again after each reset.
    I assume the JLinkScript that comes with the imx SDK uses InitTarget() or SetupTarget() which are called before reset in that scenario.

    Best regards,
    Nino
    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.
  • Need to use AfterResetTarget() inside the jlinkscript file...

    Hi Nino,

    Thanks much for your reply. I agree... it would be better to allow reset to guide the system back to a known state.

    I added this function definition to my script (attachment named 'ddr_init.jlinkscript')...
    int AfterResetTarget(void) {
    Report("'AfterResetTarget': Re-initializing...");
    Clock_Init();
    DDR_Init();
    Report("'AfterResetTarget': Re-Initialized.");
    }

    ddr_init.jlinkscript

    Although I do not observe the 'Report()' calls generating JLinkGDBServer console log messages... it does appear clock and DDR re-initialization procedures are getting called, as the program is allowed to be run successfully despite use of 'monitor reset' command from GDB.

    I appreciate it Nino!

    Thanks much,
    --DJ Regan
  • Hello,

    Great to hear that you are up and running again.
    I could not find any reference to the function Report() but there is one for JLINK_SYS_Report() in the user manual.
    Try to use that instead.

    Best regards,
    Nino
    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.
  • SEGGER - Nino wrote:


    I could not find any reference to the function Report() but there is one for JLINK_SYS_Report() in the user manual.


    Best regards,
    Nino

    Try this from Segger's Linux install :
    grep -rn Report /opt/SEGGER/JLink/Devices/


    many scripts use "Report".

    Also saw that you can looks like drop the "JLINK_" prefix entirely : e.g.: MEM_WriteU32 works without it fine.
  • Hi,

    Yes I see that now, thanks for pointing it out.
    We will look into improving documentation in that regard.

    As the original question has been this thread will be treated as solved now.

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