Skip to content
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

Added STM32F412G Discovery kit #1916

Merged
merged 17 commits into from Jun 29, 2020

Conversation

alexandruradovici
Copy link
Contributor

Pull Request Overview

This pull request adds the STM32F412G Discovery Kit. Features working:

  • LEDs
  • Joystick
  • Virtual COM

This uses the same chip as the nucleo429 so all the low level hardware implemented for it should work with this device.

Testing Strategy

This pull request was tested using an STM32F412G Discovery.

TODO or Help Wanted

Documentation Updated

  • Updated the relevant files in /docs

Formatting

  • Ran make prepush.

> **Note:** Unlike other Tock platforms, the default kernel image for this
> board will clear flashed apps when the kernel is loaded. This is to support
> the non-tockloader based app flash procedure below. To preserve loaded apps,
> comment out the `APP_HACK` variable in `src/main.rs`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are all of these platforms still doing this? My impression is the naming implied this was short-term, but if it is getting copied over and over, this is going to become less a hack and more of a standard. What would it take to fix this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not implement the original Nucelo boards, I think tockloader does not support this platform so far.

Copy link
Contributor

@bradjc bradjc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove tools/.format_fresh

Also, should probably match the naming for the other discovery board.

@bradjc
Copy link
Contributor

bradjc commented Jun 8, 2020

My other question, and maybe opening an issue for this would be good, is what is the roadmap/vision for Tock support on STM boards? I imagine there are probably hundreds of them, do we want to support as many as possible? I'm not saying we should or should not, but having some shared understanding of the direction would be helpful.

I'm concerned that having many boards with only OK support and testing is less beneficial than having say two boards with robust support that gets tested for releases. But there is also merit in supporting the hardware that people already have. I would probably be supportive of having a "flagship" STM board that many of us buy and is included in release testing that we concentrate support around. Then, there could be other related boards with support in Tock, with the hope that fixes/improvements for the flagship help all of the related boards. But, I'm not sure how realistic that is, or if there is a clear STM board that would make sense to prioritize.

@alexandruradovici
Copy link
Contributor Author

alexandruradovici commented Jun 8, 2020

Remove tools/.format_fresh

Also, should probably match the naming for the other discovery board.

I will rename the other discovery board also, to be consistent with the initial naming used by nucleo.

@alexandruradovici
Copy link
Contributor Author

alexandruradovici commented Jun 8, 2020

My other question, and maybe opening an issue for this would be good, is what is the roadmap/vision for Tock support on STM boards? I imagine there are probably hundreds of them, do we want to support as many as possible? I'm not saying we should or should not, but having some shared understanding of the direction would be helpful.

I'm concerned that having many boards with only OK support and testing is less beneficial than having say two boards with robust support that gets tested for releases. But there is also merit in supporting the hardware that people already have. I would probably be supportive of having a "flagship" STM board that many of us buy and is included in release testing that we concentrate support around. Then, there could be other related boards with support in Tock, with the hope that fixes/improvements for the flagship help all of the related boards. But, I'm not sure how realistic that is, or if there is a clear STM board that would make sense to prioritize.

This discovery board has more or less the same MCU as the supported nucleo (stmf4xx). I intend to fully support this discovery board as I need it for my teaching. It will take some time to reach that point.

I still think having even partial support for the boards is beneficial, as this might encourage people to contribute to them. What about having s small set of "fully" supported boards and a set of "non-fully" supported boards?

@hudson-ayers
Copy link
Contributor

My other question, and maybe opening an issue for this would be good, is what is the roadmap/vision for Tock support on STM boards? I imagine there are probably hundreds of them, do we want to support as many as possible? I'm not saying we should or should not, but having some shared understanding of the direction would be helpful.

I'm concerned that having many boards with only OK support and testing is less beneficial than having say two boards with robust support that gets tested for releases. But there is also merit in supporting the hardware that people already have. I would probably be supportive of having a "flagship" STM board that many of us buy and is included in release testing that we concentrate support around. Then, there could be other related boards with support in Tock, with the hope that fixes/improvements for the flagship help all of the related boards. But, I'm not sure how realistic that is, or if there is a clear STM board that would make sense to prioritize.

I think the stm32f3discovery board might make sense as a "flagship" STM board if we were to go that route. It has 10 LEDs, buttons, accel/gyro/compass, and costs $15. Most importantly, it is the board required to complete the embedded rust book, so lots of people interested in getting started with embedded Rust might already have one. The main downside is it doesn't have wireless.

@alexandruradovici
Copy link
Contributor Author

Remove tools/.format_fresh
Also, should probably match the naming for the other discovery board.

I will rename the other discovery board also, to be consistent with the initial naming used by nucleo.

I rename this board as STM uses this naming in their website.

ppannuto
ppannuto previously approved these changes Jun 22, 2020
Copy link
Member

@ppannuto ppannuto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be the cleanest, most readable board main file I've ever had the pleasure of reading

chips/stm32f412g/README.md Outdated Show resolved Hide resolved
kernel::procs::load_processes(
board_kernel,
chip,
core::slice::from_raw_parts(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Attn #1962

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know about it, but is is not merged yet. I'll update the stm boards as soon as this gets merged. Should I do it differently?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just flagging the (potential) conflict here; whichever goes in first, the other will have to update

boards/stm32f412gdiscovery/Makefile Outdated Show resolved Hide resolved
boards/stm32f412gdiscovery/chip_layout.ld Outdated Show resolved Hide resolved
boards/stm32f412gdiscovery/src/io.rs Outdated Show resolved Hide resolved
ppannuto
ppannuto previously approved these changes Jun 26, 2020
Copy link
Member

@ppannuto ppannuto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@ppannuto ppannuto added the last-call Final review period for a pull request. label Jun 26, 2020
Copy link
Member

@ppannuto ppannuto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

@alexandruradovici
Copy link
Contributor Author

bors seems to be stuck here ...

@ppannuto
Copy link
Member

bors retry

Hmmm..

@bors bors bot merged commit 4e3c160 into tock:master Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
last-call Final review period for a pull request. needs-rebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants