mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-19 09:00:54 +00:00
Merge branch 'main' of github.com:betrusted-io/xous-core
This commit is contained in:
commit
fd42770ee0
6 changed files with 27 additions and 7 deletions
|
|
@ -118,6 +118,7 @@ ditherpunk = ["png"]
|
||||||
tracking-alloc = ["tracking-allocator", "tracing", "tracing-subscriber"]
|
tracking-alloc = ["tracking-allocator", "tracing", "tracing-subscriber"]
|
||||||
dbg-ecupdate = [] # for issuing manual commands to initiate an EC update (vs UX). Also need to enable this feature in the status crate. Intended for debug only.
|
dbg-ecupdate = [] # for issuing manual commands to initiate an EC update (vs UX). Also need to enable this feature in the status crate. Intended for debug only.
|
||||||
test-rekey = []
|
test-rekey = []
|
||||||
|
no-codec = []
|
||||||
nettest = [] # batch network tests
|
nettest = [] # batch network tests
|
||||||
tls = ["rustls", "webpki-roots", "ring", "tungstenite", "url"]
|
tls = ["rustls", "webpki-roots", "ring", "tungstenite", "url"]
|
||||||
perfcounter = ["ring", "perflib", "xous/v2p"]
|
perfcounter = ["ring", "perflib", "xous/v2p"]
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ pub struct CommonEnv {
|
||||||
cb_registrations: HashMap::<u32, String::<256>>,
|
cb_registrations: HashMap::<u32, String::<256>>,
|
||||||
trng: Trng,
|
trng: Trng,
|
||||||
netmgr: net::NetManager,
|
netmgr: net::NetManager,
|
||||||
|
#[allow(dead_code)]
|
||||||
xns: xous_names::XousNames,
|
xns: xous_names::XousNames,
|
||||||
boot_instant: std::time::Instant,
|
boot_instant: std::time::Instant,
|
||||||
/// make this communal so any number of commands can trigger or reset the performance counter, and/or perform logging
|
/// make this communal so any number of commands can trigger or reset the performance counter, and/or perform logging
|
||||||
|
|
@ -86,7 +87,6 @@ impl CommonEnv {
|
||||||
|
|
||||||
///// 1. add your module here, and pull its namespace into the local crate
|
///// 1. add your module here, and pull its namespace into the local crate
|
||||||
mod echo; use echo::*;
|
mod echo; use echo::*;
|
||||||
mod test; use test::*;
|
|
||||||
mod sleep; use sleep::*;
|
mod sleep; use sleep::*;
|
||||||
mod sensors; use sensors::*;
|
mod sensors; use sensors::*;
|
||||||
// mod callback; use callback::*;
|
// mod callback; use callback::*;
|
||||||
|
|
@ -111,6 +111,11 @@ mod net_cmd; use net_cmd::*;
|
||||||
mod pddb_cmd; use pddb_cmd::*;
|
mod pddb_cmd; use pddb_cmd::*;
|
||||||
mod usb; use usb::*;
|
mod usb; use usb::*;
|
||||||
|
|
||||||
|
#[cfg(not(feature="no-codec"))]
|
||||||
|
mod test;
|
||||||
|
#[cfg(not(feature="no-codec"))]
|
||||||
|
use test::*;
|
||||||
|
|
||||||
#[cfg(feature="tts")]
|
#[cfg(feature="tts")]
|
||||||
mod tts;
|
mod tts;
|
||||||
#[cfg(feature="tts")]
|
#[cfg(feature="tts")]
|
||||||
|
|
@ -135,7 +140,6 @@ pub struct CmdEnv {
|
||||||
common_env: CommonEnv,
|
common_env: CommonEnv,
|
||||||
lastverb: String::<256>,
|
lastverb: String::<256>,
|
||||||
///// 2. declare storage for your command here.
|
///// 2. declare storage for your command here.
|
||||||
test_cmd: Test,
|
|
||||||
sleep_cmd: Sleep,
|
sleep_cmd: Sleep,
|
||||||
sensors_cmd: Sensors,
|
sensors_cmd: Sensors,
|
||||||
//callback_cmd: CallBack,
|
//callback_cmd: CallBack,
|
||||||
|
|
@ -154,6 +158,9 @@ pub struct CmdEnv {
|
||||||
wlan_cmd: Wlan,
|
wlan_cmd: Wlan,
|
||||||
usb_cmd: Usb,
|
usb_cmd: Usb,
|
||||||
|
|
||||||
|
#[cfg(not(feature="no-codec"))]
|
||||||
|
test_cmd: Test,
|
||||||
|
|
||||||
#[cfg(feature="tts")]
|
#[cfg(feature="tts")]
|
||||||
tts_cmd: Tts,
|
tts_cmd: Tts,
|
||||||
|
|
||||||
|
|
@ -226,7 +233,6 @@ impl CmdEnv {
|
||||||
common_env: common,
|
common_env: common,
|
||||||
lastverb: String::<256>::new(),
|
lastverb: String::<256>::new(),
|
||||||
///// 3. initialize your storage, by calling new()
|
///// 3. initialize your storage, by calling new()
|
||||||
test_cmd: Test::new(&xns),
|
|
||||||
sleep_cmd: Sleep::new(&xns),
|
sleep_cmd: Sleep::new(&xns),
|
||||||
sensors_cmd: Sensors::new(),
|
sensors_cmd: Sensors::new(),
|
||||||
//callback_cmd: CallBack::new(),
|
//callback_cmd: CallBack::new(),
|
||||||
|
|
@ -245,6 +251,9 @@ impl CmdEnv {
|
||||||
wlan_cmd: Wlan::new(),
|
wlan_cmd: Wlan::new(),
|
||||||
usb_cmd: Usb::new(),
|
usb_cmd: Usb::new(),
|
||||||
|
|
||||||
|
#[cfg(not(feature="no-codec"))]
|
||||||
|
test_cmd: Test::new(&xns),
|
||||||
|
|
||||||
#[cfg(feature="tts")]
|
#[cfg(feature="tts")]
|
||||||
tts_cmd: Tts::new(&xns),
|
tts_cmd: Tts::new(&xns),
|
||||||
|
|
||||||
|
|
@ -269,7 +278,6 @@ impl CmdEnv {
|
||||||
let commands: &mut [& mut dyn ShellCmdApi] = &mut [
|
let commands: &mut [& mut dyn ShellCmdApi] = &mut [
|
||||||
///// 4. add your command to this array, so that it can be looked up and dispatched
|
///// 4. add your command to this array, so that it can be looked up and dispatched
|
||||||
&mut echo_cmd,
|
&mut echo_cmd,
|
||||||
&mut self.test_cmd,
|
|
||||||
&mut self.sleep_cmd,
|
&mut self.sleep_cmd,
|
||||||
&mut self.sensors_cmd,
|
&mut self.sensors_cmd,
|
||||||
//&mut self.callback_cmd,
|
//&mut self.callback_cmd,
|
||||||
|
|
@ -292,6 +300,9 @@ impl CmdEnv {
|
||||||
&mut self.pddb_cmd,
|
&mut self.pddb_cmd,
|
||||||
&mut self.usb_cmd,
|
&mut self.usb_cmd,
|
||||||
|
|
||||||
|
#[cfg(not(feature="no-codec"))]
|
||||||
|
&mut self.test_cmd,
|
||||||
|
|
||||||
#[cfg(feature="tts")]
|
#[cfg(feature="tts")]
|
||||||
&mut self.tts_cmd,
|
&mut self.tts_cmd,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@ use xous_ipc::Buffer;
|
||||||
mod cmds;
|
mod cmds;
|
||||||
use cmds::*;
|
use cmds::*;
|
||||||
|
|
||||||
|
#[cfg(not(feature="no-codec"))]
|
||||||
mod oqc_test;
|
mod oqc_test;
|
||||||
|
|
||||||
#[cfg(feature="nettest")]
|
#[cfg(feature="nettest")]
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ precursor = ["utralib/precursor", "xous/precursor"]
|
||||||
hosted = ["utralib/hosted"]
|
hosted = ["utralib/hosted"]
|
||||||
renode = ["utralib/renode", "xous/renode"]
|
renode = ["utralib/renode", "xous/renode"]
|
||||||
extra_flush = []
|
extra_flush = []
|
||||||
default = []
|
default = ["extra_flush"]
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
test = true
|
test = true
|
||||||
|
|
|
||||||
|
|
@ -527,12 +527,18 @@ mod implementation {
|
||||||
/// Not sure why :-/, but, I stopped caring because ".word 0x500F" works!
|
/// Not sure why :-/, but, I stopped caring because ".word 0x500F" works!
|
||||||
#[inline]
|
#[inline]
|
||||||
fn flush_dcache(&self, _start: u32, _len: u32) {
|
fn flush_dcache(&self, _start: u32, _len: u32) {
|
||||||
// This instruction seems to be causing instability, omit it...
|
|
||||||
#[cfg(not(feature="extra_flush"))]
|
|
||||||
unsafe {
|
unsafe {
|
||||||
core::arch::asm!(
|
core::arch::asm!(
|
||||||
".word 0x500F",
|
".word 0x500F",
|
||||||
|
"nop",
|
||||||
|
"nop",
|
||||||
|
"nop",
|
||||||
|
"nop",
|
||||||
"fence",
|
"fence",
|
||||||
|
"nop",
|
||||||
|
"nop",
|
||||||
|
"nop",
|
||||||
|
"nop",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// augment with manual flushing, because the above instruction didn't seem to do the trick??
|
// augment with manual flushing, because the above instruction didn't seem to do the trick??
|
||||||
|
|
|
||||||
|
|
@ -296,6 +296,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
|
|
||||||
builder.target_precursor("2753c12-dvt")
|
builder.target_precursor("2753c12-dvt")
|
||||||
.add_services(&services)
|
.add_services(&services)
|
||||||
|
.add_feature("no-codec")
|
||||||
.add_apps(&get_cratespecs());
|
.add_apps(&get_cratespecs());
|
||||||
}
|
}
|
||||||
Some("tts") => {
|
Some("tts") => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue