-
Notifications
You must be signed in to change notification settings - Fork 156
register of size 1? #102
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
Comments
I can't find anything in the SVD spec that disallows this, but it doesn't make sense to me to accept it unless the CPU can perform 1-bit reads and writes. Well, certain CPUs can; e.g. Atmel AVR can do sbi/cbi, and you could do bit-banding on Cortex-M3+, but it's weird. |
I agree. I think we should round up the register size to be a multiple of 8 (bits). That should fix this problem. |
To a power of two multiple of 8, perhaps? |
Yeah, that's what I was thinking but didn't fully convey in my previous comment. |
Uh oh!
There was an error while loading. Please reload this page.
File: MB9AF10xN.svd
Contents:
Produces:
Compiler error:
The problem I see that the SVD file declares the register has having a size of 1. I'm not sure if that allowed by the SVD format (the website appears to be down ATM) but I'd expect it to only allow sizes multiple of 8 (
bytesbits). Note that we are talking about registers; bitfields can have any size (smaller than the size of their register).Anyhow the current implementation maps a size of 1 to a
bool
so thebits
field ofR
isbool
which can be shifted to the right byOFFSET
thus the compiler error.cc @whitequark fallout from #84
EDIT I meant bits not bytes.
The text was updated successfully, but these errors were encountered: