diff --git a/CHANGELOG.md b/CHANGELOG.md index fd5e157..de4d048 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,16 @@ # Change Log +## [v1.1.0] - 2023-01-30 + +### New Features + +- Refresh codebase on [cortex-debug#56c03f](https://github.com/Marus/cortex-debug/commit/056c03f01e008828e6527c571ef5c9adaf64083f) (2023-01-23) +- Add support for loading SVD files from CMSIS pack asset API ([Rob Moran](https://github.com/thegecko)) + ## [v1.0.4] - 2022-09-05 ### New Features - Initial standalone release ([Rob Moran](https://github.com/thegecko)) +- Browser support ([Rob Moran](https://github.com/thegecko)) +- Support any debug adapter (using `readMemory` and `writeMemory` DAP commands) ([Rob Moran](https://github.com/thegecko)) diff --git a/LICENSE b/LICENSE index b560e78..fb1ef22 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 2017-2022 Marcel Ball +Copyright 2017-2023 Marcel Ball and Arm Limited 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: diff --git a/README.md b/README.md index f339d95..619cd27 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,79 @@ Standalone SVD Viewer extension extracted from [cortex-debug](https://github.com ## Specifying SVD Files -The Cortex-Debug 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. +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. -To specifying an SVD file, obtain the SVD file from a [CMSIS pack](https://developer.arm.com/tools-and-software/embedded/cmsis/cmsis-packs) or from your device manufacturer. -For instance, for ST use instructions at [this link](https://community.st.com/s/question/0D50X00009XkWDkSAN/how-does-st-manage-svd-files). -Other vendors may ship SVD files when you install their SW or device pack. +Choose one of the following methods to specify your SVD file in your launch configuration: +### Use the CMSIS pack asset service -Once you have the SVD file, specify the location of the file in your `launch.json` using something like `"svdFile": "./STM32F103.svd"`. +Set the `svdPath` configuration variable to a qualified pack reference in the form `::@` e.g.: -You can modify the `SVD Viewer: Svd Path Config` extension setting to specify a different key to use in the `launch.json` for the SVD path. +```json +{ + ... + "svdPath": "NXP::K32L3A60_DFP@15.0.0" + ... +} +``` + +If the pack supports multiple devices and/or processors, you will be prompted to select these. Alternatively, set them in your configuration using the optional `deviceName` and `processorName` variables: + +```json +{ + ... + "svdPath": "NXP::K32L3A60_DFP@15.0.0", + "deviceName": "K32L3A60VPJ1A", + "processorName": "cm4" + ... +} +``` + +__TIP:__ The pack reference and device name can be automatically derived if you use the [Arm Device Manager extension in VS Code](https://marketplace.visualstudio.com/items?itemName=Arm.device-manager) using these commands: + +```json +{ + ... + "svdPath": "${command:device-manager.getDevicePack}", + "deviceName": "${command:device-manager.getDeviceName}" + ... +} +``` + +### Install a Cortex Debug Support Pack + +Find a [Cortex Debug Support Pack](https://marketplace.visualstudio.com/search?term=Cortex-Debug%3A%20Device%20Support%20Pack&target=VSCode&category=All%20categories&sortBy=Relevance) for your device and install it. You can then specify just the `deviceName` variable in your launch configuration: + +```json +{ + ... + "deviceName": "STM32F439BI" + ... +} +``` + +### Specify the path to your SVD file + +You can obtain an SVD file from a [CMSIS pack](https://developer.arm.com/tools-and-software/embedded/cmsis/cmsis-packs) or from your device manufacturer. For example use [these instructions](https://community.st.com/s/question/0D50X00009XkWDkSAN/how-does-st-manage-svd-files) for ST devices. + +Other vendors may ship SVD files when you install their software or device packs or you could write your own custom SVD file. + +Once you have the SVD file, specify the location of it in your `launch.json` using the `svdPath` variable: + +```json +{ + ... + "svdPath": "${workspaceFolder}/STM32F103.svd" + ... +} +``` + +## Settings + +All variable key names used to extract data from debug launch configurations can be modified. This allows variable name clashes to be avoided as well as the need to duplicate configuration entries. + +The following list outlines the setting names and default values: + +- `svd-viewer.svdPathConfig` - Debug configuration key to use to get the SVD path (default `svdPath`) +- `svd-viewer.deviceConfig` - Debug configuration key to use to get the device name (default: `deviceName`) +- `svd-viewer.processorConfig` - Debug configuration key to use to get the processor name (default: `processorName`) diff --git a/package.json b/package.json index 66b0a7a..236dc12 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "svd-viewer", "displayName": "SVD Viewer", "description": "Standalone SVD Viewer extension extracted from cortex-debug", - "version": "1.0.5", + "version": "1.1.0", "preview": true, "publisher": "cortex-debug", "author": "Rob Moran ", @@ -237,7 +237,12 @@ "svd-viewer.processorConfig": { "type": "string", "default": "processorName", - "description": "Debug configuration key to use to get the procerssor name" + "description": "Debug configuration key to use to get the processor name" + }, + "svd-viewer.packAssetUrl": { + "type": "string", + "default": "https://pack-asset-service.keil.arm.com", + "description": "Base URL for CMSIS pack assets" }, "svd-viewer.svdAddrGapThreshold": { "type": "number", @@ -246,11 +251,6 @@ "minimum": -1, "maximum": 32, "description": "If the gap between registers is less than this threshold (multiple of 8), combine into a single read from device. -1 means never combine registers and is very slow" - }, - "svd-viewer.packAssetUrl": { - "type": "string", - "default": "https://pack-asset-service.keil.arm.com", - "description": "Base URL for CMSIS pack assets" } } }