Home Topics PyOCD not in Debug Configurations in KDS 3.2.0

Overview Forums NXP KDS and KSDK Software Tools PyOCD not in Debug Configurations in KDS 3.2.0

Tagged: , , ,

This topic contains 20 replies, has 7 voices, and was last updated by  hs4n.mzb 2 years ago.

Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
    Posts
  • #1846

    goldscott
    Participant

    Hello,

    I’m trying to get started with the Hexiwear (watching the Writing Your First Program With Hexiwear youtube video right now) and the PyOCD debug configuration is not listed. How can I get this debug config?

    Thanks!
    Scott

    #1847

    goldscott
    Participant

    Ah, I found the slides for the Software Setup and am going through that process now. You should add links to the slides in the Youtube video description.

    #1848

    goldscott
    Participant

    Ok, I’ve got KDS updated and PyOCD installed.
    I’m getting the following error:
    PyOCD Error

    And the following console output:
    uncaught exception:
    WARNING:root:Failed to load SVD file MK64F12.svd
    INFO:root:DAP SWD MODE initialised
    Traceback (most recent call last):
    File “pyOCD\tools\gdb_server.py”, line 259, in run
    File “pyOCD\board\mbed_board.py”, line 263, in chooseBoard
    File “pyOCD\board\board.py”, line 50, in init
    File “pyOCD\target\target_kinetis.py”, line 58, in init
    File “pyOCD\target\coresight_target.py”, line 75, in init
    File “pyOCD\coresight\dap.py”, line 112, in init
    File “pyOCD\coresight\dap.py”, line 117, in read_id_code
    File “pyOCD\coresight\dap.py”, line 130, in read_reg
    File “pyOCD\coresight\dap.py”, line 186, in readDP
    File “pyOCD\pyDAPAccess\dap_access_usb.py”, line 534, in read_reg
    File “pyOCD\pyDAPAccess\dap_access_usb.py”, line 726, in _write
    File “pyOCD\pyDAPAccess\dap_access_usb.py”, line 473, in flush
    File “pyOCD\pyDAPAccess\dap_access_usb.py”, line 624, in _read_packet
    File “pyOCD\pyDAPAccess\dap_access_usb.py”, line 329, in decode_data
    File “pyOCD\pyDAPAccess\dap_access_usb.py”, line 275, in _decode_transfer_data
    TransferError

    Help please!

    #1849

    goldscott
    Participant

    So I’m at home on a Mac and installed all the tools on OS X. How can I debug on a Mac? The slides for setting up the tools: “Copy into the KDS root folder the executable pyocd-gdbserver.exe available in the folder pyOCD of the HEXIWEAR-master package.” But OS X isn’t going to run an exe… Are there any instructions for OS X?

    #1939

    Uros Cvetinovic
    Moderator

    Hi Scott,

    We have contacted colleagues from NXP, because this is their software.
    We will give you an update on this as soon as we get response.

    Best regards,

    Uros

    #1940

    goldscott
    Participant

    Thanks Uros! I eagerly await.

    #1941

    RSC
    Participant

    Hi Scott,
    I found that the HEXIWEAR_MK64 project in the master zip did not include all the source code required for compiling. Try the HEXIWEAR_OLED or HEXIWEAR_OLED_sensors_RTOS projects instead, I was able to compile/modify those. The debug will try and do a compile first, that’s probably why it’s crashing.
    Scott

    #1942

    goldscott
    Participant

    Hi RSC,

    The code is building just fine. The issue has something to do with launching the debugger with pyocd-gdbserver.exe, according to the error pop-up (see the image in my 3rd post above).

    #1944

    anupam_on
    Participant

    Same issue in linux. I didn’t find any solution for pyOCD executble for linux

    #1955

    goldscott
    Participant

    Any updates from Freescale about getting PyOCD working in windows, linux, and os x?

    #1973

    jayaura
    Participant

    You probably wont get any updates from Freescale. Though I can flash hexiwear in linux. Just that you cant do it through eclipse at the moment:
    0. Install pyocd and any dependencies as mentioned in https://github.com/mbedmicro/pyOCD/
    1. Compile the code with KDS
    2. Go to “Debug” folder inside the project folder (/home/username/workspace.kds/HEXIWEAR_OLED_sensors_RTOS/Debug)
    3. Launch pyocd: “sudo pyocd-flashtool HEXIWEAR_OLED_sensors_RTOS.bin” for flashing

    • This reply was modified 2 years, 11 months ago by  jayaura. Reason: typo
    #1975

    anupam_on
    Participant

    Were you able to debug with pyOCD? Also Hexiwear seems to have errors if imported to kinetis ide in linux. most of them were in header file naming ie. for example if the header file is actually say pyocd.h , in code inclusion as PYOCD.H

    #1976

    jayaura
    Participant

    Yes, I can debug:
    1. run “sudo pyocd-gdbserver” in a terminal and leave it there
    2. Open new terminal, navigate to debug folder of your project
    3. run “arm-none-eabi-gdb filename.elf”
    4. You will get a gdb prompt. Now type “target remote localhost:3333”
    5. Do all you want with gdb.

    #1977

    anupam_on
    Participant

    So nothing like the eclipse in windows? only gdb debug through terminal?

    #1978

    jayaura
    Participant

    Functionality is the same, just without GUI. Until pyOCD or pyusb project finds a fix to make them run without requiring root, or KDS/GNU ARM Eclpise plugin developers finds a way to run the pyocd with sudo when under linux, this would probably stay in this condition.

    • This reply was modified 2 years, 11 months ago by  jayaura.
Viewing 15 posts - 1 through 15 (of 21 total)

You must be logged in to reply to this topic.