From 857ed0a38044f9faccae07249e2d33338f32bf22 Mon Sep 17 00:00:00 2001 From: Rubin Gerritsen Date: Sun, 20 Sep 2020 20:08:30 +0200 Subject: [PATCH] boards: nrf52_bsim: no-op arm functions as defines The nrf52 bsim hw models now require some of these to be defined. For this case we cannot implement these as static inline functions as that would redefinitions of the functions. Signed-off-by: Rubin Gerritsen --- boards/posix/nrf52_bsim/cmsis.h | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/boards/posix/nrf52_bsim/cmsis.h b/boards/posix/nrf52_bsim/cmsis.h index dfce536ff71..e999a5deaf4 100644 --- a/boards/posix/nrf52_bsim/cmsis.h +++ b/boards/posix/nrf52_bsim/cmsis.h @@ -22,10 +22,21 @@ extern "C" { * - ARM Instruction Synchronization Barrier * - ARM No Operation */ -static inline void __DMB(void) {} -static inline void __DSB(void) {} -static inline void __ISB(void) {} -static inline void __NOP(void) {} +#ifndef __DMB +#define __DMB() +#endif + +#ifndef __DSB +#define __DSB() +#endif + +#ifndef __ISB +#define __ISB() +#endif + +#ifndef __NOP +#define __NOP() +#endif #ifdef __cplusplus }