platform-ststm32 icon indicating copy to clipboard operation
platform-ststm32 copied to clipboard

Add SPL support for bluepill board

Open maxgerhardt opened this issue 6 years ago • 8 comments

This PR

  • activates the SPL framework for the bluepill_f103c8 target
  • adds a blink LED example with SysTick usage for accurate timing (thereby tests the HSE PLL)

This needed a new example project because the old example tried setting gpio.GPIO_OType = GPIO_OType_PP; and using GPIO_Mode_OUT which doesn't exist in the current SPL framework for STM32F1, version 3.5.0. Instead, we need to set gpio.GPIO_Mode = GPIO_Mode_Out_PP;.

Also needs the corresponding files in the framework-spl folder to enable support for the whole STM32F1 series.

Please tell me how to do a pull-request for the framework-spl package, since I didn't find it as a repository here, but only https://bintray.com/platformio/dl-packages/framework-spl.

I'd need to add new files for framework-spl\stm32\cmsis\variants\stm32f1 and framework-spl\stm32\spl\variants\stm32f1 from the SPL library (here). My framework-spl: https://drive.google.com/open?id=1HTh7bK_5nY7-EjgIgb7_S584TIrOQ_cj

maxgerhardt avatar Mar 20 '19 22:03 maxgerhardt

Sorry, I didn't see this PR :(

Can you adapt this example https://github.com/platformio/platform-ststm32/tree/develop/examples/spl-blink with bluepill?

ivankravets avatar May 06 '19 09:05 ivankravets

and using GPIO_Mode_OUT which doesn't exist in the current SPL framework for STM32F1, version 3.5.0

Can we update SPL to the latest version too?

ivankravets avatar May 06 '19 09:05 ivankravets

@ivankravets I can definitely do an upgrade of all current SPL versions so that they're all up-to-date and then change and add examples. Will tackle this the next days.

maxgerhardt avatar May 06 '19 09:05 maxgerhardt

Thanks! We will wait for your PR. We wanted to do the next release with mbed OS 5.12 but it is so buggy :(

ivankravets avatar May 06 '19 09:05 ivankravets

@maxgerhardt . Excellent work. But, there is one problem. startup_stm32f10x_md.s must be renamed to startup_stm32f10x_md.S. Otherwise, we will get arm-none-eabi-as: unrecognized option `-x' error.

yhyuan avatar Jul 06 '19 18:07 yhyuan

@maxgerhardt where do I find the pio framework-spl package with STM32F103 support pls? for now i used a SPL download from ST, and manually merged files in framework-spl, and that seems to work with your blinkie example. Thanks,Stefaan.

stefaandesmet2003 avatar Aug 31 '21 10:08 stefaandesmet2003

@maxgerhardt where do I find the pio framework-spl package with STM32F103 support pls?

Right now either from my link above, or from STM. The PlatformIO provided one (https://api.registry.platformio.org/v3/packages/platformio/tool/framework-spl) was lasted updated in 2018 and is long overdue for a complete update.

maxgerhardt avatar Aug 31 '21 10:08 maxgerhardt

when is this going to be released?

ayushkamadji avatar Mar 14 '22 10:03 ayushkamadji

This PR has conflicts and is a weird state, I'll reopen a new clean PR.

maxgerhardt avatar Dec 30 '22 16:12 maxgerhardt

Replaced by #667.

maxgerhardt avatar Dec 30 '22 18:12 maxgerhardt