From b2435be5236632e41773a26731af2cb4d7eed57b Mon Sep 17 00:00:00 2001 From: Maximilian Gerhardt Date: Fri, 30 Dec 2022 17:27:24 +0100 Subject: [PATCH 01/15] Enable SPL for bluepill --- boards/bluepill_f103c8.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/boards/bluepill_f103c8.json b/boards/bluepill_f103c8.json index 1ab1f8590..1158f994c 100644 --- a/boards/bluepill_f103c8.json +++ b/boards/bluepill_f103c8.json @@ -42,7 +42,8 @@ "cmsis", "libopencm3", "stm32cube", - "zephyr" + "zephyr", + "spl" ], "name": "BluePill F103C8", "upload": { From 6372415feac099e859c4907b8ea4fc95636a1593 Mon Sep 17 00:00:00 2001 From: maxgerhardt Date: Fri, 30 Dec 2022 19:25:40 +0100 Subject: [PATCH 02/15] Update SPL F10x build logic --- builder/frameworks/spl.py | 57 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/builder/frameworks/spl.py b/builder/frameworks/spl.py index 4348d9f8d..545c7b1da 100644 --- a/builder/frameworks/spl.py +++ b/builder/frameworks/spl.py @@ -22,7 +22,7 @@ http://www.st.com/web/en/catalog/tools/FM147/CL1794/SC961/SS1743?sc=stm32embeddedsoftware """ - +import sys from os.path import isdir, isfile, join from string import Template @@ -37,6 +37,7 @@ FRAMEWORK_DIR = platform.get_package_dir("framework-spl") assert isdir(FRAMEWORK_DIR) +mcu = board.get("build.mcu").lower() def get_linker_script(mcu): ldscript = join(FRAMEWORK_DIR, "platformio", @@ -105,6 +106,7 @@ def get_linker_script(mcu): extra_flags = board.get("build.extra_flags", "") src_filter_patterns = ["+<*>"] +cmsis_variant_filter_patterns = ["+<*>"] if "STM32F40_41xxx" in extra_flags: src_filter_patterns += ["-"] if "STM32F427_437xx" in extra_flags: @@ -114,6 +116,43 @@ def get_linker_script(mcu): elif "STM32L1XX_MD" in extra_flags: src_filter_patterns += ["-"] +# generate filer expression for F10x startup file +if mcu.startswith("stm32f10"): + # stm32f10x SPL has 8 possible startup files + # depending on the series (connectivity, low/high/medium/extra-large density or + # "value-line"). + # but, there are no value-line (STM32F100xx) chips in this platform yet. + # we only want to assemble and link the correct one. + # we automatically deduce the correct startup file and identifying macro based + # on MCU name and flash size, which saves us from adapting tons of boards files. + # for details see page 90 of reference manual and stm32f10x.h. + # https://www.st.com/resource/en/reference_manual/cd00171190-stm32f101xx-stm32f102xx-stm32f103xx-stm32f105xx-and-stm32f107xx-advanced-arm-based-32-bit-mcus-stmicroelectronics.pdf + flash_mem = board.get("upload.maximum_size") // 1024 + family = mcu[0:9] # only get the chip family as e.g. stm32f103 + startup_file, series_macro = (None, None) + # give user the possibility to give the startup file themselves as a fallback + # then the identifying macro is also expected to be given. + startup_file = board.get("build.spl_startup_file", "") + if startup_file == "": + if family in ("stm32f101", "stm32f102", "stm32f103") and flash_mem >= 16 and flash_mem <= 32: + startup_file, series_macro = ("startup_stm32f10x_ld.S", "STM32F10X_LD") # low density + elif family in ("stm32f101", "stm32f102", "stm32f103") and flash_mem >= 64 and flash_mem <= 128: + startup_file, series_macro = ("startup_stm32f10x_md.S", "STM32F10X_MD") # medium density + elif family in ("stm32f101", "stm32f103") and flash_mem >= 256 and flash_mem <= 512: + startup_file, series_macro = ("startup_stm32f10x_hd.S", "STM32F10X_HD") # high density + elif family in ("stm32f101", "stm32f103") and flash_mem >= 768 and flash_mem <= 1024: + startup_file, series_macro = ("startup_stm32f10x_xl.S", "STM32F10X_XL") # xtra-large density + elif family in ("stm32f105", "stm32f107"): + startup_file, series_macro = ( "startup_stm32f10x_cl.S", "STM32F10X_CD") # connectivity line + + if startup_file is None: + sys.stderr.write("Failed to find startup file for board '%s'.\n" % board.id) + env.Exit(-1) + # exclude all startup files via wildcard, add back the one we want + cmsis_variant_filter_patterns += ["-", "+<%s>" % startup_file] + if series_macro is not None: + env.Append(CPPDEFINES=[series_macro]) + libs = [] libs.append(env.BuildLibrary( @@ -121,9 +160,23 @@ def get_linker_script(mcu): join( FRAMEWORK_DIR, board.get("build.core"), "cmsis", "variants", board.get("build.mcu")[0:7] - ) + ), + src_filter=cmsis_variant_filter_patterns )) +# STM32F1 SPL introduced updated core_cm3.c that needs +# to be compiled for Cortex-M3 cores. +if board.get("build.cpu") == "cortex-m3": + libs.append(env.BuildLibrary( + join("$BUILD_DIR", "FrameworkCMSISCore"), + join( + FRAMEWORK_DIR, board.get("build.core"), "cmsis", + "cores", "stm32" + ), + src_filter="+" + )) + + libs.append(env.BuildLibrary( join("$BUILD_DIR", "FrameworkSPL"), join(FRAMEWORK_DIR, board.get("build.core"), From 5161dc3575a4efa1f9f19c4cdc454bc20caa9315 Mon Sep 17 00:00:00 2001 From: maxgerhardt Date: Fri, 30 Dec 2022 19:28:53 +0100 Subject: [PATCH 03/15] Rewrite SPL example for systick, add F1 case --- examples/spl-blink/platformio.ini | 5 +++ examples/spl-blink/src/main.c | 53 +++++++++++++++++++++++++------ 2 files changed, 48 insertions(+), 10 deletions(-) diff --git a/examples/spl-blink/platformio.ini b/examples/spl-blink/platformio.ini index f52d19918..652a31106 100644 --- a/examples/spl-blink/platformio.ini +++ b/examples/spl-blink/platformio.ini @@ -21,3 +21,8 @@ board = disco_l152rb platform = ststm32 framework = spl board = disco_f303vc + +[env:bluepill_f103c8] +platform = ststm32 +framework = spl +board = bluepill_f103c8 diff --git a/examples/spl-blink/src/main.c b/examples/spl-blink/src/main.c index 089cc39ad..cab3dfefc 100644 --- a/examples/spl-blink/src/main.c +++ b/examples/spl-blink/src/main.c @@ -1,4 +1,10 @@ -#ifdef STM32L1 +#ifdef STM32F1 + #include + #include + #define LEDPORT (GPIOC) + #define LEDPIN (GPIO_Pin_13) + #define ENABLE_GPIO_CLOCK (RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, ENABLE)) +#elif STM32L1 #include #include #define LEDPORT (GPIOB) @@ -16,20 +22,37 @@ #define LEDPORT (GPIOD) #define LEDPIN (GPIO_Pin_12) #define ENABLE_GPIO_CLOCK (RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOD, ENABLE)) +#else + #error "Please define one of the macros STM32F1, STM32L1, STM32F3 or STM32F4." #endif -/* timing is not guaranteed :) */ -void simple_delay(uint32_t us) -{ - /* simple delay loop */ - while (us--) { - asm volatile ("nop"); +/* wanted blink time in milliseconds */ +#define DELAY_TIME_MILLIS 1000 + +/* variable keeps track of timing delay */ +static __IO uint32_t TimingDelay; + +void Delay(__IO uint32_t nTime) { + TimingDelay = nTime; + /* wait until variable is decreased to 0 through ISR calls */ + while (TimingDelay != 0); +} + +void TimingDelay_Decrement(void) { + /* called in systick ISR */ + if (TimingDelay != 0x00) { + TimingDelay--; } } /* system entry point */ int main(void) { + //setup SysTick for 1 millisecond interrupts + if (SysTick_Config(SystemCoreClock / 1000)) { + /* Capture error */ + while (1); + } /* gpio init struct */ GPIO_InitTypeDef gpio; /* reset rcc */ @@ -38,10 +61,15 @@ int main(void) ENABLE_GPIO_CLOCK; /* use LED pin */ gpio.GPIO_Pin = LEDPIN; + /* set pin to push-pull output depending on the SPL variant */ +#if STM32F1 + gpio.GPIO_Mode = GPIO_Mode_Out_PP; +#else /* mode: output */ gpio.GPIO_Mode = GPIO_Mode_OUT; /* output type: push-pull */ gpio.GPIO_OType = GPIO_OType_PP; +#endif /* apply configuration */ GPIO_Init(LEDPORT, &gpio); /* main program loop */ @@ -49,13 +77,18 @@ int main(void) /* set led on */ GPIO_SetBits(LEDPORT, LEDPIN); /* delay */ - simple_delay(100000); + Delay(DELAY_TIME_MILLIS); /* clear led */ GPIO_ResetBits(LEDPORT, LEDPIN); /* delay */ - simple_delay(100000); + Delay(DELAY_TIME_MILLIS); } /* never reached */ return 0; -} \ No newline at end of file +} + +/* SysTick interrupt every millisecond */ +void SysTick_Handler(void) { + TimingDelay_Decrement(); +} From ea598fa1d5de1d181b270fe497ec9ba7df4b0ecb Mon Sep 17 00:00:00 2001 From: maxgerhardt Date: Fri, 30 Dec 2022 19:32:52 +0100 Subject: [PATCH 04/15] Redirect SPL package --- platform.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.json b/platform.json index 5eac394d2..37e50ad55 100644 --- a/platform.json +++ b/platform.json @@ -180,7 +180,7 @@ "type": "framework", "optional": true, "owner": "platformio", - "version": "~2.10201.0" + "version": "https://github.com/maxgerhardt/pio-framework-spl-stm32.git" }, "framework-libopencm3": { "type": "framework", From ae728d07a782ac5c25ecf251dbd489f8f3d195df Mon Sep 17 00:00:00 2001 From: maxgerhardt Date: Fri, 30 Dec 2022 19:39:16 +0100 Subject: [PATCH 05/15] Add SPL to F10x boards --- boards/afroflight_f103cb.json | 3 ++- boards/blackpill_f103c8.json | 1 + boards/blackpill_f103c8_128.json | 1 + boards/bluepill_f103c6.json | 3 ++- boards/bluepill_f103c8.json | 1 + boards/bluepill_f103c8_128k.json | 1 + boards/disco_f100rb.json | 1 + boards/eval_f107vc.json | 1 + boards/genericSTM32F103C4.json | 3 ++- boards/genericSTM32F103C6.json | 3 ++- boards/genericSTM32F103C8.json | 1 + boards/genericSTM32F103CB.json | 1 + boards/genericSTM32F103R4.json | 3 ++- boards/genericSTM32F103R6.json | 3 ++- boards/genericSTM32F103R8.json | 1 + boards/genericSTM32F103RB.json | 1 + boards/genericSTM32F103RC.json | 1 + boards/genericSTM32F103RD.json | 3 ++- boards/genericSTM32F103RE.json | 1 + boards/genericSTM32F103RF.json | 3 ++- boards/genericSTM32F103RG.json | 3 ++- boards/genericSTM32F103T4.json | 3 ++- boards/genericSTM32F103T6.json | 3 ++- boards/genericSTM32F103T8.json | 1 + boards/genericSTM32F103TB.json | 1 + boards/genericSTM32F103V8.json | 3 ++- boards/genericSTM32F103VB.json | 1 + boards/genericSTM32F103VC.json | 1 + boards/genericSTM32F103VD.json | 1 + boards/genericSTM32F103VE.json | 1 + boards/genericSTM32F103VF.json | 3 ++- boards/genericSTM32F103VG.json | 3 ++- boards/genericSTM32F103ZC.json | 1 + boards/genericSTM32F103ZD.json | 1 + boards/genericSTM32F103ZE.json | 1 + boards/genericSTM32F103ZF.json | 3 ++- boards/genericSTM32F103ZG.json | 3 ++- boards/hy_tinystm103tb.json | 3 ++- boards/malyanm200_f070cb.json | 3 ++- boards/malyanm200_f103cb.json | 3 ++- boards/maple.json | 1 + boards/maple_mini_b20.json | 1 + boards/maple_mini_origin.json | 1 + boards/maple_ret6.json | 1 + boards/microduino32_flash.json | 3 ++- boards/nucleo_f103rb.json | 1 + boards/olimex_f103.json | 1 + boards/olimexino.json | 1 + boards/storm32_v1_31_rc.json | 1 + boards/vccgnd_f103zet6.json | 3 ++- boards/waveshare_open103z.json | 1 + 51 files changed, 72 insertions(+), 21 deletions(-) diff --git a/boards/afroflight_f103cb.json b/boards/afroflight_f103cb.json index 7100031e7..f7e045a42 100644 --- a/boards/afroflight_f103cb.json +++ b/boards/afroflight_f103cb.json @@ -20,7 +20,8 @@ "arduino", "cmsis", "stm32cube", - "libopencm3" + "libopencm3", + "spl" ], "name": "AfroFlight Rev5 (8MHz)", "upload": { diff --git a/boards/blackpill_f103c8.json b/boards/blackpill_f103c8.json index aed52e882..ef04a13e2 100644 --- a/boards/blackpill_f103c8.json +++ b/boards/blackpill_f103c8.json @@ -40,6 +40,7 @@ "arduino", "cmsis", "libopencm3", + "spl", "stm32cube", "zephyr" ], diff --git a/boards/blackpill_f103c8_128.json b/boards/blackpill_f103c8_128.json index 6788c1007..9c1e9822f 100644 --- a/boards/blackpill_f103c8_128.json +++ b/boards/blackpill_f103c8_128.json @@ -40,6 +40,7 @@ "arduino", "cmsis", "libopencm3", + "spl", "stm32cube", "zephyr" ], diff --git a/boards/bluepill_f103c6.json b/boards/bluepill_f103c6.json index 46a459d07..03e9fe912 100644 --- a/boards/bluepill_f103c6.json +++ b/boards/bluepill_f103c6.json @@ -34,7 +34,8 @@ "arduino", "cmsis", "stm32cube", - "libopencm3" + "libopencm3", + "spl" ], "name": "BluePill F103C6", "upload": { diff --git a/boards/bluepill_f103c8.json b/boards/bluepill_f103c8.json index 1158f994c..1c85c9ea2 100644 --- a/boards/bluepill_f103c8.json +++ b/boards/bluepill_f103c8.json @@ -41,6 +41,7 @@ "mbed", "cmsis", "libopencm3", + "spl", "stm32cube", "zephyr", "spl" diff --git a/boards/bluepill_f103c8_128k.json b/boards/bluepill_f103c8_128k.json index 086b266b8..2beff74e5 100644 --- a/boards/bluepill_f103c8_128k.json +++ b/boards/bluepill_f103c8_128k.json @@ -40,6 +40,7 @@ "arduino", "cmsis", "libopencm3", + "spl", "stm32cube", "zephyr" ], diff --git a/boards/disco_f100rb.json b/boards/disco_f100rb.json index 3f11446a8..ca38e1cf4 100644 --- a/boards/disco_f100rb.json +++ b/boards/disco_f100rb.json @@ -23,6 +23,7 @@ "cmsis", "mbed", "libopencm3", + "spl", "stm32cube" ], "name": "ST STM32VLDISCOVERY", diff --git a/boards/eval_f107vc.json b/boards/eval_f107vc.json index 86dab99f5..0c7e7e6f7 100644 --- a/boards/eval_f107vc.json +++ b/boards/eval_f107vc.json @@ -18,6 +18,7 @@ "cmsis", "stm32cube", "libopencm3", + "spl", "zephyr" ], "name": "STM3210C-EVAL", diff --git a/boards/genericSTM32F103C4.json b/boards/genericSTM32F103C4.json index 03f866aad..95c0a0365 100644 --- a/boards/genericSTM32F103C4.json +++ b/boards/genericSTM32F103C4.json @@ -17,7 +17,8 @@ "arduino", "cmsis", "stm32cube", - "libopencm3" + "libopencm3", + "spl" ], "name": "STM32F103C4 (6k RAM. 16k Flash)", "upload": { diff --git a/boards/genericSTM32F103C6.json b/boards/genericSTM32F103C6.json index 6b9722012..b51ddc291 100644 --- a/boards/genericSTM32F103C6.json +++ b/boards/genericSTM32F103C6.json @@ -17,7 +17,8 @@ "arduino", "cmsis", "stm32cube", - "libopencm3" + "libopencm3", + "spl" ], "name": "STM32F103C6 (10k RAM. 32k Flash)", "upload": { diff --git a/boards/genericSTM32F103C8.json b/boards/genericSTM32F103C8.json index 841b326a4..6a3c892ae 100644 --- a/boards/genericSTM32F103C8.json +++ b/boards/genericSTM32F103C8.json @@ -28,6 +28,7 @@ "cmsis", "mbed", "libopencm3", + "spl", "stm32cube" ], "name": "STM32F103C8 (20k RAM. 64k Flash)", diff --git a/boards/genericSTM32F103CB.json b/boards/genericSTM32F103CB.json index 1b921befb..56ba100b2 100644 --- a/boards/genericSTM32F103CB.json +++ b/boards/genericSTM32F103CB.json @@ -27,6 +27,7 @@ "arduino", "cmsis", "libopencm3", + "spl", "stm32cube" ], "name": "STM32F103CB (20k RAM. 128k Flash)", diff --git a/boards/genericSTM32F103R4.json b/boards/genericSTM32F103R4.json index 2672cc39d..29664778e 100644 --- a/boards/genericSTM32F103R4.json +++ b/boards/genericSTM32F103R4.json @@ -17,7 +17,8 @@ "arduino", "cmsis", "stm32cube", - "libopencm3" + "libopencm3", + "spl" ], "name": "STM32F103R4 (6k RAM. 16k Flash)", "upload": { diff --git a/boards/genericSTM32F103R6.json b/boards/genericSTM32F103R6.json index 69f6f3b82..eafc200b5 100644 --- a/boards/genericSTM32F103R6.json +++ b/boards/genericSTM32F103R6.json @@ -17,7 +17,8 @@ "arduino", "cmsis", "stm32cube", - "libopencm3" + "libopencm3", + "spl" ], "name": "STM32F103R6 (10k RAM. 32k Flash)", "upload": { diff --git a/boards/genericSTM32F103R8.json b/boards/genericSTM32F103R8.json index e034d4255..8fa693189 100644 --- a/boards/genericSTM32F103R8.json +++ b/boards/genericSTM32F103R8.json @@ -27,6 +27,7 @@ "arduino", "cmsis", "libopencm3", + "spl", "stm32cube" ], "name": "STM32F103R8 (20k RAM. 64 Flash)", diff --git a/boards/genericSTM32F103RB.json b/boards/genericSTM32F103RB.json index 8da84b469..a09f1e401 100644 --- a/boards/genericSTM32F103RB.json +++ b/boards/genericSTM32F103RB.json @@ -28,6 +28,7 @@ "cmsis", "mbed", "libopencm3", + "spl", "stm32cube" ], "name": "STM32F103RB (20k RAM. 128k Flash)", diff --git a/boards/genericSTM32F103RC.json b/boards/genericSTM32F103RC.json index 9ac22c454..962146728 100644 --- a/boards/genericSTM32F103RC.json +++ b/boards/genericSTM32F103RC.json @@ -27,6 +27,7 @@ "arduino", "cmsis", "libopencm3", + "spl", "stm32cube" ], "name": "STM32F103RC (48k RAM. 256k Flash)", diff --git a/boards/genericSTM32F103RD.json b/boards/genericSTM32F103RD.json index e20407106..8ef33f554 100644 --- a/boards/genericSTM32F103RD.json +++ b/boards/genericSTM32F103RD.json @@ -17,7 +17,8 @@ "arduino", "cmsis", "stm32cube", - "libopencm3" + "libopencm3", + "spl" ], "name": "STM32F103RD (64k RAM. 384k Flash)", "upload": { diff --git a/boards/genericSTM32F103RE.json b/boards/genericSTM32F103RE.json index 11591f437..504ab3227 100644 --- a/boards/genericSTM32F103RE.json +++ b/boards/genericSTM32F103RE.json @@ -27,6 +27,7 @@ "arduino", "cmsis", "libopencm3", + "spl", "stm32cube" ], "name": "STM32F103RE (64k RAM. 512k Flash)", diff --git a/boards/genericSTM32F103RF.json b/boards/genericSTM32F103RF.json index 410a0a8a6..172860734 100644 --- a/boards/genericSTM32F103RF.json +++ b/boards/genericSTM32F103RF.json @@ -17,7 +17,8 @@ "arduino", "cmsis", "stm32cube", - "libopencm3" + "libopencm3", + "spl" ], "name": "STM32F103RF (96k RAM. 768k Flash)", "upload": { diff --git a/boards/genericSTM32F103RG.json b/boards/genericSTM32F103RG.json index 34f0e714b..2d0b69eb8 100644 --- a/boards/genericSTM32F103RG.json +++ b/boards/genericSTM32F103RG.json @@ -17,7 +17,8 @@ "arduino", "cmsis", "stm32cube", - "libopencm3" + "libopencm3", + "spl" ], "name": "STM32F103RG (96k RAM. 1024k Flash)", "upload": { diff --git a/boards/genericSTM32F103T4.json b/boards/genericSTM32F103T4.json index 4c5db7fbc..aa2e170e3 100644 --- a/boards/genericSTM32F103T4.json +++ b/boards/genericSTM32F103T4.json @@ -17,7 +17,8 @@ "arduino", "cmsis", "stm32cube", - "libopencm3" + "libopencm3", + "spl" ], "name": "STM32F103T4 (6k RAM. 16k Flash)", "upload": { diff --git a/boards/genericSTM32F103T6.json b/boards/genericSTM32F103T6.json index d26153233..1d5d3320d 100644 --- a/boards/genericSTM32F103T6.json +++ b/boards/genericSTM32F103T6.json @@ -17,7 +17,8 @@ "arduino", "cmsis", "stm32cube", - "libopencm3" + "libopencm3", + "spl" ], "name": "STM32F103T6 (10k RAM. 32k Flash)", "upload": { diff --git a/boards/genericSTM32F103T8.json b/boards/genericSTM32F103T8.json index 70a34a03c..6059824cc 100644 --- a/boards/genericSTM32F103T8.json +++ b/boards/genericSTM32F103T8.json @@ -27,6 +27,7 @@ "arduino", "cmsis", "libopencm3", + "spl", "stm32cube" ], "name": "STM32F103T8 (20k RAM. 64k Flash)", diff --git a/boards/genericSTM32F103TB.json b/boards/genericSTM32F103TB.json index 69a9bf3fd..9b8a00aad 100644 --- a/boards/genericSTM32F103TB.json +++ b/boards/genericSTM32F103TB.json @@ -27,6 +27,7 @@ "arduino", "cmsis", "libopencm3", + "spl", "stm32cube" ], "name": "STM32F103TB (20k RAM. 128k Flash)", diff --git a/boards/genericSTM32F103V8.json b/boards/genericSTM32F103V8.json index e1a452b6c..fba71a2d9 100644 --- a/boards/genericSTM32F103V8.json +++ b/boards/genericSTM32F103V8.json @@ -17,7 +17,8 @@ "arduino", "cmsis", "stm32cube", - "libopencm3" + "libopencm3", + "spl" ], "name": "STM32F103V8 (20k RAM. 64k Flash)", "upload": { diff --git a/boards/genericSTM32F103VB.json b/boards/genericSTM32F103VB.json index 9919aba97..d3b2381ac 100644 --- a/boards/genericSTM32F103VB.json +++ b/boards/genericSTM32F103VB.json @@ -27,6 +27,7 @@ "arduino", "cmsis", "libopencm3", + "spl", "stm32cube" ], "name": "STM32F103VB (20k RAM. 128k Flash)", diff --git a/boards/genericSTM32F103VC.json b/boards/genericSTM32F103VC.json index dac37589c..98ec24b3b 100644 --- a/boards/genericSTM32F103VC.json +++ b/boards/genericSTM32F103VC.json @@ -27,6 +27,7 @@ "arduino", "cmsis", "libopencm3", + "spl", "stm32cube" ], "name": "STM32F103VC (48k RAM. 256k Flash)", diff --git a/boards/genericSTM32F103VD.json b/boards/genericSTM32F103VD.json index 3c73d65bd..820a091ae 100644 --- a/boards/genericSTM32F103VD.json +++ b/boards/genericSTM32F103VD.json @@ -27,6 +27,7 @@ "arduino", "cmsis", "libopencm3", + "spl", "stm32cube" ], "name": "STM32F103VD (64k RAM. 384k Flash)", diff --git a/boards/genericSTM32F103VE.json b/boards/genericSTM32F103VE.json index 8ce9b5395..b4dd3d4e7 100644 --- a/boards/genericSTM32F103VE.json +++ b/boards/genericSTM32F103VE.json @@ -27,6 +27,7 @@ "arduino", "cmsis", "libopencm3", + "spl", "stm32cube" ], "name": "STM32F103VE (64k RAM. 512k Flash)", diff --git a/boards/genericSTM32F103VF.json b/boards/genericSTM32F103VF.json index a7c3bf253..d615dfa4b 100644 --- a/boards/genericSTM32F103VF.json +++ b/boards/genericSTM32F103VF.json @@ -17,7 +17,8 @@ "arduino", "cmsis", "stm32cube", - "libopencm3" + "libopencm3", + "spl" ], "name": "STM32F103VF (96k RAM. 768k Flash)", "upload": { diff --git a/boards/genericSTM32F103VG.json b/boards/genericSTM32F103VG.json index 4f8305a6f..483485be2 100644 --- a/boards/genericSTM32F103VG.json +++ b/boards/genericSTM32F103VG.json @@ -17,7 +17,8 @@ "arduino", "cmsis", "stm32cube", - "libopencm3" + "libopencm3", + "spl" ], "name": "STM32F103VG (96k RAM. 1024k Flash)", "upload": { diff --git a/boards/genericSTM32F103ZC.json b/boards/genericSTM32F103ZC.json index c29e96c5b..29d4ddd9e 100644 --- a/boards/genericSTM32F103ZC.json +++ b/boards/genericSTM32F103ZC.json @@ -27,6 +27,7 @@ "arduino", "cmsis", "libopencm3", + "spl", "stm32cube" ], "name": "STM32F103ZC (48k RAM. 256k Flash)", diff --git a/boards/genericSTM32F103ZD.json b/boards/genericSTM32F103ZD.json index b02f97827..576517a32 100644 --- a/boards/genericSTM32F103ZD.json +++ b/boards/genericSTM32F103ZD.json @@ -27,6 +27,7 @@ "arduino", "cmsis", "libopencm3", + "spl", "stm32cube" ], "name": "STM32F103ZD (64k RAM. 384k Flash)", diff --git a/boards/genericSTM32F103ZE.json b/boards/genericSTM32F103ZE.json index f46d5904a..d164bb8b7 100644 --- a/boards/genericSTM32F103ZE.json +++ b/boards/genericSTM32F103ZE.json @@ -27,6 +27,7 @@ "arduino", "cmsis", "libopencm3", + "spl", "stm32cube" ], "name": "STM32F103ZE (64k RAM. 512k Flash)", diff --git a/boards/genericSTM32F103ZF.json b/boards/genericSTM32F103ZF.json index 49d1855a3..c2bd7da2c 100644 --- a/boards/genericSTM32F103ZF.json +++ b/boards/genericSTM32F103ZF.json @@ -17,7 +17,8 @@ "arduino", "cmsis", "stm32cube", - "libopencm3" + "libopencm3", + "spl" ], "name": "STM32F103ZF (96k RAM. 768k Flash)", "upload": { diff --git a/boards/genericSTM32F103ZG.json b/boards/genericSTM32F103ZG.json index 41a27bdaa..7f90958dc 100644 --- a/boards/genericSTM32F103ZG.json +++ b/boards/genericSTM32F103ZG.json @@ -17,7 +17,8 @@ "arduino", "cmsis", "stm32cube", - "libopencm3" + "libopencm3", + "spl" ], "name": "STM32F103ZG (96k RAM. 1024k Flash)", "upload": { diff --git a/boards/hy_tinystm103tb.json b/boards/hy_tinystm103tb.json index 5ee75214e..54486771e 100644 --- a/boards/hy_tinystm103tb.json +++ b/boards/hy_tinystm103tb.json @@ -27,7 +27,8 @@ "arduino", "cmsis", "stm32cube", - "libopencm3" + "libopencm3", + "spl" ], "name": "Tiny STM103T", "upload": { diff --git a/boards/malyanm200_f070cb.json b/boards/malyanm200_f070cb.json index a2daf559f..e240af30a 100644 --- a/boards/malyanm200_f070cb.json +++ b/boards/malyanm200_f070cb.json @@ -23,7 +23,8 @@ "arduino", "cmsis", "stm32cube", - "libopencm3" + "libopencm3", + "spl" ], "name": "M200 V2", "upload": { diff --git a/boards/malyanm200_f103cb.json b/boards/malyanm200_f103cb.json index 80f9293a9..baf3cbab3 100644 --- a/boards/malyanm200_f103cb.json +++ b/boards/malyanm200_f103cb.json @@ -30,7 +30,8 @@ "arduino", "cmsis", "stm32cube", - "libopencm3" + "libopencm3", + "spl" ], "name": "Malyan M200 V1", "upload": { diff --git a/boards/maple.json b/boards/maple.json index 2e5698d93..039d299e8 100644 --- a/boards/maple.json +++ b/boards/maple.json @@ -27,6 +27,7 @@ "arduino", "cmsis", "libopencm3", + "spl", "stm32cube" ], "name": "Maple", diff --git a/boards/maple_mini_b20.json b/boards/maple_mini_b20.json index cddea1e77..1bf5f3433 100644 --- a/boards/maple_mini_b20.json +++ b/boards/maple_mini_b20.json @@ -27,6 +27,7 @@ "arduino", "cmsis", "libopencm3", + "spl", "stm32cube" ], "name": "Maple Mini Bootloader 2.0", diff --git a/boards/maple_mini_origin.json b/boards/maple_mini_origin.json index 898c62fb7..8ed05f4fd 100644 --- a/boards/maple_mini_origin.json +++ b/boards/maple_mini_origin.json @@ -30,6 +30,7 @@ "arduino", "cmsis", "libopencm3", + "spl", "stm32cube" ], "name": "Maple Mini Original", diff --git a/boards/maple_ret6.json b/boards/maple_ret6.json index 1b87feba0..3a884c798 100644 --- a/boards/maple_ret6.json +++ b/boards/maple_ret6.json @@ -27,6 +27,7 @@ "arduino", "cmsis", "libopencm3", + "spl", "stm32cube" ], "name": "Maple (RET6)", diff --git a/boards/microduino32_flash.json b/boards/microduino32_flash.json index 0b65e7e76..4c5c63348 100644 --- a/boards/microduino32_flash.json +++ b/boards/microduino32_flash.json @@ -27,7 +27,8 @@ "arduino", "cmsis", "stm32cube", - "libopencm3" + "libopencm3", + "spl" ], "name": "Microduino Core STM32 to Flash", "upload": { diff --git a/boards/nucleo_f103rb.json b/boards/nucleo_f103rb.json index 5875df078..5eebeae84 100644 --- a/boards/nucleo_f103rb.json +++ b/boards/nucleo_f103rb.json @@ -25,6 +25,7 @@ "cmsis", "mbed", "libopencm3", + "spl", "stm32cube", "zephyr" ], diff --git a/boards/olimex_f103.json b/boards/olimex_f103.json index 5388ecab4..5a31b1c62 100644 --- a/boards/olimex_f103.json +++ b/boards/olimex_f103.json @@ -21,6 +21,7 @@ "cmsis", "mbed", "libopencm3", + "spl", "stm32cube" ], "name": "Olimex STM32-H103", diff --git a/boards/olimexino.json b/boards/olimexino.json index 0bd4942a8..39af77eca 100644 --- a/boards/olimexino.json +++ b/boards/olimexino.json @@ -21,6 +21,7 @@ "cmsis", "mbed", "libopencm3", + "spl", "stm32cube", "zephyr" ], diff --git a/boards/storm32_v1_31_rc.json b/boards/storm32_v1_31_rc.json index c0b038ef8..ea669ba69 100644 --- a/boards/storm32_v1_31_rc.json +++ b/boards/storm32_v1_31_rc.json @@ -20,6 +20,7 @@ "arduino", "cmsis", "libopencm3", + "spl", "stm32cube" ], "name": "STorM32 BGC v1.31 RC", diff --git a/boards/vccgnd_f103zet6.json b/boards/vccgnd_f103zet6.json index 98aab5a45..ed591b9f3 100644 --- a/boards/vccgnd_f103zet6.json +++ b/boards/vccgnd_f103zet6.json @@ -17,7 +17,8 @@ "arduino", "cmsis", "stm32cube", - "libopencm3" + "libopencm3", + "spl" ], "name": "VCCGND F103ZET6 Mini", "upload": { diff --git a/boards/waveshare_open103z.json b/boards/waveshare_open103z.json index bd5cd583c..596a67740 100644 --- a/boards/waveshare_open103z.json +++ b/boards/waveshare_open103z.json @@ -17,6 +17,7 @@ "arduino", "cmsis", "libopencm3", + "spl", "stm32cube" ], "name": "Waveshare Open103Z", From f5a9e8d2f9ea275805c2967b3c43129a74016319 Mon Sep 17 00:00:00 2001 From: maxgerhardt Date: Fri, 30 Dec 2022 19:46:46 +0100 Subject: [PATCH 06/15] Correct indication --- builder/frameworks/spl.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/builder/frameworks/spl.py b/builder/frameworks/spl.py index 545c7b1da..120694da0 100644 --- a/builder/frameworks/spl.py +++ b/builder/frameworks/spl.py @@ -139,15 +139,15 @@ def get_linker_script(mcu): elif family in ("stm32f101", "stm32f102", "stm32f103") and flash_mem >= 64 and flash_mem <= 128: startup_file, series_macro = ("startup_stm32f10x_md.S", "STM32F10X_MD") # medium density elif family in ("stm32f101", "stm32f103") and flash_mem >= 256 and flash_mem <= 512: - startup_file, series_macro = ("startup_stm32f10x_hd.S", "STM32F10X_HD") # high density + startup_file, series_macro = ("startup_stm32f10x_hd.S", "STM32F10X_HD") # high density elif family in ("stm32f101", "stm32f103") and flash_mem >= 768 and flash_mem <= 1024: - startup_file, series_macro = ("startup_stm32f10x_xl.S", "STM32F10X_XL") # xtra-large density + startup_file, series_macro = ("startup_stm32f10x_xl.S", "STM32F10X_XL") # xtra-large density elif family in ("stm32f105", "stm32f107"): - startup_file, series_macro = ( "startup_stm32f10x_cl.S", "STM32F10X_CD") # connectivity line + startup_file, series_macro = ("startup_stm32f10x_cl.S", "STM32F10X_CD") # connectivity line if startup_file is None: - sys.stderr.write("Failed to find startup file for board '%s'.\n" % board.id) - env.Exit(-1) + sys.stderr.write("Failed to find startup file for board '%s'.\n" % board.id) + env.Exit(-1) # exclude all startup files via wildcard, add back the one we want cmsis_variant_filter_patterns += ["-", "+<%s>" % startup_file] if series_macro is not None: From 3b6853a64c6853e0b2715ab609446523158da461 Mon Sep 17 00:00:00 2001 From: maxgerhardt Date: Fri, 30 Dec 2022 19:48:55 +0100 Subject: [PATCH 07/15] Correct maylanm200_f070cb product series, remove SPL --- boards/malyanm200_f070cb.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/boards/malyanm200_f070cb.json b/boards/malyanm200_f070cb.json index e240af30a..6ccf802f4 100644 --- a/boards/malyanm200_f070cb.json +++ b/boards/malyanm200_f070cb.json @@ -11,7 +11,7 @@ "arduino": "-DVECT_TAB_OFFSET=0x2000 -DCUSTOM_STARTUP_FILE" }, "mcu": "stm32f070cbt6", - "product_line": "STM32F103xB", + "product_line": "STM32F070xB", "variant": "STM32F0xx/F070CBT" }, "debug": { @@ -23,8 +23,7 @@ "arduino", "cmsis", "stm32cube", - "libopencm3", - "spl" + "libopencm3" ], "name": "M200 V2", "upload": { From 50c469aa8b50a8d518ee556094432155bc8fdeb3 Mon Sep 17 00:00:00 2001 From: maxgerhardt Date: Fri, 30 Dec 2022 20:02:19 +0100 Subject: [PATCH 08/15] Replace build.core with build.mcu[0:5], fixes compile for maple core boards --- builder/frameworks/spl.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/builder/frameworks/spl.py b/builder/frameworks/spl.py index 120694da0..9da13c1bb 100644 --- a/builder/frameworks/spl.py +++ b/builder/frameworks/spl.py @@ -76,13 +76,13 @@ def get_linker_script(mcu): env.Append( CPPPATH=[ - join(FRAMEWORK_DIR, board.get("build.core"), - "cmsis", "cores", board.get("build.core")), - join(FRAMEWORK_DIR, board.get("build.core"), "cmsis", + join(FRAMEWORK_DIR, board.get("build.mcu")[0:5], + "cmsis", "cores", board.get("build.mcu")[0:5]), + join(FRAMEWORK_DIR, board.get("build.mcu")[0:5], "cmsis", "variants", board.get("build.mcu")[0:7]), - join(FRAMEWORK_DIR, board.get("build.core"), "spl", + join(FRAMEWORK_DIR, board.get("build.mcu")[0:5], "spl", "variants", board.get("build.mcu")[0:7], "inc"), - join(FRAMEWORK_DIR, board.get("build.core"), "spl", + join(FRAMEWORK_DIR, board.get("build.mcu")[0:5], "spl", "variants", board.get("build.mcu")[0:7], "src") ], LINKFLAGS=[ @@ -158,7 +158,7 @@ def get_linker_script(mcu): libs.append(env.BuildLibrary( join("$BUILD_DIR", "FrameworkCMSISVariant"), join( - FRAMEWORK_DIR, board.get("build.core"), "cmsis", + FRAMEWORK_DIR, board.get("build.mcu")[0:5], "cmsis", "variants", board.get("build.mcu")[0:7] ), src_filter=cmsis_variant_filter_patterns @@ -170,7 +170,7 @@ def get_linker_script(mcu): libs.append(env.BuildLibrary( join("$BUILD_DIR", "FrameworkCMSISCore"), join( - FRAMEWORK_DIR, board.get("build.core"), "cmsis", + FRAMEWORK_DIR, board.get("build.mcu")[0:5], "cmsis", "cores", "stm32" ), src_filter="+" @@ -179,7 +179,7 @@ def get_linker_script(mcu): libs.append(env.BuildLibrary( join("$BUILD_DIR", "FrameworkSPL"), - join(FRAMEWORK_DIR, board.get("build.core"), + join(FRAMEWORK_DIR, board.get("build.mcu")[0:5], "spl", "variants", board.get("build.mcu")[0:7], "src"), src_filter=" ".join(src_filter_patterns) From 3246c67d7568c51b32036f4800a1e0a5264aa4aa Mon Sep 17 00:00:00 2001 From: maxgerhardt Date: Fri, 30 Dec 2022 20:05:07 +0100 Subject: [PATCH 09/15] Add maple board to SPL example --- examples/spl-blink/platformio.ini | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/spl-blink/platformio.ini b/examples/spl-blink/platformio.ini index 652a31106..924962756 100644 --- a/examples/spl-blink/platformio.ini +++ b/examples/spl-blink/platformio.ini @@ -26,3 +26,9 @@ board = disco_f303vc platform = ststm32 framework = spl board = bluepill_f103c8 + +[env:maple] +platform = ststm32 +framework = spl +board = maple +build_flags = -DSTM32F1 \ No newline at end of file From b90baf1b8f19df6305d380b72bb315d867e9ec1b Mon Sep 17 00:00:00 2001 From: maxgerhardt Date: Fri, 30 Dec 2022 20:10:43 +0100 Subject: [PATCH 10/15] Correct error detection logic --- builder/frameworks/spl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/frameworks/spl.py b/builder/frameworks/spl.py index 9da13c1bb..4a5a4a21d 100644 --- a/builder/frameworks/spl.py +++ b/builder/frameworks/spl.py @@ -145,7 +145,7 @@ def get_linker_script(mcu): elif family in ("stm32f105", "stm32f107"): startup_file, series_macro = ("startup_stm32f10x_cl.S", "STM32F10X_CD") # connectivity line - if startup_file is None: + if startup_file == "": sys.stderr.write("Failed to find startup file for board '%s'.\n" % board.id) env.Exit(-1) # exclude all startup files via wildcard, add back the one we want From f849492f381805f0d51a7919babe4b16075cc038 Mon Sep 17 00:00:00 2001 From: maxgerhardt Date: Sun, 1 Jan 2023 16:44:43 +0100 Subject: [PATCH 11/15] Correct Connectivity-line macro --- builder/frameworks/spl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/frameworks/spl.py b/builder/frameworks/spl.py index 4a5a4a21d..4c86a9e04 100644 --- a/builder/frameworks/spl.py +++ b/builder/frameworks/spl.py @@ -143,7 +143,7 @@ def get_linker_script(mcu): elif family in ("stm32f101", "stm32f103") and flash_mem >= 768 and flash_mem <= 1024: startup_file, series_macro = ("startup_stm32f10x_xl.S", "STM32F10X_XL") # xtra-large density elif family in ("stm32f105", "stm32f107"): - startup_file, series_macro = ("startup_stm32f10x_cl.S", "STM32F10X_CD") # connectivity line + startup_file, series_macro = ("startup_stm32f10x_cl.S", "STM32F10X_CL") # connectivity line if startup_file == "": sys.stderr.write("Failed to find startup file for board '%s'.\n" % board.id) From 4e85d67383ef38ea7ca5412093ac4a0725a2e0c9 Mon Sep 17 00:00:00 2001 From: maxgerhardt Date: Wed, 4 Jan 2023 00:49:35 +0100 Subject: [PATCH 12/15] Add Nucleo-F103RB LED, remove clock reset, add GPIO speed --- examples/spl-blink/platformio.ini | 6 +++++- examples/spl-blink/src/main.c | 10 ++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/examples/spl-blink/platformio.ini b/examples/spl-blink/platformio.ini index 924962756..698524571 100644 --- a/examples/spl-blink/platformio.ini +++ b/examples/spl-blink/platformio.ini @@ -31,4 +31,8 @@ board = bluepill_f103c8 platform = ststm32 framework = spl board = maple -build_flags = -DSTM32F1 \ No newline at end of file +build_flags = -DSTM32F1 + +[env:nucleo_f103rb] +board = nucleo_f103rb +build_flags = -DSTM32F1 -DNUCLEO_F103RB -DPIO_FRAMEWORK_SPL_HSE_IN_BYPASS_MODE \ No newline at end of file diff --git a/examples/spl-blink/src/main.c b/examples/spl-blink/src/main.c index cab3dfefc..c5cc86518 100644 --- a/examples/spl-blink/src/main.c +++ b/examples/spl-blink/src/main.c @@ -1,9 +1,16 @@ #ifdef STM32F1 #include #include + #if NUCLEO_F103RB + /* default on-board LED */ + #define LEDPORT (GPIOA) + #define LEDPIN (GPIO_Pin_5) + #define ENABLE_GPIO_CLOCK (RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE)) + #else #define LEDPORT (GPIOC) #define LEDPIN (GPIO_Pin_13) #define ENABLE_GPIO_CLOCK (RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, ENABLE)) + #endif #elif STM32L1 #include #include @@ -55,12 +62,11 @@ int main(void) } /* gpio init struct */ GPIO_InitTypeDef gpio; - /* reset rcc */ - RCC_DeInit(); /* enable clock GPIO */ ENABLE_GPIO_CLOCK; /* use LED pin */ gpio.GPIO_Pin = LEDPIN; + gpio.GPIO_Speed = GPIO_Speed_2MHz; /* set pin to push-pull output depending on the SPL variant */ #if STM32F1 gpio.GPIO_Mode = GPIO_Mode_Out_PP; From 6bfcedf214dc787d95383a061b5e59838219e7e9 Mon Sep 17 00:00:00 2001 From: Maximilian Gerhardt Date: Wed, 4 Jan 2023 02:30:18 +0100 Subject: [PATCH 13/15] Update platformio.ini --- examples/spl-blink/platformio.ini | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/spl-blink/platformio.ini b/examples/spl-blink/platformio.ini index 698524571..ad3264be1 100644 --- a/examples/spl-blink/platformio.ini +++ b/examples/spl-blink/platformio.ini @@ -34,5 +34,7 @@ board = maple build_flags = -DSTM32F1 [env:nucleo_f103rb] +platform = ststm32 +framework = spl board = nucleo_f103rb -build_flags = -DSTM32F1 -DNUCLEO_F103RB -DPIO_FRAMEWORK_SPL_HSE_IN_BYPASS_MODE \ No newline at end of file +build_flags = -DSTM32F1 -DNUCLEO_F103RB -DPIO_FRAMEWORK_SPL_HSE_IN_BYPASS_MODE From e914ef3c9d83f7302740300f1ac847327dc9d2e0 Mon Sep 17 00:00:00 2001 From: Maximilian Gerhardt Date: Fri, 23 Aug 2024 18:07:48 +0200 Subject: [PATCH 14/15] Support SPL with value-line devices (STM32F100xx) --- builder/frameworks/spl.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/builder/frameworks/spl.py b/builder/frameworks/spl.py index 4c86a9e04..836e968b4 100644 --- a/builder/frameworks/spl.py +++ b/builder/frameworks/spl.py @@ -121,7 +121,6 @@ def get_linker_script(mcu): # stm32f10x SPL has 8 possible startup files # depending on the series (connectivity, low/high/medium/extra-large density or # "value-line"). - # but, there are no value-line (STM32F100xx) chips in this platform yet. # we only want to assemble and link the correct one. # we automatically deduce the correct startup file and identifying macro based # on MCU name and flash size, which saves us from adapting tons of boards files. @@ -136,10 +135,16 @@ def get_linker_script(mcu): if startup_file == "": if family in ("stm32f101", "stm32f102", "stm32f103") and flash_mem >= 16 and flash_mem <= 32: startup_file, series_macro = ("startup_stm32f10x_ld.S", "STM32F10X_LD") # low density + if family in ("stm32f100") and flash_mem >= 16 and flash_mem <= 32: + startup_file, series_macro = ("startup_stm32f10x_ld_vl.S", "STM32F10X_LD_VL") # low density value elif family in ("stm32f101", "stm32f102", "stm32f103") and flash_mem >= 64 and flash_mem <= 128: startup_file, series_macro = ("startup_stm32f10x_md.S", "STM32F10X_MD") # medium density + elif family in ("stm32f100") and flash_mem >= 64 and flash_mem <= 128: + startup_file, series_macro = ("startup_stm32f10x_md_vl.S", "STM32F10X_MD_VL") # medium density value elif family in ("stm32f101", "stm32f103") and flash_mem >= 256 and flash_mem <= 512: startup_file, series_macro = ("startup_stm32f10x_hd.S", "STM32F10X_HD") # high density + elif family in ("stm32f100") and flash_mem >= 256 and flash_mem <= 512: + startup_file, series_macro = ("startup_stm32f10x_hd_vl.S", "STM32F10X_HD_VL") # high density elif family in ("stm32f101", "stm32f103") and flash_mem >= 768 and flash_mem <= 1024: startup_file, series_macro = ("startup_stm32f10x_xl.S", "STM32F10X_XL") # xtra-large density elif family in ("stm32f105", "stm32f107"): From e7efffc373da5906012f49ea985682ba72eab1d1 Mon Sep 17 00:00:00 2001 From: Maximilian Gerhardt Date: Fri, 23 Aug 2024 18:09:27 +0200 Subject: [PATCH 15/15] Update disco_f100rb.json Arduino-enable core --- boards/disco_f100rb.json | 1 + 1 file changed, 1 insertion(+) diff --git a/boards/disco_f100rb.json b/boards/disco_f100rb.json index f4c9d3e34..00aab9ef4 100644 --- a/boards/disco_f100rb.json +++ b/boards/disco_f100rb.json @@ -1,6 +1,7 @@ { "build": { "cpu": "cortex-m3", + "core": "stm32", "extra_flags": "-DSTM32F1 -DSTM32F100xB", "f_cpu": "24000000L", "mcu": "stm32f100rbt6",