Skip to content

Add SPL support for bluepill board #226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed

Add SPL support for bluepill board #226

wants to merge 7 commits into from

Conversation

maxgerhardt
Copy link
Contributor

@maxgerhardt maxgerhardt commented Mar 20, 2019

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

Maximilian Gerhardt added 3 commits March 20, 2019 23:20
Also needs the corresponding files in the framework-spl folder.
Implements a blinky on the built-in red LED with accurate timing
by using the SysTick handler.

Also proves that the 72MHz HSE PLL is working properly since the
LED toggles exactly every 1 second.
@ivankravets
Copy link
Member

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
Copy link
Member

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?

@maxgerhardt
Copy link
Contributor Author

@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.

@ivankravets
Copy link
Member

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

@yhyuan
Copy link

yhyuan commented Jul 6, 2019

@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.

@stefaandesmet2003
Copy link

@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.

@maxgerhardt
Copy link
Contributor Author

@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.

@ayushkamadji
Copy link

when is this going to be released?

@maxgerhardt
Copy link
Contributor Author

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

@maxgerhardt
Copy link
Contributor Author

Replaced by #667.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants