fix rust-1.80 warnings for cram-soc config

This commit is contained in:
bunnie 2024-08-19 02:57:12 +08:00
parent 1ae0ef4861
commit 3cdf01d5e9
11 changed files with 23 additions and 8 deletions

View file

@ -25,6 +25,8 @@ bitfield = "0.13.2"
xous = { version = "0.9.63", features = ["v2p"] }
[features]
compress-entropy = []
magic-manual = []
std = ["log", "xous-api-names", "usb-device"]
derive-rkyv = ["rkyv"]
default = []

View file

@ -981,7 +981,7 @@ impl CorigineUsb {
(0x0bc, 0x44087d5a),
(0x110, 0x00000000),
];
#[cfg(feature = "magic_manual")]
#[cfg(feature = "magic-manual")]
const MAGIC_TABLE: [(usize, u32); 17] = [
(0x0fc, 0x00000001),
(0x084, 0x01401388),

View file

@ -19,6 +19,7 @@ xous = "0.9.63"
cramium-soc = ["utralib/cramium-soc"]
cramium-fpga = ["utralib/cramium-fpga"]
rp2040 = ["defmt"]
arty = []
precursor = []
hosted = []
renode = []

View file

@ -26,6 +26,7 @@ renode = []
pio = ["xous-pio"]
dma-mainram = []
baremetal = []
debug-print = []
tests = ["pio", "cramium-hal"]
default = ["tests", "pio"]

View file

@ -33,16 +33,16 @@ pub fn basic_tests(pl230: &mut Pl230) -> bool {
const DMA_LEN: usize = 16;
// setup the PL230 to do a simple transfer between two memory regions
// dma_mainram feature will cause us to DMA between main memory regions. This works under RTL sims.
#[cfg(feature = "dma_mainram")]
// dma-mainram feature will cause us to DMA between main memory regions. This works under RTL sims.
#[cfg(feature = "dma-mainram")]
let mut region_a = [0u32; DMA_LEN];
#[cfg(feature = "dma_mainram")]
#[cfg(feature = "dma-mainram")]
let region_b = [0u32; DMA_LEN];
// The alternate is to DMA between IFRAM regions. This works under FPGA and RTL sim.
#[cfg(not(feature = "dma_mainram"))]
#[cfg(not(feature = "dma-mainram"))]
let region_a =
unsafe { core::slice::from_raw_parts_mut((utralib::HW_IFRAM0_MEM + 4096) as *mut u32, DMA_LEN) };
#[cfg(not(feature = "dma_mainram"))]
#[cfg(not(feature = "dma-mainram"))]
let region_b = unsafe { core::slice::from_raw_parts_mut(utralib::HW_IFRAM1_MEM as *mut u32, DMA_LEN) };
let mut state = 0x1111_1111;
for d in region_a.iter_mut() {

View file

@ -33,6 +33,11 @@ xous-swapper = { path = "../xous-swapper" }
"cramium-fpga" = ["utralib/cramium-fpga", "xous-pl230/cramium-fpga"]
"cramium-soc" = ["utralib/cramium-soc", "xous-pl230/cramium-soc"]
"hwsim" = []
"shellperf" = []
"mass-storage" = []
"clifford-poll" = []
"tts" = []
"early-ball" = []
"pio-test" = ["xous-pio"]
"pl230-test" = ["xous-pl230"]
"hwtest" = []

View file

@ -287,7 +287,7 @@ impl<'a> ShellCmdApi<'a> for Mbox {
match self.try_send(clifford_pkt) {
Ok(_) => {
write!(ret, "Packet send Ok\n").ok();
#[cfg(feature = "cifford-poll")]
#[cfg(feature = "clifford-poll")]
{
let start = env.ticktimer.elapsed_ms();
while self.poll_not_ready() {

View file

@ -36,6 +36,10 @@ rkyv = { version = "0.4.3", default-features = false, features = [
[features]
app-uart = []
pio = []
pio-memlcd = []
rawserial = []
pinger = []
swap = []
# add this feature to enable pre-emption
quantum-timer = ["utralib"]

View file

@ -74,6 +74,7 @@ mass-storage = ["usbd_scsi", "usbd_mass_storage"]
auto-trng = []
mjolnir = [
] # the big hammer for debugging Spinal USB issues. A raw memory dump of config and descriptor space. Use with care.
pinger = []
# cramium targets must specify no default features; this is necessary for cargo doc to work.
default = ["trng"]

View file

@ -489,7 +489,7 @@ fn swap_handler(
let ss = sss.inner.as_mut().expect("Shared state should be initialized");
let op: Option<KernelOp> = FromPrimitive::from_usize(opcode);
#[cfg(feature = "debug-print-verbose")]
#[cfg(feature = "debug-verbose")]
writeln!(DebugUart {}, "got Opcode: {:?}", op).ok();
match op {
Some(KernelOp::ReadFromSwap) => {

View file

@ -41,6 +41,7 @@ renode = ["utralib/renode", "susres/renode", "watchdog"]
cramium-soc = ["utralib/cramium-soc", "utralib/std"]
cramium-fpga = ["utralib/cramium-fpga"]
susres = []
debug-print = []
watchdog = []
timestamp = []