zc706: fix rustcfg, runtime warnings

This commit is contained in:
mwojcik 2023-09-07 15:36:20 +08:00
parent f8446b1a46
commit 772b5aa8ec
2 changed files with 4 additions and 0 deletions

View File

@ -690,6 +690,8 @@ def write_mem_file(soc, filename):
def write_rustc_cfg_file(soc, filename):
with open(filename, "w") as f:
for name, origin, busword, obj in soc.get_csr_regions():
f.write("has_{}\n".format(name.lower()))
for k, v in sorted(soc.rustc_cfg.items(), key=itemgetter(0)):
if v is None:
f.write("{}\n".format(k))

View File

@ -8,6 +8,7 @@
#[macro_use]
extern crate alloc;
#[cfg(feature = "target_kasli_soc")]
use core::cell::RefCell;
use ksupport;
@ -74,6 +75,7 @@ pub fn main_core0() {
info!("gateware ident: {}", identifier_read(&mut [0; 64]));
ksupport::i2c::init();
#[cfg(feature = "target_kasli_soc")]
let i2c_bus = unsafe { (ksupport::i2c::I2C_BUS).as_mut().unwrap() };
#[cfg(feature = "target_kasli_soc")]