Skip to content

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

Merged
merged 25 commits into from
Jul 25, 2019
Merged

Add STM32 Discovery F412ZG and F411RE support #2007

merged 25 commits into from
Jul 25, 2019

Conversation

hierophect
Copy link
Collaborator

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.

@tannewt
Copy link
Member

tannewt commented Jul 23, 2019

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

@hathach
Copy link
Member

hathach commented Jul 23, 2019

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

@hierophect
Copy link
Collaborator Author

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.

@hierophect
Copy link
Collaborator Author

In the meantime @tannewt if you add me as a contributor on that empty repo I'll move everything over.

@hierophect
Copy link
Collaborator Author

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?

@tannewt
Copy link
Member

tannewt commented Jul 23, 2019

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

Copy link
Member

@tannewt tannewt left a 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.

Copy link
Member

@tannewt tannewt left a 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!

@tannewt tannewt merged commit 8ec2d6c into adafruit:master Jul 25, 2019
@hierophect hierophect deleted the F4xx-port-setup branch September 11, 2019 14:40
@hierophect hierophect added the stm label Feb 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants