[SOLVED] Unable to connect to target in Ozone [Linux]

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

  • [SOLVED] Unable to connect to target in Ozone [Linux]

    I'm unable to start a debugging session with Ozone.
    Whenever I want to attach (no matter which way, downloading first or not). I get the following error;

    Ozone wrote:

    Debug.SetConnectMode (CM_ATTACH);

    Debug.Start();
    Device "ATSAMD21G18" selected.
    InitTarget()
    Connect Under Reset
    Connect Under Reset
    InitTarget()
    Connect Under Reset
    Connect Under Reset
    InitTarget(): PCode returned with error code -1
    InitTarget()
    Connect Under Reset
    Connect Under Reset
    InitTarget()
    Connect Under Reset
    Connect Under Reset
    InitTarget(): PCode returned with error code -1
    Connection failed.
    I'm able to flash to the board with openocd using the same JLink EDU (tried both classic and mini).
    I can also connect to the target using JLinkExe.
    When I connect there I get the following back:

    JLinkExe wrote:

    J-Link>connect
    Device "ATSAMD21G18" selected.


    Connecting to target via SWD
    InitTarget()
    Found SW-DP with ID 0x0BC11477
    DPIDR: 0x0BC11477
    AP map detection skipped. Manually configured AP map found.
    AP[0]: AHB-AP (IDR: Not set)
    AP[0]: Core found
    AP[0]: AHB-AP ROM base: 0x41003000
    CPUID register: 0x410CC601. Implementer code: 0x41 (ARM)
    Found Cortex-M0 r0p1, Little endian.
    FPUnit: 4 code (BP) slots and 0 literal slots
    CoreSight components:
    ROMTbl[0] @ 41003000
    ROMTbl[0][0]: E00FF000, CID: B105100D, PID: 000BB4C0 ROM Table
    ROMTbl[1] @ E00FF000
    ROMTbl[1][0]: E000E000, CID: B105E00D, PID: 000BB008 SCS
    ROMTbl[1][1]: E0001000, CID: B105E00D, PID: 000BB00A DWT
    ROMTbl[1][2]: E0002000, CID: B105E00D, PID: 000BB00B FPB
    ROMTbl[0][1]: 41006000, CID: B105900D, PID: 001BB932 MTB-M0+
    Cortex-M0 identified.

    I can work with the same hardware combination on my windows PC with the same Ozone version without problem.

    One thing I noticed, when I had the bootloader still flashed to the board (Adafruit Metro M0). I had the board go into bootloader mode whenever I tried to attach which suggests that Ozone triggers 2 consecutive resets because thats how the UF2 bootloader gets triggered to stay in bootloader.
    Again this behaviour does not occur on Windows.

    My system runs Ubuntu 18.04.4.
  • Hello,

    Thank you for your inquiry.
    Such an issue is not known to us.
    Are you using the exact same Ozone project and elf file in both setups in Windows and Linux?
    Could you provide a J-Link log file of both sessions?
    wiki.segger.com/Enable_J-Link_log_file

    Could you provide a reproduction project that can be tested on an eval board and runs out of the box?

    We noticed that you registered with a company context but you are using J-Link EDU versions. Please note that a J-Link EDU may not be used in any commercial context as this would be a license violation and thus illegal.
    You can find the terms of use for the J-Link EDU in the daily pop up message or here:

    segger.com/products/debug-probes/j-link/models/j-link-edu/


    For commercial use at least a J-Link Base is required. Could you elaborate how the J-Links are used 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.