sv2utra: fix no_std attribute generation

We only need `no_std` when building for embedded platforms, and it no
longer goes inside the library file.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2020-10-05 11:27:47 +08:00
parent 422789eda7
commit da50dffa94

View file

@ -37,15 +37,15 @@ pub struct Peripheral {
#[derive(Default, Debug)]
pub struct MemoryRegion {
name: String,
base: usize,
size: usize,
pub name: String,
pub base: usize,
pub size: usize,
}
#[derive(Default, Debug)]
pub struct Description {
peripherals: Vec<Peripheral>,
memory_regions: Vec<MemoryRegion>,
pub peripherals: Vec<Peripheral>,
pub memory_regions: Vec<MemoryRegion>,
}
pub fn get_base(value: &str) -> (&str, u32) {
@ -359,7 +359,6 @@ fn parse_vendor_extensions<T: BufRead>(
fn print_header<U: Write>(out: &mut U) -> std::io::Result<()> {
let s = r####"
#![cfg_attr(target_os = "none", no_std)]
use core::convert::TryInto;
pub struct Register {
/// Offset of this register within this CSR