mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
add a no-codec feature for DVT builds
specifying this turns off all dependencies that rely on the codec, which is a different device on DVT.
This commit is contained in:
parent
fc8f2a25e8
commit
c127f00dc1
4 changed files with 18 additions and 4 deletions
|
|
@ -118,6 +118,7 @@ ditherpunk = ["png"]
|
|||
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.
|
||||
test-rekey = []
|
||||
no-codec = []
|
||||
nettest = [] # batch network tests
|
||||
tls = ["rustls", "webpki-roots", "ring", "tungstenite", "url"]
|
||||
perfcounter = ["ring", "perflib", "xous/v2p"]
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ pub struct CommonEnv {
|
|||
cb_registrations: HashMap::<u32, String::<256>>,
|
||||
trng: Trng,
|
||||
netmgr: net::NetManager,
|
||||
#[allow(dead_code)]
|
||||
xns: xous_names::XousNames,
|
||||
boot_instant: std::time::Instant,
|
||||
/// 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
|
||||
mod echo; use echo::*;
|
||||
mod test; use test::*;
|
||||
mod sleep; use sleep::*;
|
||||
mod sensors; use sensors::*;
|
||||
// mod callback; use callback::*;
|
||||
|
|
@ -111,6 +111,11 @@ mod net_cmd; use net_cmd::*;
|
|||
mod pddb_cmd; use pddb_cmd::*;
|
||||
mod usb; use usb::*;
|
||||
|
||||
#[cfg(not(feature="no-codec"))]
|
||||
mod test;
|
||||
#[cfg(not(feature="no-codec"))]
|
||||
use test::*;
|
||||
|
||||
#[cfg(feature="tts")]
|
||||
mod tts;
|
||||
#[cfg(feature="tts")]
|
||||
|
|
@ -135,7 +140,6 @@ pub struct CmdEnv {
|
|||
common_env: CommonEnv,
|
||||
lastverb: String::<256>,
|
||||
///// 2. declare storage for your command here.
|
||||
test_cmd: Test,
|
||||
sleep_cmd: Sleep,
|
||||
sensors_cmd: Sensors,
|
||||
//callback_cmd: CallBack,
|
||||
|
|
@ -154,6 +158,9 @@ pub struct CmdEnv {
|
|||
wlan_cmd: Wlan,
|
||||
usb_cmd: Usb,
|
||||
|
||||
#[cfg(not(feature="no-codec"))]
|
||||
test_cmd: Test,
|
||||
|
||||
#[cfg(feature="tts")]
|
||||
tts_cmd: Tts,
|
||||
|
||||
|
|
@ -226,7 +233,6 @@ impl CmdEnv {
|
|||
common_env: common,
|
||||
lastverb: String::<256>::new(),
|
||||
///// 3. initialize your storage, by calling new()
|
||||
test_cmd: Test::new(&xns),
|
||||
sleep_cmd: Sleep::new(&xns),
|
||||
sensors_cmd: Sensors::new(),
|
||||
//callback_cmd: CallBack::new(),
|
||||
|
|
@ -245,6 +251,9 @@ impl CmdEnv {
|
|||
wlan_cmd: Wlan::new(),
|
||||
usb_cmd: Usb::new(),
|
||||
|
||||
#[cfg(not(feature="no-codec"))]
|
||||
test_cmd: Test::new(&xns),
|
||||
|
||||
#[cfg(feature="tts")]
|
||||
tts_cmd: Tts::new(&xns),
|
||||
|
||||
|
|
@ -269,7 +278,6 @@ impl CmdEnv {
|
|||
let commands: &mut [& mut dyn ShellCmdApi] = &mut [
|
||||
///// 4. add your command to this array, so that it can be looked up and dispatched
|
||||
&mut echo_cmd,
|
||||
&mut self.test_cmd,
|
||||
&mut self.sleep_cmd,
|
||||
&mut self.sensors_cmd,
|
||||
//&mut self.callback_cmd,
|
||||
|
|
@ -292,6 +300,9 @@ impl CmdEnv {
|
|||
&mut self.pddb_cmd,
|
||||
&mut self.usb_cmd,
|
||||
|
||||
#[cfg(not(feature="no-codec"))]
|
||||
&mut self.test_cmd,
|
||||
|
||||
#[cfg(feature="tts")]
|
||||
&mut self.tts_cmd,
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ use xous_ipc::Buffer;
|
|||
mod cmds;
|
||||
use cmds::*;
|
||||
|
||||
#[cfg(not(feature="no-codec"))]
|
||||
mod oqc_test;
|
||||
|
||||
#[cfg(feature="nettest")]
|
||||
|
|
|
|||
|
|
@ -296,6 +296,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
|
||||
builder.target_precursor("2753c12-dvt")
|
||||
.add_services(&services)
|
||||
.add_feature("no-codec")
|
||||
.add_apps(&get_cratespecs());
|
||||
}
|
||||
Some("tts") => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue