-
Notifications
You must be signed in to change notification settings - Fork 151
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
writer offset as a struct field #751
Conversation
e0fbac3
to
d021974
Compare
My crate is very similar to yours, and the PAC is also similar. So I don't think there will be a big difference. I don't understand how I can measure the compile time. Just the example build or HAL and PAС?
Sorry, I haven't finished the more complex examples yet. |
You just need to
(+ |
Got it. I mean what time do you need? HAL compile or PAC + HAL? |
I've measured just a PAC compilation time. |
PAC compile time: 6.7±0.15s vs 6.5±0.05s |
8c512bb
to
5115c73
Compare
e0d7a54
to
e7d4788
Compare
4ac1400
to
6bad4f9
Compare
ac95746
to
c8e8c1b
Compare
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.
i'm fine with this new interface and zero indexing, but I think we need to signal the break a little better, not sure how though
c8e8c1b
to
7980b26
Compare
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.
lgtm! I'd like it if someone else on @rust-embedded/tools could also review
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.
I don't quite understand why we want to do this but I'm fine in general.
This is retry of one of my old experiments.
It does 2 things:
offset
from field writer generic to struct field.Generated code is much simpler.
The main advantage is you can now simply use
.write(|w| w.fname(3).set_bit()
for write/modify field arrays (previously only reading was accepted) same as.write(|w| w.fname3().set_bit()
.The main disadvantage is bigger firmware size in debug mode.
cc @kossnikita, @therealprof and anyone who want to help.
I tried several examples from
stm32f4xx-hal
:So it is 2-3% bigger on debug mode for me.
cargo build --release -j1 --timings
. time ofstm32f4
(f411) compilation on my machine, dependencies not included and peak memory usage duringrtic-usart-shell
compilation: