Skip to content

Commit db0f029

Browse files
authored
[projmgr] Update debug-adapters registry and schema retrieval workflow
1 parent b622f1e commit db0f029

File tree

4 files changed

+40
-49
lines changed

4 files changed

+40
-49
lines changed

.github/workflows/projmgr.yml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,24 @@ jobs:
111111
retention-days: ${{ needs.setup.outputs.retention_days }}
112112
if-no-files-found: error
113113

114+
- name: Archive projmgr schemas
115+
if: matrix.arch == 'amd64' && matrix.target == 'linux'
116+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
117+
with:
118+
name: projmgr-schemas
119+
path: ./tools/projmgr/schemas
120+
retention-days: ${{ needs.setup.outputs.retention_days }}
121+
if-no-files-found: error
122+
123+
- name: Archive projmgr templates
124+
if: matrix.arch == 'amd64' && matrix.target == 'linux'
125+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
126+
with:
127+
name: projmgr-templates
128+
path: ./tools/projmgr/templates
129+
retention-days: ${{ needs.setup.outputs.retention_days }}
130+
if-no-files-found: error
131+
114132
build-swig:
115133
needs: [ setup, matrix_prep ]
116134
runs-on: ${{ matrix.runs_on }}
@@ -193,8 +211,18 @@ jobs:
193211
run: |
194212
mkdir -p tools/projmgr/distribution/bin tools/projmgr/distribution/lib tools/projmgr/distribution/doc tools/projmgr/distribution/etc
195213
cp tools/projmgr/docs/LICENSE.txt tools/projmgr/distribution/
196-
cp -r tools/projmgr/schemas/* tools/projmgr/distribution/etc/
197-
cp -r tools/projmgr/templates/* tools/projmgr/distribution/etc/
214+
215+
- name: Download projmgr schemas
216+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
217+
with:
218+
name: projmgr-schemas
219+
path: tools/projmgr/distribution/etc/
220+
221+
- name: Download projmgr templates
222+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
223+
with:
224+
name: projmgr-templates
225+
path: tools/projmgr/distribution/etc/
198226

199227
- name: Download projmgr linux-amd64
200228
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0

tools/projmgr/CMakeLists.txt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,17 @@ dump_cmake_project_version()
77

88
configure_file(src/ProductInfo.h.in ProductInfo.h)
99

10-
file(DOWNLOAD
11-
https://raw.githubusercontent.com/Open-CMSIS-Pack/debug-adapter-registry/refs/heads/main/registry/debug-adapters.yml
12-
${CMAKE_CURRENT_SOURCE_DIR}/templates/debug-adapters.yml
10+
# debug adapter registry
11+
include(FetchContent)
12+
FetchContent_Declare(
13+
debug-adapter-registry
14+
DOWNLOAD_EXTRACT_TIMESTAMP ON
15+
URL https://github.com/Open-CMSIS-Pack/debug-adapter-registry/releases/download/v2.11.0/debug-adapter-registry.zip
16+
URL_HASH SHA256=3b65ed965c85ff9665caca5da5f785ec081b7edf7f6a8a0f4512f90f65a00d75
1317
)
18+
FetchContent_MakeAvailable(debug-adapter-registry)
19+
file(COPY ${debug-adapter-registry_SOURCE_DIR}/schemas/debug-adapters.schema.json DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/schemas)
20+
file(COPY ${debug-adapter-registry_SOURCE_DIR}/registry/debug-adapters.yml DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/templates)
1421

1522
# rpc interface
1623
include(FetchContent)

tools/projmgr/schemas/common.schema.json

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2400,35 +2400,6 @@
24002400
"title": "optimize:\nDocumentation: https://open-cmsis-pack.github.io/cmsis-toolbox/YML-Input-Format/#load",
24012401
"description": "Specifies the load mode for the project output or image file.",
24022402
"enum": [ "image+symbols", "symbols", "image", "none" ]
2403-
},
2404-
"DebugAdaptersDescType": {
2405-
"title": "debug-adapters:\nDocumentation: https://open-cmsis-pack.github.io/cmsis-toolbox/build-operation/#debug-adapter-integration",
2406-
"description": "Contains the list of supported debug adapters.",
2407-
"type": "array",
2408-
"uniqueItems": true,
2409-
"items": { "$ref": "#/definitions/DebugAdapterDescType" }
2410-
},
2411-
"DebugAdapterDescType": {
2412-
"type": "object",
2413-
"properties": {
2414-
"name": { "type": "string", "description": "Debugger adapter name." },
2415-
"alias-name": { "type": "array", "items": { "type": "string"}, "description": "List of names (in input node or BSP) that map to this debug adapter." },
2416-
"template": { "type": "string", "description": "Used only by the VS Code CMSIS Solution extension for configuration." },
2417-
"gdbserver": { "type": "null", "description": "Add the gdbserver: node in the cbuild-run.yml file." },
2418-
"defaults": { "$ref": "#/definitions/DebugAdaptersDefaultsType" }
2419-
},
2420-
"additionalProperties": false,
2421-
"required": ["name"]
2422-
},
2423-
"DebugAdaptersDefaultsType": {
2424-
"description": "List of default options to use when not specified in the target-set: node.",
2425-
"type": "object",
2426-
"properties": {
2427-
"port": { "type": "number", "description": "Port number." },
2428-
"protocol": { "enum": [ "jtag", "swd" ], "description": "Selected debug protocol (jtag or swd)." },
2429-
"clock": { "type": "number", "description": "Selected debug clock speed (in Hz)." }
2430-
},
2431-
"additionalProperties": true
24322403
}
24332404
}
24342405
}

tools/projmgr/schemas/debug-adapters.schema.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)