LPC4370 M0SUB debuge with j-link

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

  • LPC4370 M0SUB debuge with j-link

    Hi
    I have successfully manged to debug a dual core version program, now I have expanded my project to 3 cores! the program works perfectly and I can debug the M0 and M4 cores correctly, but I can not debug the M0SUB core,Please note that I'm using the script which has shiped with j-link example project for debugging

    So do we have a certain script? how should I solve my problem?

    Brainfuck Source Code

    1. /********************************************************************** SEGGER MICROCONTROLLER GmbH & Co. K.G. ** Solutions for real time microcontroller applications ************************************************************************ ** (c) 2010 SEGGER Microcontroller GmbH & Co. KG ** ** Internet: www.segger.com Support: support@segger.com ** ***********************************************************************----------------------------------------------------------------------Purpose : J-Link script file for NXP LPC4350 device. The NXP LPC4350 is a Cortex-M4 based device which has an additional Cortex-M0 core inside which can be enabled. This script is used to configure the J-Link to talk to the Cortex-M0 core. This script assumes that LPC4350_DebugCortexM4.JLinkScript has already been executed before using this script file.---------------------------END-OF-HEADER------------------------------*/
    2. /*********************************************************************** ResetTarget** Function description* Do nothing. We can not reset the Cortex-M0 while debugging on it since* It does not come out of reset automatically. So once if has been reset* Only the M4 is able to get it out of the reset state.*/void ResetTarget(void) { int Speed;
    3. Report("J-Link script: Performing reset sequence"); Speed = JTAG_Speed; JTAG_Speed = 100; JTAG_WriteClocks(1); JTAG_Speed = Speed;}
    4. /*********************************************************************** InitTarget** Function description* Select the Cortex-M0 as the device we want to debug* If it is not already enabled we are done here, because configuration* has to be done when setting up the Cortex-M4 debug session*/void InitTarget(void) { int v; int BitPos; int Speed; // // This script is able to handle all three versions of the LPC4350 silicon // 1st silicon: After power-up only the Cortex-M4 is in the JTAG chain, the Cortex-M0 needs to be added // 2nd silicon: After power-up the Cortex-M4 and the Cortex-M0 are in the JTAG chain. The Cortex-M4 is shown twice (bug, will be fixed in 3rd silicon) // 3rd silicon: After power-up the Cortex-M4 and the Cortex-M0 are in the JTAG chain. // Report("NXP LPC4350 (Cortex-M4+M0 core) J-Link script"); Speed = JTAG_Speed; JTAG_Speed = 100; JTAG_Reset(); // Perform TAP reset and J-Link JTAG auto-detection // // Check if the Cortex-M0 is already enabled // If not, we are done here // if ((JTAG_TotalIRLen != 8) && (JTAG_TotalIRLen != 12)) { MessageBox("LPC4350_DebugCortexM4.JLinkScript has to be executed prior to this script."); JTAG_Speed = Speed; return 0; } // // Configure the JTAG chain to talk to the LPC4350 Cortex-M0 core // if (JTAG_TotalIRLen == 8) { JTAG_DRPre = 1; JTAG_DRPost = 0; JTAG_IRPre = 4; JTAG_IRPost = 0; JTAG_IRLen = 4; JTAG_SetDeviceId(0, 0x4BA00477); // Device #0 is the Cortex-M4 JTAG_SetDeviceId(1, 0x0BA01477); // Device #1 is the Cortex-M0 } else { JTAG_DRPre = 2; JTAG_DRPost = 0; JTAG_IRPre = 8; JTAG_IRPost = 0; JTAG_IRLen = 4; JTAG_SetDeviceId(0, 0x4BA00477); // Device #0 is the Cortex-M4 JTAG_SetDeviceId(1, 0x0BA01477); // Device #1 is the Cortex-M4 (only visible on buggy silicon) JTAG_SetDeviceId(2, 0x0BA01477); // Device #1 is the Cortex-M0 } CPU=CORTEX_M0; JTAG_Speed = Speed;}
  • Hi,

    Please note that I'm using the script which has shiped with j-link example project for debugging

    With which example do we ship this script?
    It needs to be adjusted in order to debug all three cores.

    Best regards,
    Niklas
    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.
  • Hi,thanks for the answerThere is a project in the installation folder of j-link
    C:\Program Files\SEGGER\JLink_V502k\Samples\JLink\Projects
    and the project name is LPC4350_DualCore_Debug_IAR_EWARMV630

    So what changes should I make to the script,Please help me
    Regards
  • Hi,

    Sorry for the delay in response.
    Unfortunately, your request exceeds the support given if this forum.

    If you would like me to do so, I can ask if we have free resources left in order to provide official support for the device you use. (Which will include the creation of the requested script file).
    In this case we would ask you for a hardware sample and probably need to charge you with NREs.


    Best regards,
    Niklas
    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.
  • Hi,
    Thanks for your reply and the offer, actually It's really hard to send you the hardware, because it's not in a case yet and it maybe damage during transportation,So I have a nice new Idea,
    Maybe you could use team viewer to access the hardware and software! and in that case you could update your support for the great j-link
    what's your opinion?
    Regards