Configuring PeakRDL-rust#
If using the PeakRDL command line tool,
some aspects of the rust command can be configured via the PeakRDL TOML
file. Any equivalent command-line options will always take precedence.
All Rust-specific options are defined under the [rust] TOML heading.
For example:
[rust]
force = true
fmt = true
byte_endian = "big"
word_endian = "little"
access_mode = "software"
read_only = false
- force#
Overwrite the output directory if it already exists.
Default:
false
- fmt#
If true, attempt to format the generated rust code using
rustfmt.Default:
false
- byte_endian#
Ordering of bytes within accesswidth-sized accesses to the register file. Valid options are
bigorlittle. Overrides the littleendian and bigendian addrmap properties.Default: addrmap endianness propery, or
littleif not defined
- word_endian#
Ordering of accesswidth-sized words within a wide register. Valid options are
bigorlittle. Overrides the littleendian and bigendian addrmap properties. Note that the PeakRDL regblock exporters only supportlittleword endianness.Default: addrmap endianness propery, or
littleif not defined
- access_mode#
Controls which access properties are used for register and field access determination.
Options:
software- Use software read/write access properties (sw property)hardware- Use hardware read/write access properties (hw property)
Default:
software
- read_only#
If true, treat all registers and fields as read-only. Write-only registers and fields are not exposed.
Default:
false