Skip to content

Commit

Permalink
Merge pull request #10 from eclipse-cdt-cloud/update
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
thegecko authored Oct 21, 2023
2 parents 7f2dd7f + 86e1554 commit f806f20
Show file tree
Hide file tree
Showing 30 changed files with 951 additions and 1,574 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ assignees: ''
---

<!-- Prior to creating a bug report, please review
existing issues at https://github.com/cortex-debug/svd-viewer/issues
existing issues at https://github.com/eclipse-cdt-cloud/vscode-svd-viewer/issues
to avoid creating duplicates.
-->

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ assignees: ''
Type: Feature Request

<!-- Prior to creating a feature request, please review
existing issues at https://github.com/cortex-debug/svd-viewer/issues
existing issues at https://github.com/eclipse-cdt-cloud/vscode-svd-viewer/issues
to avoid creating duplicates.
-->

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
node-version: 14.x
- name: Publish
run: |
npx ovsx@0.8.0 publish -i artifacts/*/*.vsix -p ${{secrets.OPEN_VSX_TOKEN}}
npx ovsx publish -i artifacts/*/*.vsix -p ${{secrets.OPEN_VSX_TOKEN}}
publish-vscode-marketplace:
needs: build
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## [v1.1.3] - 2023-10-21

### New Features

- Synced with peripheral-viewer

## [v1.1.1] - 2023-01-30

### New Features
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Standalone SVD Viewer extension extracted from [cortex-debug](https://github.com

The SVD Viewer extension uses [System View Description](http://www.keil.com/pack/doc/CMSIS/SVD/html/index.html) (SVD) files to display information about the selected part, including the Cortex Peripherals view.

Choose one of the following methods to specify your SVD file in your launch configuration:
Choose one of the following methods to specify your SVD file in your `launch.json` configuration(s):

### Use the CMSIS pack asset service

Expand Down
Binary file removed images/icon.png
Binary file not shown.
Binary file added media/cdtcloud.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 27 additions & 33 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,26 @@
"name": "svd-viewer",
"displayName": "SVD Viewer",
"description": "Standalone SVD Viewer extension extracted from cortex-debug",
"version": "1.2.3",
"version": "1.3.0",
"preview": true,
"publisher": "cortex-debug",
"author": "Rob Moran <[email protected]>",
"publisher": "eclipse-cdt",
"author": "marus25",
"contributors": [
{
"name": "Rob Moran",
"email": "[email protected]",
"url": "https://github.com/thegecko"
},
{
"name": "haneefdm"
}
],
"license": "MIT",
"main": "dist/desktop/extension.js",
"browser": "dist/browser/extension.js",
"repository": "https://github.com/cortex-debug/svd-viewer",
"qna": "https://github.com/cortex-debug/svd-viewer/issues",
"icon": "images/icon.png",
"repository": "https://github.com/eclipse-cdt-cloud/vscode-svd-viewer",
"qna": "https://github.com/eclipse-cdt-cloud/vscode-svd-viewer/issues",
"icon": "media/cdtcloud.png",
"engines": {
"vscode": "^1.63.2"
},
Expand All @@ -25,7 +35,6 @@
"watch": "webpack -w",
"lint": "eslint . --ext .ts,.tsx",
"package": "vsce package --yarn",
"browser": "vscode-test-web --extensionDevelopmentPath=.",
"serve": "serve --cors -p 9000"
},
"dependencies": {
Expand All @@ -37,19 +46,18 @@
"@types/node": "^12.20.0",
"@types/vscode": "^1.63.2",
"@types/xml2js": "^0.4.9",
"@typescript-eslint/eslint-plugin": "^4.28.0",
"@typescript-eslint/parser": "^4.28.0",
"@vscode/test-web": "^0.0.24",
"@typescript-eslint/eslint-plugin": "^5.49.0",
"@typescript-eslint/parser": "^5.49.0",
"@vscode/debugprotocol": "^1.59.0",
"@vscode/vsce": "^2.17.0",
"buffer": "^6.0.3",
"eslint": "^7.29.0",
"eslint": "^8.33.0",
"path-browserify": "1.0.1",
"serve": "^14.0.1",
"stream-browserify": "^3.0.0",
"timers-browserify": "^2.0.12",
"ts-loader": "^9.2.6",
"typescript": "^3.9.6",
"vsce": "^2.6.4",
"vscode-debugprotocol": "^1.51.0",
"typescript": "^4.9.4",
"webpack": "^5.70.0",
"webpack-cli": "4.9.1"
},
Expand Down Expand Up @@ -98,11 +106,6 @@
"command": "svd-viewer.svd.refreshAll",
"title": "Refresh All",
"icon": "$(refresh)"
},
{
"command": "svd-viewer.svd.collapseAll",
"title": "Collapse All",
"icon": "$(collapse-all)"
}
],
"menus": {
Expand Down Expand Up @@ -134,10 +137,6 @@
{
"command": "svd-viewer.svd.refreshAll",
"when": "false"
},
{
"command": "svd-viewer.svd.collapseAll",
"when": "false"
}
],
"touchBar": [
Expand Down Expand Up @@ -171,11 +170,6 @@
"command": "svd-viewer.svd.refreshAll",
"when": "view == svd-viewer.svd && debugState == stopped",
"group": "navigation"
},
{
"command": "svd-viewer.svd.collapseAll",
"when": "view == svd-viewer.svd",
"group": "navigation"
}
],
"view/item/context": [
Expand All @@ -195,13 +189,13 @@
"group": "inline"
},
{
"command": "svd-viewer.svd.updateNode",
"when": "view == svd-viewer.svd && viewItem == registerWO",
"command": "svd-viewer.svd.copyValue",
"when": "view == svd-viewer.svd && viewItem == field",
"group": "inline"
},
{
"command": "svd-viewer.svd.copyValue",
"when": "view == svd-viewer.svd && viewItem == field",
"when": "view == svd-viewer.svd && viewItem == fieldRO",
"group": "inline"
},
{
Expand Down Expand Up @@ -271,7 +265,7 @@
},
"svd-viewer.packAssetUrl": {
"type": "string",
"default": "https://pack-asset-service.keil.arm.com",
"default": "https://pack-content.cmsis.io",
"description": "Base URL for CMSIS pack assets"
},
"svd-viewer.svdAddrGapThreshold": {
Expand All @@ -284,7 +278,7 @@
},
"svd-viewer.saveLayout": {
"type": "boolean",
"default": false,
"default": true,
"description": "Save layout of peripheral view between sessions"
}
}
Expand Down
21 changes: 5 additions & 16 deletions src/addrranges.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
/*
* Copyright 2017-2019 Marcel Ball
* https://github.com/Marus/cortex-debug
/********************************************************************************
* Copyright (C) 2023 Marcel Ball, Arm Limited and others.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without
* limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
* Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
* TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
* This program and the accompanying materials are made available under the
* terms of the MIT License as outlined in the LICENSE File
********************************************************************************/

export class AddrRange {
constructor(public base: number, public length: number) {
Expand Down
13 changes: 8 additions & 5 deletions src/browser/extension.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* Copyright (C) 2023 Arm Limited
*/
/********************************************************************************
* Copyright (C) 2023 Marcel Ball, Arm Limited and others.
*
* This program and the accompanying materials are made available under the
* terms of the MIT License as outlined in the LICENSE File
********************************************************************************/

import * as vscode from 'vscode';
import { PeripheralTreeProvider } from '../views/peripheral';
Expand All @@ -13,11 +16,11 @@ export const activate = async (context: vscode.ExtensionContext): Promise<SvdReg
const tracker = new DebugTracker();
const registry = new SvdRegistry();
const resolver = new SvdResolver(registry);
const peripheralTree = new PeripheralTreeProvider(tracker, resolver);
const peripheralTree = new PeripheralTreeProvider(tracker, resolver, context);
const commands = new Commands(peripheralTree);

await tracker.activate(context);
await peripheralTree.activate(context);
await peripheralTree.activate();
await commands.activate(context);

return registry;
Expand Down
9 changes: 6 additions & 3 deletions src/cmsis-pack/pack-utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* Copyright (C) 2023 Arm Limited
*/
/********************************************************************************
* Copyright (C) 2023 Marcel Ball, Arm Limited and others.
*
* This program and the accompanying materials are made available under the
* terms of the MIT License as outlined in the LICENSE File
********************************************************************************/

import * as vscode from 'vscode';

Expand Down
9 changes: 6 additions & 3 deletions src/cmsis-pack/pdsc.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* Copyright (C) 2023 Arm Limited
*/
/********************************************************************************
* Copyright (C) 2023 Marcel Ball, Arm Limited and others.
*
* This program and the accompanying materials are made available under the
* terms of the MIT License as outlined in the LICENSE File
********************************************************************************/

/**
* Interface describing raw PDSC data returned from xml2js
Expand Down
28 changes: 6 additions & 22 deletions src/commands.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
/*
* Copyright 2017-2019 Marcel Ball
* https://github.com/Marus/cortex-debug
/********************************************************************************
* Copyright (C) 2023 Marcel Ball, Arm Limited and others.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without
* limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
* Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
* TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
* This program and the accompanying materials are made available under the
* terms of the MIT License as outlined in the LICENSE File
********************************************************************************/

import * as vscode from 'vscode';
import * as manifest from './manifest';
Expand All @@ -35,7 +24,6 @@ export class Commands {
vscode.commands.registerCommand(`${manifest.PACKAGE_NAME}.svd.pin`, node => this.peripheralsTogglePin(node)),
vscode.commands.registerCommand(`${manifest.PACKAGE_NAME}.svd.unpin`, node => this.peripheralsTogglePin(node)),
vscode.commands.registerCommand(`${manifest.PACKAGE_NAME}.svd.refreshAll`, () => this.peripheralsForceRefresh()),
vscode.commands.registerCommand(`${manifest.PACKAGE_NAME}.svd.collapseAll`, () => this.peripheralsCollapseAll())
);
}

Expand All @@ -46,7 +34,7 @@ export class Commands {
this.peripheralsForceRefresh();
}
} catch (error) {
vscode.window.showErrorMessage(`Unable to update value: ${(error as Error).message}`);
vscode.debug.activeDebugConsole.appendLine(`Unable to update value: ${(error as Error).message}`);
}
}

Expand Down Expand Up @@ -83,10 +71,6 @@ export class Commands {
}
}

private peripheralsCollapseAll(): void {
this.peripheralProvider.collapseAll();
}

private peripheralsTogglePin(node: PeripheralBaseNode): void {
this.peripheralProvider.togglePinPeripheral(node);
this.peripheralProvider.refresh();
Expand Down
21 changes: 5 additions & 16 deletions src/common.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
/*
* Copyright 2017-2019 Marcel Ball
* https://github.com/Marus/cortex-debug
/********************************************************************************
* Copyright (C) 2023 Marcel Ball, Arm Limited and others.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without
* limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
* Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
* TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
* This program and the accompanying materials are made available under the
* terms of the MIT License as outlined in the LICENSE File
********************************************************************************/

export enum NumberFormat {
Auto = 0,
Expand Down
9 changes: 6 additions & 3 deletions src/debug-tracker.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* Copyright (C) 2023 Arm Limited
*/
/********************************************************************************
* Copyright (C) 2023 Marcel Ball, Arm Limited and others.
*
* This program and the accompanying materials are made available under the
* terms of the MIT License as outlined in the LICENSE File
********************************************************************************/

import * as vscode from 'vscode';

Expand Down
13 changes: 8 additions & 5 deletions src/desktop/extension.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* Copyright (C) 2023 Arm Limited
*/
/********************************************************************************
* Copyright (C) 2023 Marcel Ball, Arm Limited and others.
*
* This program and the accompanying materials are made available under the
* terms of the MIT License as outlined in the LICENSE File
********************************************************************************/

import * as vscode from 'vscode';
import { PeripheralTreeProvider } from '../views/peripheral';
Expand All @@ -13,11 +16,11 @@ export const activate = async (context: vscode.ExtensionContext): Promise<SvdReg
const tracker = new DebugTracker();
const registry = new SvdRegistry();
const resolver = new SvdResolver(registry);
const peripheralTree = new PeripheralTreeProvider(tracker, resolver);
const peripheralTree = new PeripheralTreeProvider(tracker, resolver, context);
const commands = new Commands(peripheralTree);

await tracker.activate(context);
await peripheralTree.activate(context);
await peripheralTree.activate();
await commands.activate(context);

return registry;
Expand Down
Loading

0 comments on commit f806f20

Please sign in to comment.