[SOLVED] [Ozone] Debug.Connect appears to return before it has completed

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

  • [SOLVED] [Ozone] Debug.Connect appears to return before it has completed

    I've got the following within OnProjectLoad:

    Source Code

    1. Debug.SetConnectMode( CM_DOWNLOAD_RESET );
    2. Debug.Connect();
    3. Break.EnableOnSrc( "main.c:325" );
    4. Debug.Continue();
    There are other commands before these.

    I get various J-Link messages in response to the Debug.Connect, as expected. However, these are interleaved with the following commands:

    Source Code

    1. J-Link: connected to target device
    2. J-Link: Performing XMC4500 reset
    3. Break.EnableOnSrc ("main.c:325");
    4. Break.EnableOnSrc ("main.c:325"): Breakpoint not disabled
    5. Debug.Continue();
    6. J-Link: J-Link: Flash download: Bank 0 @ 0x0C000000: Skipped. Contents already match
    7. J-Link: Can not read register 20 (CFBP) while CPU is running
    8. Executed J-Link command "SetRTTAddr 0x10000008"
    9. Executed J-Link command "SetRTTAddr 0x10000008"
    10. Executed J-Link command "SetRTTAddr 0x10000008"
    Behaviour is as expected if I type the command manualy into the console.


    Why are the commands after Debug.Connect being executed before the connection has finished?
  • Hello,

    Thank you for your inquiry.
    We will investigate this behaviour and see if this unexpected output is related to Ozone or this particular target device as J-Link has to run special handling for the XMC4500 to connect to it.
    Nevertheless we recommend using Debug.Start(); instead of Debug.Connect();. To set a breakpoint use Break.SetOnSrc instead because Break.EnableOnSrc will only enable an already set BP that is disabled which is not the case here.


    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.
  • Thanks. I'm getting the same behaviour with Debug.Start:

    Source Code

    1. Debug.SetConnectMode (CM_DOWNLOAD_RESET);
    2. Break.SetCommand ("main.c:325", "OnBPHit");
    3. Break.SetCommand ("main.c:325", "OnBPHit"): invalid parameter: main.c:325
    4. Debug.Start();
    5. Break.SetOnSrc ("main.c:325");
    6. Debug.Continue();
    7. Debug.Continue(): not connected
    8. J-Link: Device "XMC4500-1024" selected.
    9. J-Link: Performing XMC4500 connection sequence.
    10. J-Link: Scanning AP map to find all available APs
    11. J-Link: AP[1]: Stopped AP scan as end of AP map has been reached
    12. J-Link: AP[0]: AHB-AP (IDR: 0x24770011)
    13. J-Link: Iterating through AP map to find AHB-AP to use
    14. J-Link: AP[0]: Core found
    15. J-Link: AP[0]: AHB-AP ROM base: 0xE00FF000
    16. J-Link: CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
    17. J-Link: Found Cortex-M4 r0p1, Little endian.
    18. J-Link: FPUnit: 6 code (BP) slots and 2 literal slots
    19. J-Link: CoreSight components:
    20. J-Link: ROMTbl[0] @ E00FF000
    21. J-Link: ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
    22. J-Link: ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
    23. J-Link: ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
    24. J-Link: ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
    25. J-Link: ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
    26. J-Link: ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
    27. J-Link: connected to target device
    28. Executed J-Link command "SetRTTAddr 0x10000008"
    29. Executed J-Link command "SetRTTAddr 0x10000008"
    30. J-Link: Performing XMC4500 reset
    31. J-Link: J-Link: Flash download: Bank 0 @ 0x0C000000: Skipped. Contents already match
    32. Executed J-Link command "SetRTTAddr 0x10000008"
    Display All
    I'll work round this for now by adding a Util.Sleep() call to allow the connect some time to complete.
  • Hello,

    Thank you for the log.
    We were able to reproduce the issue. The fixed version is planned to be available by the end of the week.

    Would you like to be added to the Ozone update notification list, so you get informed automatically when the new version becomes available? Subscribe: segger.com/notification/subscribe.php?prodid=178

    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.