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

Make features explicit for stm32h7[45b]3 #241

Merged
merged 1 commit into from
Nov 16, 2021
Merged

Conversation

lzrd
Copy link
Contributor

@lzrd lzrd commented Nov 3, 2021

Because stmh743 and stmh753 are so similar, it didn't matter that
the h743 feature and/or feature defaults that used h743 were in use
for the h753 SoC. However, as we start to use the IP of the h753 that
does not exist on the h743, i.e. Rng, Hash, and Crypt, the differences
start to matter.

The changes are tedious which reinforces the argument for better
system configuration tools.

I also added a -e option to xtask 'cargo xtask dist [--edges|-e] ...' that
runs 'cargo tree --edges features' before running 'cargo rustc ...'
This allows more visibility into the task dependencies and what features
are enabled on each. This was helpful in tracking down where the line of
features was broken; a top-level toml may have invoked a feature, but a
mid-level toml would have a dependency on a library that would have used
that feature if it had been passed on. Instead, a default feature or no
feature would be used. Most often, the stm32h7 crate would get compiled
two different ways and then get linked into the same task. The global
for the base of the register blocks would then have two instances which
would conflict.

@lzrd
Copy link
Contributor Author

lzrd commented Nov 3, 2021

This is tested as far as successfully running 'cargo xtask dist' on every app*.toml in hubris.

gemini-bu/Cargo.toml Outdated Show resolved Hide resolved
gemini-bu/app.toml Outdated Show resolved Hide resolved
gemini-bu/app.toml Outdated Show resolved Hide resolved
gemini-bu/app.toml Outdated Show resolved Hide resolved
gimlet/Cargo.toml Outdated Show resolved Hide resolved
drv/stm32h7-gpio/Cargo.toml Outdated Show resolved Hide resolved
drv/stm32h7-spi-server/Cargo.toml Outdated Show resolved Hide resolved
drv/user-leds/Cargo.toml Outdated Show resolved Hide resolved
gemini-bu/src/main.rs Show resolved Hide resolved
test/tests-gemini-bu/Cargo.toml Outdated Show resolved Hide resolved
@lzrd lzrd force-pushed the explicit-soc-features branch from 2f41db8 to f81a521 Compare November 12, 2021 04:26
Because stmh743 and stmh753 are so similar, it didn't matter that
the h743 feature and/or feature defaults that used h743 were in use
for the h753 SoC. However, as we start to use the IP of the h753 that
does not exist on the h743, i.e. Rng, Hash, and Crypt, the differences
start to matter.

Added a -e option to xtask 'cargo xtask dist [--edges|-e] ...' that
runs 'cargo tree --edges features' before running 'cargo rustc ...'
This allows more visibility into the task dependencies and what features
are enabled on each. This was helpful in tracking down where the line of
features was broken; a top-level toml may have invoked a feature, but a
mid-level toml would have a dependency on a library that would have used
that feature if it had been passed on. Instead, a default feature or no
feature would be used. Most often, the stm32h7 crate would get compiled
two different ways and then get linked into the same task. The global
for the base of the register blocks would then have two instances which
would conflict.

Changes made per cbiffle comments.
@cbiffle cbiffle force-pushed the explicit-soc-features branch from 1f730d2 to 081fa11 Compare November 16, 2021 21:30
@cbiffle cbiffle merged commit 081fa11 into master Nov 16, 2021
@cbiffle cbiffle deleted the explicit-soc-features branch November 16, 2021 21:40
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.

2 participants