Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to start debugging. No process is associated with this object. #29

Open
escherstair opened this issue Dec 6, 2023 · 12 comments
Open

Comments

@escherstair
Copy link

I imported the project \boards\evkmimx8mp\rtos_examples\freertos_hello from the SDK, but I'm not able to debug it.
The only probe connected to my PC is J-Link PLUS Compact, visible under DEBUG PROBES
When I selected Debug for the first time, no prompt are asked to me, and in mcuxpresso-tools.json the following item is set

"debug": {
    "linkserver": {},
    "pemicro": {},
    "segger": {
      "device": "MIMX8ML8xxxKZ_M7"
    }
  },

But after a while, the following popup appears
immagine
Moreover, it seems that Reset debug probe selection has no effect.

In another project \boards\evkmimx8mp\multicore_examples\rpmsg_lite_str_echo_rtos (imported from the SDK), when I selected Debug for the first time, I was aked to select the Device and Cortex-M7 is available.
After I selected it in mcuxpresso-tools.json the following item is set

"debug": {
    "linkserver": {},
    "pemicro": {},
    "segger": {
      "device": "Cortex-M7"
    }
  },

I can debug this project successfully.

Any idea on the reason?

@cristitep-nxp
Copy link
Contributor

Hi,

We are looking into the issue, we'll come back with an answer.

Regards,
Cristian

@cristitep-nxp
Copy link
Contributor

Hi,

We couldn't reproduce the issue, we were able to debug this target. The only difference in our environment is that we tried on JLink Plus, we don't have in this moment a Compact type. Can you please go to launch.json in Settings and set to "true" the "engineLogging" property then to redo all the steps until you get the error and send us the resulted log in Debug Console?

Regards,
Cristian

@escherstair
Copy link
Author

escherstair commented Jan 19, 2024

Hi @cristitep-nxp
here is the log
debug_console_log.txt

@asteriskSF
Copy link

I also encounter this issue frequently. Restarting vscode makes the problem go away.

@escherstair
Copy link
Author

In case it helps, this is the official documentation from Segger on how to configure launch.json to debug the target using J-Link probe.

@asteriskSF
Copy link

Where do I find the svd files? I've been debugging without them and I have no view of the peripherals. The plug-ins from other vendors automatically select the svd, not sure why MCUxpresso hasn't done so..

@DerekSnell
Copy link

Hi @asteriskSF ,
SVD files are included in an MCUXpresso SDK package for a device or a board. The files have .xml extensions. You can also find them in the MCUXpresso SVD repo.

For more details, please see the Lab Guide for Zephyr Debugging with VS Code for more details.

Best regards

@asteriskSF
Copy link

@DerekSnell is there a recommended place to put these in a west based zephyr project? I see there is a already a module for nxp's hal in modules/hal/nxp...

@DerekSnell
Copy link

Hi @asteriskSF ,
When using the MCUXpresso extension for VS Code with a project based on the MCUXpresso SDK, the SVD file will automatically be setup in the JSON file for the debugger.

When debugging a Zephyr project, today the SVD file is not setup automatically. You must download the SVD file locally, and manually modify the JSON file to include that SVD. In that case, the location of the SVD file is not important. It is not included in the build, and you just need to tell the debugger where to find it. Personally, I like to include the SVD file in my application repo, so it is easily available when that repo is cloned.

Best regards

@asteriskSF
Copy link

Thanks @DerekSnell to make this consistent for the other developer on my team, I added the nxp-mcuxpresso repository into our west.yml in our out-of-tree repository,

For anyone else interested, these are the modifications to my west.yml

  remotes:
    - name: nxp-mcuxpresso
      url-base: https://github.com/nxp-mcuxpress

  projects:
    - name: mcux-soc-svd 
      remote: nxp-mcuxpresso
      revision: main

Then in my app/.vscode/launch.json I have an absolute path to the svd file, perhaps this could work with a relative path..
Here is my launch.json:

{
  "configurations": [
    {
      "type": "cppdbg",
      "name": "Debug project configuration",
      "request": "launch",
      "cwd": "${workspaceRoot}",
      "MIMode": "gdb",
      "setupCommands": [
        {"text": "set remotetimeout 600"},
        {"text": "set debug-file-directory"}
      ],
      "program": "",
      "miDebuggerServerAddress": "", // Remote GDB server address. If this is provided, "debugServerPath" will not be auto-completed.
      "variables": {
        "mcuxStopAtSymbol": "main", // Initial breakpoint
        "mcuxSerialNumber": "727866252", // Probe serial number. If not specified, the one from the selected debug probe (in extension view) will be used.
        "mcuxAttach": "false", // Start debug in attach mode
        "mcuxRemoteProbeType": "", // Remote Probe Type ("LinkServer", "SEGGER", "PEmicro") used only when connecting to a remote server
      },
      "svdPath": "d:/zrtos_workspace/mcux-soc-svd/MIMXRT1062/MIMXRT1062.xml",
      "logging": {
        "engineLogging": false
      }
    }
  ]
}

@asteriskSF
Copy link

@DerekSnell Can you advise how to get correct kconfig generated preprocessor macros to be used for syntax highlighting of source files in VSCoce with MCUXpresso for VSCode?

@DerekSnell
Copy link

@DerekSnell Can you advise how to get correct kconfig generated preprocessor macros to be used for syntax highlighting of source files in VSCoce with MCUXpresso for VSCode?

Hi @asteriskSF ,
Thank you for creating a new issue for this topic at #39. With these forum posts, it is best to create a new issue for each topic. It helps clarify when an issue is resolved, and also makes it easier for others to find existing discussions when they search.

The NXP team will address your question at #39. Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants