diff --git a/add_nanolib.py b/add_nanolib.py deleted file mode 100644 index a8ff2a0..0000000 --- a/add_nanolib.py +++ /dev/null @@ -1,3 +0,0 @@ -Import("env") -#env.Append(LINKFLAGS=["--specs=nano.specs"]) -env.Append(LINKFLAGS=["--specs=nosys.specs", "--specs=nano.specs"]) \ No newline at end of file diff --git a/platformio.ini b/platformio.ini index 1cb3ee4..fb742b1 100644 --- a/platformio.ini +++ b/platformio.ini @@ -20,17 +20,19 @@ src_dir = Src ;================================================================ [env] -platform_packages = maxgerhardt/framework-spl@2.10301.0 ; Add GD32 support package: globally override framework-spl for all environments +; use new GD32 platform and the bleeding-edge SPL package for it +platform = https://github.com/CommunityGD32Cores/platform-gd32.git +platform_packages = + framework-spl-gd32@https://github.com/CommunityGD32Cores/gd32-pio-spl-package.git ;================================================================ [env:VARIANT_DEBUG] -platform = ststm32 -board = gd32f130c6 +board = genericGD32F130C6 debug_tool = stlink upload_protocol = stlink framework = spl -extra_scripts = add_nanolib.py ; adds nanolib to reduce printf memory foot print +board_build.ldscript = ./GD32F130C6T_FLASH.ld ; Serial Port settings (make sure the COM port is correct) @@ -41,10 +43,6 @@ build_flags = -IInc -ISrc -DUSE_STDPERIPH_DRIVER - -DGD32F130_150 - -T./GD32F130C6T_FLASH.ld - -lc - -lm -g -ggdb -D VARIANT_DEBUG @@ -52,42 +50,32 @@ build_flags = ;================================================================ [env:VARIANT_HOVERCAR] -platform = ststm32 -board = gd32f130c6 +board = genericGD32F130C6 debug_tool = stlink upload_protocol = stlink framework = spl -extra_scripts = add_nanolib.py +board_build.ldscript = ./GD32F130C6T_FLASH.ld build_flags = -IInc -ISrc -DUSE_STDPERIPH_DRIVER - -DGD32F130_150 - -T./GD32F130C6T_FLASH.ld - -lc - -lm -g -ggdb -D VARIANT_HOVERCAR ;================================================================ [env:VARIANT_HOVERBOARD] -platform = ststm32 -board = gd32f130c6 +board = genericGD32F130C6 debug_tool = stlink upload_protocol = stlink framework = spl -extra_scripts = add_nanolib.py +board_build.ldscript = ./GD32F130C6T_FLASH.ld build_flags = -IInc -ISrc -DUSE_STDPERIPH_DRIVER - -DGD32F130_150 - -T./GD32F130C6T_FLASH.ld - -lc - -lm -g -ggdb -D VARIANT_HOVERBOARD