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

Handling of Debugger Configuration #1947

Open
ReinhardKeil opened this issue Feb 6, 2025 · 4 comments
Open

Handling of Debugger Configuration #1947

ReinhardKeil opened this issue Feb 6, 2025 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@ReinhardKeil
Copy link
Collaborator

ReinhardKeil commented Feb 6, 2025

How to get parameters for the Debugger?

CMSIS-Pack Content

DFP: debug-config contains default connection parameters for a device.

BSP: debug-probe contains debugger information for a board.

Initial implementation

Expose this information in *.cbuild-run.yml under debugger: node.

Example:

debugger:
  name: CMSIS-DAP     # name from BSP, if not known use "<default>"
  port: jtag          # value from BSP (debugLink), if not present from DFP (default)
  clock: 10000000     # value from BSP (debugClock), if not present from DFP (clock)
  dbgconf: RTE/Device/lpc4300/lpc4300.dbgconf   # described in #1946

For dbgconf see #1946

Debugger Information in csolution.yml

This information could be also supplied in a csolution.yml file with a debugger: node.

debugger: Content
- name: Required Identifies the debug configuration.
    info: Optional Brief description of the connection
    port: Optional Selected debug port (jtag or swd).
    clock: Optional Selected debug clock speed.
    dbgconf: Optional Debugger configuration file (pinout, trace).

With this information *.cbuild-run.yml contains

Example:

debugger:
  - name: CMSIS-DAP     # name of csolution, if not given name from BSP, if not known use "<default>"
    info:               # value of csolution
    port: jtag          # value of csolution, if not given value from BSP (debugLink), if not present from DFP (default)
    clock: 10000000     # value of csolution, if not given value from BSP (debugClock), if not present from DFP (clock)
    dbgconf: RTE/Device/lpc4300/lpc4300.dbgconf  #  value of csolution, if not given as describe in #1946 

Usage of debugger information

The following are potential ways to use this debugger information:

  1. Expose all potential debuggers in cbuild-run.yml. Depending on the name, the debugger uses a configuration
    - If the connected debugger is not known, specified the debugger to use on the command-line of the debugger.
  2. Select the debugger at csolution level with nodes under target-type: or command line option on cbuild.

My preference is (1).

@ReinhardKeil ReinhardKeil added the enhancement New feature or request label Feb 6, 2025
@ReinhardKeil
Copy link
Collaborator Author

ReinhardKeil commented Feb 11, 2025

@brondani this is a revised specification with for-context: and not-for-context:.

All debugger: configurations that apply to a context should be in *.cbuild-run.yml

@brondani
Copy link
Collaborator

@ReinhardKeil, @jreineckearm
Concerning the port: possible values, can we safely restrict the schema to jtag and swd or should we also expect that in DFPs it can be set to cjtag as listed in the following table?
https://open-cmsis-pack.github.io/Open-CMSIS-Pack-Spec/main/html/pdsc_family_pg.html#DebugProtocolEnum

@jreineckearm
Copy link

jreineckearm commented Feb 12, 2025

@brondani , we can ignore cjtag for the time being. We never really supported it in our previous debug units. The majority of devices and boards have jtag and swd ports.

@brondani brondani self-assigned this Feb 12, 2025
@brondani brondani moved this to In Progress in CMSIS-Toolbox 2.8.0 Feb 12, 2025
@ReinhardKeil
Copy link
Collaborator Author

For now we can remove cjtag as we don't see real usage of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

3 participants