Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/github0null/stm8-debug
STM8 Debugger for vscode
https://github.com/github0null/stm8-debug
debug debugger stm8 stm8s swim vscode
Last synced: 26 days ago
JSON representation
STM8 Debugger for vscode
- Host: GitHub
- URL: https://github.com/github0null/stm8-debug
- Owner: github0null
- License: mit
- Created: 2020-05-10T14:45:48.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T17:38:31.000Z (almost 2 years ago)
- Last Synced: 2024-04-28T07:24:51.324Z (8 months ago)
- Topics: debug, debugger, stm8, stm8s, swim, vscode
- Language: TypeScript
- Size: 56.7 MB
- Stars: 10
- Watchers: 3
- Forks: 2
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# STM8 Debugger
## Summary 📑
A STM8 Debugger for vscode. Use STLink to debug your STM8 program
**Only for Windows platform**
***
![preview](./image/show.png)
***
## Usage 📖
### Preparatory work
- Install STLink or RLink driver program on your PC
***
### Start 🏃♀️
1. Fill in `launch.json`, there are some examples:
- **Use IAR/COSMIC Toolchain :**
```json
{
"version": "0.2.0",
"configurations": [
{
"type": "stm8-debug",
"request": "launch",
"name": "Launch Program",
"serverType": "st7",
"executable": ".\\out\\Debug\\stm8_demo.out",
"cpu": "STM8S003F3P"
}
]
}
```- **Use SDCC Toolchain :**
**Notice:** make sure you can find your 'target' and 'interface' in OpenOcd config folder !, like: 'target/stm8s003.cfg'
```json
{
"version": "0.2.0",
"configurations": [
{
"type": "stm8-debug",
"request": "launch",
"name": "Launch Program",
"serverType": "stm8-sdcc",
"executable": ".\\out\\Debug\\stm8_demo.elf",
"openOcdConfigs": [
"interface/stlink.cfg",
"target/stm8s003.cfg"
]
}
]
}
```2. link your STLink and board, press `F5` to launch stm8 debugger
***
## Notice 🚩
- ### The file path must contain only **ASCII** characters
- ### The debugger 'ST7' is not support suspend your program
***
## Peripheral View support
You can browse **cpu peripheral value** by **Peripheral View**, like this:
![peripheral view](./image/peripheral_view.png)
#### built-in peripheral view support
- stm8s103f3
- stm8s003f3
- stm8s105k4#### custom peripheral view support
**Note:** You need to create a new **\.svd.json** file to support a new stm8 cpu.
step 1. create a new **`.svd.json`** file, write peripheral descriptions.
step 2. set **svdFile** property in **launch.json**
***
There is a demo for `stm8s003f3` cpu, file name: `stm8s003f3.svd.json`
```json
[
{
"name": "GPIOA",
"baseAddress": "0x5000",
"registers": [
{
"name": "ODR",
"bytes": 1,
"fields": [
{
"name": "0",
"bitsOffset": 0,
"bitsWidth": 1
}
]
},
{
"name": "IDR",
"bytes": 1
},
{
"name": "DDR",
"bytes": 1
},
{
"name": "CR1",
"bytes": 1
},
{
"name": "CR2",
"bytes": 1
}
]
},
{
"name": "FLASH",
"baseAddress": "0x505A",
"registers": [
{
"name": "CR1",
"bytes": 1
},
{
"name": "CR2",
"bytes": 1
},
{
"name": "NCR2",
"bytes": 1
},
{
"name": "FPR",
"bytes": 1
},
{
"name": "NFPR",
"bytes": 1
},
{
"name": "IAPSR",
"bytes": 1
},
{
"name": "PUKR",
"baseAddress": "0x5062",
"bytes": 1
},
{
"name": "DUKR",
"baseAddress": "0x5064",
"bytes": 1
}
]
}
]
```## Feedback 💡
[forum: https://discuss.em-ide.com/t/stm8-debug](https://discuss.em-ide.com/t/stm8-debug)