From 60f0342b697cdddbab9c0e8c6d772bc7aab9de38 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Sat, 11 Feb 2023 08:55:19 +0100 Subject: Break out core specific codegen to bindings --- rtic-macros/src/codegen/bindings.rs | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 rtic-macros/src/codegen/bindings.rs (limited to 'rtic-macros/src/codegen/bindings.rs') diff --git a/rtic-macros/src/codegen/bindings.rs b/rtic-macros/src/codegen/bindings.rs new file mode 100644 index 0000000..1efe0ce --- /dev/null +++ b/rtic-macros/src/codegen/bindings.rs @@ -0,0 +1,5 @@ +// TODO: Feature gate +mod cortex; + +// TODO: Feature gate +pub use cortex::*; -- cgit v1.2.3 From b9e0f36aff96ec4e39cf4f728777cbc808df2c78 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Sun, 19 Feb 2023 14:30:49 +0100 Subject: Add feature flags --- rtic-macros/src/codegen/bindings.rs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'rtic-macros/src/codegen/bindings.rs') diff --git a/rtic-macros/src/codegen/bindings.rs b/rtic-macros/src/codegen/bindings.rs index 1efe0ce..a187820 100644 --- a/rtic-macros/src/codegen/bindings.rs +++ b/rtic-macros/src/codegen/bindings.rs @@ -1,5 +1,18 @@ -// TODO: Feature gate -mod cortex; +#[cfg(not(any( + feature = "cortex_m_source_masking", + feature = "cortex_m_basepri", + feaute = "test_template" +)))] +compile_error!("No backend selected"); + +#[cfg(any(feature = "cortex_m_source_masking", feature = "cortex_m_basepri"))] +pub use cortex::*; -// TODO: Feature gate +#[cfg(feature = "test_template")] pub use cortex::*; + +#[cfg(any(feature = "cortex_m_source_masking", feature = "cortex_m_basepri"))] +mod cortex; + +#[cfg(feature = "test_template")] +mod template; -- cgit v1.2.3 From 4442c4692634c90ba60653d42d72f9f259ae1a16 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Mon, 20 Feb 2023 20:56:18 +0100 Subject: Update backend features to be more clear --- rtic-macros/src/codegen/bindings.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'rtic-macros/src/codegen/bindings.rs') diff --git a/rtic-macros/src/codegen/bindings.rs b/rtic-macros/src/codegen/bindings.rs index a187820..68378b5 100644 --- a/rtic-macros/src/codegen/bindings.rs +++ b/rtic-macros/src/codegen/bindings.rs @@ -1,18 +1,18 @@ #[cfg(not(any( - feature = "cortex_m_source_masking", - feature = "cortex_m_basepri", - feaute = "test_template" + feature = "cortex-m-source-masking", + feature = "cortex-m-basepri", + feaute = "test-template" )))] compile_error!("No backend selected"); -#[cfg(any(feature = "cortex_m_source_masking", feature = "cortex_m_basepri"))] +#[cfg(any(feature = "cortex-m-source-masking", feature = "cortex-m-basepri"))] pub use cortex::*; -#[cfg(feature = "test_template")] +#[cfg(feature = "test-template")] pub use cortex::*; -#[cfg(any(feature = "cortex_m_source_masking", feature = "cortex_m_basepri"))] +#[cfg(any(feature = "cortex-m-source-masking", feature = "cortex-m-basepri"))] mod cortex; -#[cfg(feature = "test_template")] +#[cfg(feature = "test-template")] mod template; -- cgit v1.2.3 From 1c26eb722f7911737b7973982563a12bc3fb4164 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Wed, 22 Feb 2023 19:59:50 +0100 Subject: Add template for bindings --- rtic-macros/src/codegen/bindings.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rtic-macros/src/codegen/bindings.rs') diff --git a/rtic-macros/src/codegen/bindings.rs b/rtic-macros/src/codegen/bindings.rs index 68378b5..6c214cd 100644 --- a/rtic-macros/src/codegen/bindings.rs +++ b/rtic-macros/src/codegen/bindings.rs @@ -1,7 +1,7 @@ #[cfg(not(any( feature = "cortex-m-source-masking", feature = "cortex-m-basepri", - feaute = "test-template" + feature = "test-template" )))] compile_error!("No backend selected"); @@ -9,7 +9,7 @@ compile_error!("No backend selected"); pub use cortex::*; #[cfg(feature = "test-template")] -pub use cortex::*; +pub use template::*; #[cfg(any(feature = "cortex-m-source-masking", feature = "cortex-m-basepri"))] mod cortex; -- cgit v1.2.3