Skip to content

Add SPL support for bluepill board#226

Closed
maxgerhardt wants to merge 7 commits into
platformio:developfrom
maxgerhardt:develop
Closed

Add SPL support for bluepill board#226
maxgerhardt wants to merge 7 commits into
platformio:developfrom
maxgerhardt:develop

Conversation

@maxgerhardt

@maxgerhardt maxgerhardt commented Mar 20, 2019

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

yhyuan commented Jul 6, 2019

Copy link
Copy Markdown

@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
Copy Markdown

@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
Copy Markdown
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
Copy Markdown

when is this going to be released?

@maxgerhardt

Copy link
Copy Markdown
Contributor Author

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

@maxgerhardt

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