Fix platformio.ini to use SVD file

For some reason, SVD files specified in the board.json are relative to the vscode path, but the ones specified in platform.io are relative to the project path. Specify the SVD in platformio.ini to use it.
This commit is contained in:
true 2023-10-21 07:32:48 -07:00
parent f110ffe1a7
commit 23bb69096f
1 changed files with 37 additions and 11 deletions

View File

@ -13,6 +13,7 @@ platform = nxplpc ; not actually this and we are not using
; setting platform = nxplpc makes everything happy ; setting platform = nxplpc makes everything happy
; as we'll get nano specs and any other needed shit ; as we'll get nano specs and any other needed shit
board = generic_py32f030x6 board = generic_py32f030x6
board_build.ldscript = py32f030x6.ld
debug_tool = custom ; built-in pyocd support does not allow config file override debug_tool = custom ; built-in pyocd support does not allow config file override
debug_server = $PYTHONEXE debug_server = $PYTHONEXE
@ -25,17 +26,23 @@ debug_server = $PYTHONEXE
debug_extra_cmds = debug_extra_cmds =
set mem inaccessible-by-default off set mem inaccessible-by-default off
debug_svd_path = misc/svd/py32f030xx.svd
upload_protocol = custom upload_protocol = custom
upload_command = $PYTHONEXE ${platformio.packages_dir}/tool-pyocd/pyocd-flashtool.py --config $PROJECT_DIR/pyocd.yaml -t PY32F030x6 $SOURCE upload_command = $PYTHONEXE ${platformio.packages_dir}/tool-pyocd/pyocd-flashtool.py --config $PROJECT_DIR/pyocd.yaml -t PY32F030x6 $SOURCE
platform_packages = platform_packages =
toolchain-gccarmnoneeabi@1.100301.220327 ; build issues with GCC12, use GCC10 for now toolchain-gccarmnoneeabi@1.100301.220327 ; build issues with GCC12, use GCC10 for now
tool-pyocd ; user won't have to install it tool-pyocd ; include pyocd so user won't have to install it
[env:sc7-testobot-py32f-dbg_pyocd] [common]
build_type = debug build_flags =
board_build.ldscript = py32f030x6.ld -Wl,-Map=.pio/output_rel.map
-DUSE_FULL_LL_DRIVER
-L.
-Os
-std=gnu11
debug_build_flags = debug_build_flags =
-Wl,-Map=.pio/output_dbg.map -Wl,-Map=.pio/output_dbg.map
@ -47,14 +54,33 @@ debug_build_flags =
-g -g
[env:sc7-testobot-py32f-rel_bl] [env:sc7-testobot_REV1-py32f-dbg_pyocd]
build_type = debug
debug_build_flags = ${common.debug_build_flags}
-DTESTO_REV1
[env:sc7-testobot_REV2-py32f-dbg_pyocd]
build_type = debug
debug_build_flags = ${common.debug_build_flags}
-DTESTO_REV2
[env:sc7-testobot_REV1-py32f-rel_bl]
build_type = release build_type = release
board_build.ldscript = py32f030x6_bl.ld board_build.ldscript = py32f030x6_bl.ld
board_upload.maximum_size = 30720 ; 2K reserved for bootloader board_upload.maximum_size = 30720 ; 2K reserved for bootloader
build_flags = build_flags = ${common.build_flags}
-Wl,-Map=.pio/output_rel.map -DTESTO_REV1
-DUSE_FULL_LL_DRIVER
-L.
-Os [env:sc7-testobot_REV2-py32f-rel_bl]
-std=gnu11 build_type = release
board_build.ldscript = py32f030x6_bl.ld
board_upload.maximum_size = 30720 ; 2K reserved for bootloader
build_flags = ${common.build_flags}
-DTESTO_REV2