From 76cf14c520091d00985f845203580e14c611ed14 Mon Sep 17 00:00:00 2001 From: Henrik Tjäder Date: Thu, 27 Aug 2020 11:21:56 +0000 Subject: Brutally yank out multicore --- macros/src/codegen/timer_queue.rs | 46 +++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 26 deletions(-) (limited to 'macros/src/codegen/timer_queue.rs') diff --git a/macros/src/codegen/timer_queue.rs b/macros/src/codegen/timer_queue.rs index 56304001..41f5520e 100644 --- a/macros/src/codegen/timer_queue.rs +++ b/macros/src/codegen/timer_queue.rs @@ -8,9 +8,9 @@ use crate::{analyze::Analysis, check::Extra, codegen::util}; pub fn codegen(app: &App, analysis: &Analysis, extra: &Extra) -> Vec { let mut items = vec![]; - for (&sender, timer_queue) in &analysis.timer_queues { - let cfg_sender = util::cfg_core(sender, app.args.cores); - let t = util::schedule_t_ident(sender); + if let Some(timer_queue) = &analysis.timer_queues.first() { + //let cfg_sender = util::cfg_core(sender, app.args.cores); + let t = util::schedule_t_ident(); // Enumeration of `schedule`-able tasks { @@ -27,9 +27,9 @@ pub fn codegen(app: &App, analysis: &Analysis, extra: &Extra) -> Vec>(); - let doc = format!("Tasks that can be scheduled from core #{}", sender); + let doc = format!("Tasks that can be scheduled"); items.push(quote!( - #cfg_sender + //#cfg_sender #[doc = #doc] #[allow(non_camel_case_types)] #[derive(Clone, Copy)] @@ -39,18 +39,18 @@ pub fn codegen(app: &App, analysis: &Analysis, extra: &Extra) -> Vec); - let section = util::link_section("bss", sender); + let section = util::link_section("bss"); items.push(quote!( - #cfg_sender + //#cfg_sender #[doc = #doc] #section static mut #tq: #tq_ty = rtic::export::TimerQueue( @@ -59,7 +59,7 @@ pub fn codegen(app: &App, analysis: &Analysis, extra: &Extra) -> Vec { priority: &'a rtic::export::Priority, } @@ -68,7 +68,7 @@ pub fn codegen(app: &App, analysis: &Analysis, extra: &Extra) -> Vec Vec Vec>(); let priority = timer_queue.priority; - let sys_tick = util::suffixed("SysTick", sender); - let section = util::link_section("text", sender); + let sys_tick = util::suffixed("SysTick"); + let section = util::link_section("text"); items.push(quote!( #[no_mangle] - #cfg_sender + //#cfg_sender #section unsafe fn #sys_tick() { use rtic::Mutex as _; @@ -137,7 +132,7 @@ pub fn codegen(app: &App, analysis: &Analysis, extra: &Extra) -> Vec Vec