-
Notifications
You must be signed in to change notification settings - Fork 108
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
Add support for STM32F103 (Blue Pill) #541
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Risca for the proposed port. This looks good so far.
- Please do get in touch with us at [email protected] to fill our Contributor Agreement form, if you haven't already, mentioning this PR.
- The hal_flash_write function is not supposed to erase sectors. Please remove all erase commands from
hal_flash_write
. - Please rename the TARGET and file names to
stm32f1
for consistency with other ports. - Our ports usually include also one paragraph of instructions in docs/Targets.md, and a non-regression build test in github actions, but I could also commit those on top while testing, once the above points are solved.
I've fixed the rename and (hopefully) the build test. The rest will be a few days |
Rebasing on master would get rid of the failing tests, which are caused by the deprecation of some v3 APIs we already fixed. |
Rebased without changes to latest master to see if automatic builds now works |
Tracking in ZD 19403 |
e878621
to
2953810
Compare
Fixed an issue in the config file: the wolfboot partition was configured much larger than the space available before the first (boot) partition |
Sorry for the noise - I misread the docs. Config is fixed now, and the partition sizes trimmed a bit |
Contributor agreement approved and on file. Thank you @Risca . Daniele please finalize and merge when you are happy with it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! The hal implementation looks much better now. I hope you don't mind fixing a few last little details.
The Blue Pill board is typically fitted with a STM32F103C8T6, but reports online seem to indicate that it sometimes can come with its bigger sibling the STM32F103C8TB as is the case with my board. This patch adds support for all low- to medium-density STM32F103 devices. All of these devices have their flash divided in 1 KB pages, up to 128 KB. The high-density and connectivity line of devices, sometimes called XL devices, use 2 KB pages and are not supported. Similar to the STM32F4 support, the code will spin up the PLL for maximum speed during init and turn it off just before booting the application. the maxium speed is 72 MHz. Signed-off-by: Patrik Dahlström <[email protected]>
The test application used during development of STM32F103 support. If booting version 1 of the software, trigger an update. If running ver. 2, all is good. Signed-off-by: Patrik Dahlström <[email protected]>
Config based on the STM32F4 ditto. Booting takes about 6 seconds and update around 15. Signed-off-by: Patrik Dahlström <[email protected]>
Signed-off-by: Patrik Dahlström <[email protected]>
Signed-off-by: Patrik Dahlström <[email protected]>
The Blue Pill board is typically fitted with a STM32F103C8T6, but
reports online seem to indicate that it sometimes can come with its
bigger sibling the STM32F103C8TB as is the case with my board.
This patch adds support for all low- to medium-density STM32F103
devices. All of these devices have their flash divided in 1 KB pages, up
to 128 KB. The high-density and connectivity line of devices, sometimes
called XL devices, use 2 KB pages and are not supported.
Similar to the STM32F4 support, the code will spin up the PLL for
maximum speed during init and turn it off just before booting the
application. the maxium speed is 72 MHz.
Booting with the example config takes around 6 seconds.
Updating takes about 15.