diff --git a/platform/mbed_application.h b/platform/mbed_application.h index 77a6c45cb38..633b6a8572e 100644 --- a/platform/mbed_application.h +++ b/platform/mbed_application.h @@ -21,7 +21,12 @@ #include -#define MBED_APPLICATION_SUPPORT defined(__CORTEX_M3) || defined(__CORTEX_M4) || defined(__CORTEX_M7) +#if defined(__CORTEX_M3) || defined(__CORTEX_M4) || defined(__CORTEX_M7) +#define MBED_APPLICATION_SUPPORT 1 +#else +#define MBED_APPLICATION_SUPPORT 0 +#endif + #if MBED_APPLICATION_SUPPORT #ifdef __cplusplus extern "C" { diff --git a/platform/mbed_critical.c b/platform/mbed_critical.c index 5068ab23d3d..de0f1c546ed 100644 --- a/platform/mbed_critical.c +++ b/platform/mbed_critical.c @@ -23,7 +23,11 @@ #include "platform/mbed_assert.h" #include "platform/mbed_toolchain.h" -#define EXCLUSIVE_ACCESS (!defined (__CORTEX_M0) && !defined (__CORTEX_M0PLUS)) +#if !defined (__CORTEX_M0) && !defined (__CORTEX_M0PLUS) +#define EXCLUSIVE_ACCESS 1 +#else +#define EXCLUSIVE_ACCESS 0 +#endif static volatile uint32_t interrupt_enable_counter = 0; static volatile bool critical_interrupts_disabled = false;