From 7fb2dee523087a940bc28d77f0d0083738f792c2 Mon Sep 17 00:00:00 2001 From: true Date: Tue, 31 Oct 2023 07:46:25 -0700 Subject: [PATCH] platformio.ini and linker script fixups --- platformio.ini | 4 +++- py32f030x6_bl.ld | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/platformio.ini b/platformio.ini index 61fd8a9..450dfac 100644 --- a/platformio.ini +++ b/platformio.ini @@ -15,6 +15,7 @@ platform = nxplpc ; not actually this and we are not using board = generic_py32f030x6 board_build.ldscript = py32f030x6.ld + debug_tool = custom ; built-in pyocd support does not allow config file override debug_server = $PYTHONEXE ${platformio.packages_dir}/tool-pyocd/pyocd-gdbserver.py @@ -22,7 +23,6 @@ debug_server = $PYTHONEXE $PROJECT_DIR/pyocd.yaml -t PY32F030x6 -#debug_port = localhost:3333 debug_extra_cmds = set mem inaccessible-by-default off @@ -74,6 +74,7 @@ board_build.ldscript = py32f030x6_bl.ld board_upload.maximum_size = 30720 ; 2K reserved for bootloader build_flags = ${common.build_flags} + -DBOOTLOADED -DTESTO_REV1 @@ -83,4 +84,5 @@ board_build.ldscript = py32f030x6_bl.ld board_upload.maximum_size = 30720 ; 2K reserved for bootloader build_flags = ${common.build_flags} + -DBOOTLOADED -DTESTO_REV2 \ No newline at end of file diff --git a/py32f030x6_bl.ld b/py32f030x6_bl.ld index e2d6259..f422511 100644 --- a/py32f030x6_bl.ld +++ b/py32f030x6_bl.ld @@ -30,7 +30,7 @@ _Min_Stack_Size = 0x100; /* required amount of stack: 256 bytes */ MEMORY { RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 4K - FLASH (rx) : ORIGIN = 0x08002000, LENGTH = 30K + FLASH (rx) : ORIGIN = 0x08000800, LENGTH = 32K - 2K } /* Define output sections */