-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Description
I was handcrafting some svd (yaml) and early on ran into a generator issue.
To reproduce run the following in an empty directory:
cargo init simple_bit_field_failure \
&& cd simple_bit_field_failure \
&& cargo add cortex_m vcell \
&& cd src \
&& echo """
name: MyDevice
version: 0
description: My Device
addressUnitBits: 32
width: 32
peripherals:
- name: MyPeripheral
baseAddress: 0xb8000300
registers:
- register:
name: MyRegister
description: My register.
addressOffset: 0
size: 1
fields:
- name: MyBitField
description: My bit field.
bitRange: \"[0:0]\"
""" | RUST_LOG=debug svd2rust --strict --source_type yaml \
&&cargo fmt -- --config normalize_doc_attributes=true \
&&cargo buildresult:
...
error[E0308]: mismatched types
--> src/lib.rs:779:37
|
779 | MY_BIT_FIELD_R::new(self.bits)
| ------------------- ^^^^^^^^^ expected `bool`, found `u8`
| |
| arguments to this function are incorrect
|
...
The first doc line reports version:
//!Peripheral access API for MYDEVICE microcontrollers (generated using svd2rust v0.28.0 ( ))
Metadata
Metadata
Assignees
Labels
No labels