Skip to content

Commit

Permalink
Merge branch 'master' into rtosSupport
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/common.ts
  • Loading branch information
Marus committed Jan 14, 2018
2 parents 34fe414 + 08b57c0 commit 2e77d7e
Show file tree
Hide file tree
Showing 34 changed files with 2,418 additions and 881 deletions.
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{
"version": "0.1.0",
"configurations": [

{
"name": "Launch Extension",
"type": "extensionHost",
Expand Down Expand Up @@ -45,6 +46,21 @@
"cwd": "${workspaceRoot}"
// "preLaunchTask": "npm"
},
{
"name": "PyOCD debug server",
"type": "node",
"request": "launch",
"runtimeArgs": [ "--nolazy" ],
"program": "${workspaceRoot}/src/pyocd.ts",
"stopOnEntry": false,
"args": [ "--server=4711" ],
"sourceMaps": true,
"outFiles": [
"${workspaceRoot}/out/**/*.js"
],
"cwd": "${workspaceRoot}"
// "preLaunchTask": "npm"
},
{
"name": "Launch Tests",
"type": "extensionHost",
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# V0.1.6

* Improved parsing of SVD definitions (registers without fields; repeating registesr (dim, dimInteger, dimIncrement))
* Added initial support for PyOCD GDB Server (SWO not supported)

# V0.1.5

* Initial Public Preview on VS Code Market Place
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
# Cortex Debug

![Visual Studio Code with Cortex-Debug Installed](./images/vs-code-screenshot.png)

Debugging support for ARM Cortex-M Microcontrollers with the following features:

* Supports J-Link or OpenOCD GDB Server
* Cortex Core Register Viewer
* Peripheral Register Viewer (Defined through standard SVD file)
* SWO Deocding - "console" text output and binary data (signed and unsigned 32-bit integers, Q16.16 fixed point integers)
* Currently SWO decoding is not supported when using OpenOCD on Windows
* Live graphing of SWO decoded data.
* SWO Deocding - "console" text output and binary data (signed and unsigned 32-bit integers, Q16.16 fixed point integers, single percision floating point values)
* Currently decoding of ITM Timestamp and Synchronization packets are not supported; these features will need to be disabled in the code for the microcontroller.
* Support for Custom ITM Data Decoders:
* Ability to define JavaScript modules to decode complex data formats streamed over a particular ITM port. Data can be printed to a output window, or sent to the graphing system.
* Live graphing of decoded ITM data.
* Raw Memory Viewer (From the command menu select Cortex-Debug: View Memory)
* Initial support for PyOCD GDB Server (No SWO support for PyOCD)

### In Progress Features
* RTOS/Muti-Threaded Support (Dependant on GDB server support)

### Planned Features

* Additional Graphing Options
* Raw Memory Viewer
* Enhanced SVD Auto-selection
* Support for Black Magic Probe
* SWO Decoding for OpenOCD on Windows
* SWO Decoding for 32-bit floating point number
* Semihosting Support

## Installation

Expand All @@ -27,8 +34,6 @@ Requirements:
* J-Link Software Tools - provides the J-Link GDB Server for J-Link based debuggers (https://www.segger.com/downloads/jlink)
* OpenOCD - provides a GDB Server that can be used with a number of debuggers (http://openocd.org)

The extension is not currently available through the Visual Studio Code Extension Marketplace, to install download the cortex-debug.vsix extension file (from the releases page https://github.com/Marus/cortex-debug/releases) and install using the 'Extensions: Install from VSIX...' command in Visual Studio Code.

## Usage

See https://marcelball.ca/projects/cortex-debug/ for usage information
Expand Down
168 changes: 117 additions & 51 deletions config_base.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,14 @@
"default": 65535,
"description": "Maximum value for the X-Axis"
},
"ports": {
"plots": {
"type": "array",
"items": {
"type": "object",
"properties": {
"number": {
"type": "number",
"minimum": 0,
"maximum": 31,
"description": "The SWO port number",
"default": 0
"graphId": {
"type": "string",
"description": "Graph Data Source Id for the plot."
},
"label": {
"type": "string",
Expand All @@ -88,11 +85,10 @@
}
},
"required": [
"number",
"label"
"graphId"
]
},
"description": "SWO Port configuration. Ports selected must be configured as a \"graph\" format port in the \"swoConfig\" section"
"description": "Plot configurations. Data sources must be configured for \"graph\" (or \"advanced\" with a decoder that sends graph data) in the \"swoConfig\" section"
},
"annotate": {
"type": "boolean",
Expand All @@ -104,7 +100,7 @@
"description": "Label for Graph"
}
},
"required": [ "label", "ports", "minimum", "maximum" ]
"required": [ "label", "plots", "minimum", "maximum" ]
},
{
"type": "object",
Expand All @@ -115,13 +111,13 @@
"x-y-plot"
]
},
"xPort": {
"type": "number",
"description": "SWO Port for the X axis"
"xGraphId": {
"type": "string",
"description": "Graph Data Source Id for the X axis"
},
"yPort": {
"type": "number",
"description": "SWO Port for the Y axis"
"yGraphId": {
"type": "string",
"description": "Graph Data Source Id Port for the Y axis"
},
"label": {
"type": "string",
Expand Down Expand Up @@ -154,8 +150,8 @@
}
},
"required": [
"xPort",
"yPort",
"xGraphId",
"yGraphId",
"label"
]
}
Expand Down Expand Up @@ -184,42 +180,82 @@
"type": "array",
"description": "SWO Port Configuration",
"items": {
"type": "object",
"properties": {
"number": {
"type": "number",
"description": "SWO Port Number",
"minimum": 0,
"maximum": 31
"anyOf": [
{
"type": "object",
"properties": {
"type": { "type": "string", "enum": ["console"] },
"number": { "type": "number", "description": "SWO Port Number", "minimum": 0, "maximum": 31 },
"label": { "type": "string", "description": "A label for the output window." }
},
"required": [ "number" ]
},
"format": {
"type": "string",
"description": "Output format for this port.",
"enum": [
"console",
"binary",
"graph"
]
{
"type": "object",
"properties": {
"type": { "type": "string", "enum": ["binary"] },
"number": { "type": "number", "description": "ITM Port Number", "minimum": 0, "maximum": 31 },
"encoding": {
"type": "string",
"description": "This property is only used for binary and graph output formats.",
"default": "unsigned",
"enum": [
"unsigned",
"signed",
"Q16.16",
"float"
]
},
"scale": {
"type": "number",
"description": "This setting will scale the raw value from the ITM port by the specified value. Can be used, for example, to scale a raw n-bit ADC reading to a voltage value. (e.g to scale a 12-bit ADC reading to a 3.3v scale you would need a scale value of 3.3/4096 = 0.0008056640625",
"default": 1
},
"label": { "type": "string", "description": "A label for the output window." }
},
"required": ["number"]
},
"encoding": {
"type": "string",
"description": "This property is only used for binary and graph output formats.",
"default": "unsigned",
"enum": [
"unsigned",
"signed",
"Q16.16"
]
{
"type": "object",
"properties": {
"type": { "type": "string", "enum": ["graph"] },
"number": { "type": "number", "description": "ITM Port Number", "minimum": 0, "maximum": 31 },
"encoding": {
"type": "string",
"description": "This property is only used for binary and graph output formats.",
"default": "unsigned",
"enum": [
"unsigned",
"signed",
"Q16.16",
"float"
]
},
"scale": {
"type": "number",
"description": "This setting will scale the raw value from the ITM port by the specified value. Can be used, for example, to scale a raw n-bit ADC reading to a voltage value. (e.g to scale a 12-bit ADC reading to a 3.3v scale you would need a scale value of 3.3/4096 = 0.0008056640625",
"default": 1
},
"graphId": {
"type": "string",
"description": "The identifier to use for this data in graph configurations."
}
},
"required": ["number", "graphId"]
},
"scale": {
"type": "number",
"description": "This setting will scale the raw value from the SWO port by the specified value. Can be used, for example, to scale a raw n-bit ADC reading to a voltage value. (e.g to scale a 12-bit ADC reading to a 3.3v scale you would need a scale value of 3.3/4096 = 0.0008056640625",
"default": 1
{
"type": "object",
"properties": {
"type": { "type": "string", "enum": ["advanced"] },
"number": { "type": "number", "description": "ITM Port Number", "minimum": 0, "maximum": 31 },
"decoder": {
"type": "string",
"description": "Path to a javascript module to implement the decoding functionality."
},
"config": { "type": "object", "additionalProperties": true }
},
"required": ["number", "decoder"]
}
},
"required": [
"number",
"format"
]
}
}
Expand Down Expand Up @@ -313,5 +349,35 @@
"required": [],
"properties": {}
}
},
"pyocd-gdb": {
"common": {
"properties": {
"pyocdPath": {
"type": "string",
"description": "Path to the pyocd-gdbserver executable",
"default": "pyocd-gdbserver"
},
"boardId": {
"type": "string",
"description": "Connect to board by board id. Only needed if multiple PyOCD compatible boards are connected."
},
"target": {
"type": "string",
"description": "PyOCD Target identifier. Needed if debugging custom hardware; not needed for official MBed boards.",
"enum": ["kl25z","kl26z","lpc824","k82f25615","lpc11xx_32","kinetis","lpc800","lpc4088qsb","maxwsnenv","kl05z","k64f","lpc1768","lpc4088","lpc4330","max32600mbed","k66f18","w7500","ke18f16","k22f","lpc4088dm","ke15z7","kv11z7","nrf51","nrf52","kv10z7","k20d50m","kl46z","stm32f103rc","kl27z4","kw40z4","cortex_m","lpc11u24","stm32f051","kl02z","ncs36510","kl28z","kl43z4","kw01z4"]
}
},
"required": []
},
"launch": {
"required": [],
"properties": {}
},
"attach": {
"required": [],
"properties": {}
},
"removeProperties": [ "swoConfig", "graphConfig" ]
}
}
2 changes: 1 addition & 1 deletion grapher/main.bundle.js

Large diffs are not rendered by default.

Binary file added images/vs-code-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2e77d7e

Please sign in to comment.