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

Adds some missing PEMicro GDB server functionality #989

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions debug_attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,29 @@ If the type is marked as `{...}` it means that it is a complex item can have mul
| overrideLaunchCommands | string[] | Launch | You can use this to property to override the commands that are normally executed as part of flashing and launching the target. In most cases it is preferable to use preLaunchCommands and postLaunchCommands to customize the GDB launch sequence. |
| overrideResetCommands | string[] | Both | You can use this to property to override the commands that are normally executed as part of reset the target. When not defined this will have the same value of overrideRestartCommands. In most cases it is preferable to use preResetCommands and postResetCommands to customize the GDB reset sequence. |
| overrideRestartCommands | string[] | Both | You can use this to property to override the commands that are normally executed as part of restarting the target. In most cases it is preferable to use preRestartCommands and postRestartCommands to customize the GDB restart sequence. |
| pemicro | object | Both | PEMicro GDB server specific configuration |
| pemicro<br>.exception_catching | object | Both | Set catching of hardware exceptions |
| pemicro<br>.exception_catching<br>.busfault | boolean | Both | Enable BusFault Catch |
| pemicro<br>.exception_catching<br>.checking_error | boolean | Both | Enable Checking Error Catch |
| pemicro<br>.exception_catching<br>.exception_entry_or_return | boolean | Both | Enable Exception Entry/Return Catch |
| pemicro<br>.exception_catching<br>.hardfault | boolean | Both | Enable HardFault Catch |
| pemicro<br>.exception_catching<br>.memmanage | boolean | Both | Enable MemManage Catch |
| pemicro<br>.exception_catching<br>.no_coprocessor | boolean | Both | Enable No-Coproessor Catch |
| pemicro<br>.exception_catching<br>.reset_vector | boolean | Both | Enable Reset Vector Catch |
| pemicro<br>.exception_catching<br>.state_info_error | boolean | Both | Enable StateInformation Error Catch |
| pemicro<br>.preserve_ranges | object | Both | Allows setting up to 3 memory areas to retain during reflashing |
| pemicro<br>.preserve_ranges<br>.preserve0 | object | Both | Memory area 0 conf |
| pemicro<br>.preserve_ranges<br>.preserve0<br>.enable | boolean | Both | Set to true to retain data in memory area |
| pemicro<br>.preserve_ranges<br>.preserve0<br>.start | number | Both | Start address of memory range |
| pemicro<br>.preserve_ranges<br>.preserve0<br>.stop | number | Both | End address of memory range |
| pemicro<br>.preserve_ranges<br>.preserve1 | object | Both | Memory area 1 conf |
| pemicro<br>.preserve_ranges<br>.preserve1<br>.enable | boolean | Both | Set to true to retain data in memory area |
| pemicro<br>.preserve_ranges<br>.preserve1<br>.start | number | Both | Start address of memory range |
| pemicro<br>.preserve_ranges<br>.preserve1<br>.stop | number | Both | End address of memory range |
| pemicro<br>.preserve_ranges<br>.preserve2 | object | Both | Memory area 2 conf |
| pemicro<br>.preserve_ranges<br>.preserve2<br>.enable | boolean | Both | Set to true to retain data in memory area |
| pemicro<br>.preserve_ranges<br>.preserve2<br>.start | number | Both | Start address of memory range |
| pemicro<br>.preserve_ranges<br>.preserve2<br>.stop | number | Both | End address of memory range |
| postAttachCommands | string[] | Attach | Additional GDB Commands to be executed after the main attach sequence has finished. |
| postLaunchCommands | string[] | Launch | Additional GDB Commands to be executed after the main launch sequence has finished. |
| postResetCommands | string[] | Both | Additional GDB Commands to be executed at the end of the reset sequence. When not defined this will have the same value of postRestartCommands. |
Expand Down
21 changes: 12 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

173 changes: 172 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,56 @@
"samplesPerSecond": 4
}
},
"pemicro": {
"properties":{
"exception_catching":{
"properties": {
"hardfault": {
"type":"boolean",
"default" : true,
"description": "Enable HardFault Catch"
},
"exception_entry_or_return": {
"type":"boolean",
"default" : true,
"description": "Enable Exception Entry/Return Catch"
},
"busfault": {
"type":"boolean",
"default" : true,
"description": "Enable BusFault Catch"
},
"state_info_error": {
"type":"boolean",
"default" : true,
"description": "Enable StateInformation Error Catch"
},
"checking_error": {
"type":"boolean",
"default" : true,
"description": "Enable Checking Error Catch"
},
"no_coprocessor": {
"type":"boolean",
"default" : true,
"description": "Enable No-Coproessor Catch"
},
"memmanage": {
"type":"boolean",
"default" : true,
"description": "Enable MemManage Catch"
},
"reset_vector": {
"type":"boolean",
"default" : true,
"description": "Enable Reset Vector Catch"
}
},
"description": "Set catching of hardware exceptions"
}
},
"description": "PEMicro GDB server specific configuration"
},
"chainedConfigurations": {
"description": "An object describing how additional configurations should be launched",
"properties": {
Expand Down Expand Up @@ -1632,6 +1682,127 @@
"external"
]
},
"pemicro": {
"properties":{
"preserve_ranges": {
"properties" : {
"preserve0" : {
"properties" :{
"enable": {
"type": "boolean",
"description": "Set to true to retain data in memory area"
},
"start": {
"type": "number",
"description": "Start address of memory range"
},
"stop":{
"type": "number",
"description": "End address of memory range"
}
},
"description": "Memory area 0 conf",
"default": {
"enable": false,
"start":0,
"stop":0
}
},
"preserve1" : {
"properties" :{
"enable": {
"type": "boolean",
"description": "Set to true to retain data in memory area"
},
"start": {
"type": "number",
"description": "Start address of memory range"
},
"stop":{
"type": "number",
"description": "End address of memory range"
}
},
"description": "Memory area 1 conf",
"default": {
"enable": false,
"start":0,
"stop":0
}
},
"preserve2" : {
"properties" :{
"enable": {
"type": "boolean",
"description": "Set to true to retain data in memory area"
},
"start": {
"type": "number",
"description": "Start address of memory range"
},
"stop":{
"type": "number",
"description": "End address of memory range"
}
},
"description": "Memory area 2 conf",
"default": {
"enable": false,
"start":0,
"stop":0
}
}
},
"description": "Allows setting up to 3 memory areas to retain during reflashing"
},
"exception_catching":{
"properties": {
"hardfault": {
"type":"boolean",
"default" : true,
"description": "Enable HardFault Catch"
},
"exception_entry_or_return": {
"type":"boolean",
"default" : true,
"description": "Enable Exception Entry/Return Catch"
},
"busfault": {
"type":"boolean",
"default" : true,
"description": "Enable BusFault Catch"
},
"state_info_error": {
"type":"boolean",
"default" : true,
"description": "Enable StateInformation Error Catch"
},
"checking_error": {
"type":"boolean",
"default" : true,
"description": "Enable Checking Error Catch"
},
"no_coprocessor": {
"type":"boolean",
"default" : true,
"description": "Enable No-Coproessor Catch"
},
"memmanage": {
"type":"boolean",
"default" : true,
"description": "Enable MemManage Catch"
},
"reset_vector": {
"type":"boolean",
"default" : true,
"description": "Enable Reset Vector Catch"
}
},
"description": "Set catching of hardware exceptions"
}
},
"description": "PEMicro GDB server specific configuration"
},
"cwd": {
"description": "Directory to run commands from",
"type": "string"
Expand Down Expand Up @@ -3033,6 +3204,6 @@
"test-compile": "tsc -p ./",
"package": "node ./release.js --package",
"publish": "node ./release.js --publish --vsx-also",
"lint": "./node_modules/tslint/bin/tslint --project ."
"lint": "node ./node_modules/tslint/bin/tslint --project ."
}
}
31 changes: 31 additions & 0 deletions src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,37 @@ export interface ConfigurationArguments extends DebugProtocol.LaunchRequestArgum
cpu: string;
machine: string;

// PEMicro specific
pemicro: {
preserve_ranges: {
preserve0: {
enable: boolean,
start: number,
stop: number
},
preserve1: {
enable: boolean,
start: number,
stop: number
},
preserve2: {
enable: boolean,
start: number,
stop: number
}
},
exception_catching: {
hardfault: boolean,
exception_entry_or_return: boolean,
busfault: boolean,
state_info_error: boolean,
checking_error: boolean,
no_coprocessor: boolean,
memmanage: boolean,
reset_vector: boolean
}
};

// External
gdbTarget: string;
}
Expand Down
Loading