Skip to content
Snippets Groups Projects
Commit 460a2586 authored by maxgerhardt's avatar maxgerhardt
Browse files

Add PlatformIO support and CI

parent c44321e9
No related branches found
No related tags found
No related merge requests found
name: PlatformIO CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v2
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
uses: actions/setup-python@v4
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Run PlatformIO
run: pio run
.pio
.vscode
......@@ -46,6 +46,10 @@ Currently, it ignores all the respone codes, except when querying the chip. But
Anyone who wants to write a good/nice utility should probably look at the code in this folder.
## VSCode + PlatformIO
This project can also be built, uploaded and debugged with VSCode and the PlatformIO extension. See [here](https://github.com/Community-PIO-CH32V/platform-ch32v) for details.
## Quick Reference
* Needed for programming/debugging: `SWIO` is on `PD1`
* Optional (not needed, can be configured as output if fuse set): `NRST` is on `PD7`
......
; see https://docs.platformio.org/en/latest/projectconf/index.html
[platformio]
src_dir = .
include_dir = .
[env]
platform = https://github.com/Community-PIO-CH32V/platform-ch32v.git
; or genericCH32V003A4M6 or whatever, see platform link
board = ch32v003f4p6_evt_r0
monitor_speed = 115200
board_build.ldscript = ch32v003evt/ch32v003.ld
build_flags = -flto -Ich32v003evt -lgcc
; use a source filter to only build certain folders / files
[env:blink]
build_src_filter = +<ch32v003evt> +<examples/blink>
[env:fulldemo]
build_src_filter = +<ch32v003evt> +<examples/fulldemo>
[env:ws2812demo]
build_src_filter = +<ch32v003evt> +<examples/ws2812demo>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment