diff --git a/artiq/firmware/runtime/config_dummy.rs b/artiq/firmware/runtime/config_dummy.rs new file mode 100644 index 000000000..2680c9ab6 --- /dev/null +++ b/artiq/firmware/runtime/config_dummy.rs @@ -0,0 +1,19 @@ +pub fn read) -> R, R>(_key: &str, f: F) -> R { + f(Err(())) +} + +pub fn read_str) -> R, R>(_key: &str, f: F) -> R { + f(Err(())) +} + +pub fn write(_key: &str, _value: &[u8]) -> Result<(), ()> { + Err(()) +} + +pub fn remove(_key: &str) -> Result<(), ()> { + Err(()) +} + +pub fn erase() -> Result<(), ()> { + Err(()) +} diff --git a/artiq/firmware/runtime/lib.rs b/artiq/firmware/runtime/lib.rs index 67baaa08a..f679eba28 100644 --- a/artiq/firmware/runtime/lib.rs +++ b/artiq/firmware/runtime/lib.rs @@ -36,7 +36,10 @@ macro_rules! borrow_mut { }) } +#[cfg(has_spiflash)] mod config; +#[cfg(not(has_spiflash))] +#[path="config_dummy.rs"] mod config; mod ethmac; mod rtio_mgt;