From 34179fa159daffc81dccf62fc7dfe50865ab0869 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 19 Aug 2021 19:57:40 +0200 Subject: [PATCH 1/2] Update PlatformIO build to use new platform --- add_nanolib.py | 3 --- platformio.ini | 32 ++++++++++---------------------- 2 files changed, 10 insertions(+), 25 deletions(-) delete mode 100644 add_nanolib.py 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 From a62ecb63904fec32896f341736caa632ea0ad6d7 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 19 Aug 2021 20:00:19 +0200 Subject: [PATCH 2/2] Remove old boards folder --- boards/gd32f130c6.json | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 boards/gd32f130c6.json diff --git a/boards/gd32f130c6.json b/boards/gd32f130c6.json deleted file mode 100644 index 4c81a33..0000000 --- a/boards/gd32f130c6.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "build": { - "core": "gd32", - "cpu": "cortex-m3", - "extra_flags": "-DGD32F1x0 -DGD32F130_150 -D__GD32F130_SUBFAMILY -D__GD32F1x0_FAMILY", - "f_cpu": "72000000L", - "mcu": "gd32f130c6t6" - }, - "connectivity": [ - ], - "debug": { - "default_tools": [ - "stlink" - ], - "jlink_device": "GD32F130C6", - "onboard_tools": [ - "stlink" - ], - "openocd_target": "stm32f1x", - "svd_path": "STM32F10x.svd" - }, - "frameworks": [ - "stm32cube", - "spl" - ], - "name": "Generic GD32F130C6T6", - "upload": { - "maximum_ram_size": 4096, - "maximum_size": 32768, - "protocol": "stlink", - "protocols": [ - "jlink", - "stlink", - "blackmagic", - "mbed" - ] - }, - "url": "https://www.gigadevice.com/microcontroller/gd32f130c6t6/", - "vendor": "GigaDevices" -}