-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add STM32 Discovery F412ZG and F411RE support #2007
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
Conversation
Would you mind moving stm32cube to a submodule? It's a ton of files and makes it hard to know what to review. Here is an empty repo you can use: https://github.com/adafruit/stm32f4 |
@tannewt we should make a folk from this repo https://github.com/micropython/stm32lib which is used by micropython. This will make thing easier to merge/push to micropython. @hierophect Also since this isn't fully ported yet, you should push this PR to a branch (e.g stm32port) instead of master. |
Who takes on creating the new branch? I don't see that as an option for my PR. I originally avoided the micropython stm32lib repo as it is 2 years old. However, I didn't run a comparison, and there may simply be no changes to the HAL/LLs since 2017. I'll check compatibility and swap over if there are no problems. |
In the meantime @tannewt if you add me as a contributor on that empty repo I'll move everything over. |
I'm seeing new files like hal_exti.c which are from 2018, which micropython does not include in their repo. Do you still want me to fork that, or should we just stay separate? |
@hathach I agree with @hierophect and would prefer to use newer STM32Cube APIs. I doubt we'll ever push our STM code back upstream. It looks like ST is starting to make repos for the code so we should switch over to a fork of theirs when it's available. More info here: https://github.com/STMicroelectronics/STM32Cube_MCU_Overall_Offer Also, these changes should go straight to master. It's okay to have partial support on master. Using multiple branches for ongoing work makes it hard for testers to try all the new features. master is build every commit and made available on S3 for testing. Early and often testing is best. @hierophect Add you as a collaborator to this repo and the stm32f4 one. |
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.
Making progress! Looks like there are a number of files leftover from the nrf port in common-hal and peripherals that should be removed. Simplifying this new directory will make a good baseline for a skeleton port that other ports can start with.
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.
Looks great! Thank you!
This PR adds rudimentary support for the STM32F4 series. Supported features are REPL access over UART, and Microcontroller, Board and DigitalIO object support. Specify USB=FALSE when building.
Also includes minor additions to Main.c and supervisor files to add preprocessor exclusion of optional modules for early stage ports, and fixes a potential bug in the nrf port.