-
Notifications
You must be signed in to change notification settings - Fork 179
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
device features #90
device features #90
Conversation
cc @TheZoq2 |
Replying to @therealprof in the other thread
That's a fair point, though I think users would care about it. With this system, you can just easily look at the etching on your chip in order to determine what feature to enable. However, the feature list is quite large which could be a bit annoying. Do we actually need the information about memory amount, or is density enough? If it is, I think just specifying density might a better option. |
Remove mem and add density or keep both? |
Yeah, maybe... maybe not. Sometimes you might want to use a chip which is sitting inside an enclosure (like an ST-Link Mini clone or a keyboard). Also as done here this gives the wrong impression that it might affect the linker settings at the same time which it will not. And then of course there're the notorious STM32F103C8 which usually is a rebadged STM32F103CB (at least when it comes to the amount of flash available). I think we really should default to sane settings which will work everywhere and allow the user to set e.g. the "density" to get access to the advanced features. |
Yea, I think you may be right. So then we want no individual chip flags, and one feature for each density with |
@TheZoq2 Unless there's a good reason to have a |
75f9f86
to
61caac4
Compare
Yea, that's probably a better option |
Shouldn't |
61caac4
to
6677db6
Compare
I have no idea; was expecting someone who needs those features to chime in. ;) |
RM0008 p.40 |
6677db6
to
5092281
Compare
5092281
to
2e6acff
Compare
Comments added. |
Ok, in that case, i'd say this can be merged. Any objections? @therealprof |
LGTM |
I had another look at the datasheet, and if i'm reading it correctly, the features should not be subsets of each other. For example, the DAC is available on low density f102 and high density 103, but nothing else This also means that device density is not enough to determine which features are available. However, since #83 depends on this, perhaps we should stick to just density for now, and deal with subfamilies when we implement something that needs it |
This exception we can check by #[cfg(any(
all(feature="stm32f102", not(feature="medium")),
all(feature="stm32f103", feature="high"),
)] |
Fair enough, I kind of forgot we have features for the different 10xes 😅. LGTM! |
No description provided.