From cf5466fe5546c4331889266956ed03cb0aad389b Mon Sep 17 00:00:00 2001 From: dario Date: Sun, 15 Oct 2023 21:49:41 +0200 Subject: [PATCH] Changed execution order in ALPAKA initialization --- include/sta/rtos/debug.hpp | 28 ++++++++++++++++++++++++++++ src/system/startup.cpp | 6 +++--- 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 include/sta/rtos/debug.hpp diff --git a/include/sta/rtos/debug.hpp b/include/sta/rtos/debug.hpp new file mode 100644 index 0000000..aa58cba --- /dev/null +++ b/include/sta/rtos/debug.hpp @@ -0,0 +1,28 @@ +/* + * debug.hpp + * + * Created on: Oct 15, 2023 + * Author: Dario + */ + +#ifndef RTOS2_UTILS_INCLUDE_STA_RTOS_DEBUG_HPP_ +#define RTOS2_UTILS_INCLUDE_STA_RTOS_DEBUG_HPP_ + +#include +#ifdef STA_DEBUGGING_ENABLED + +# define STA_DEBUG_THREADS() \ +{ \ + + +} + + +#else // !STA_DEBUGGING_ENABLED + +# define STA_DEBUG_THREADS() ((void)0) + + +#endif // STA_DEBUGGING_ENABLED + +#endif /* RTOS2_UTILS_INCLUDE_STA_RTOS_DEBUG_HPP_ */ diff --git a/src/system/startup.cpp b/src/system/startup.cpp index 9636bd7..f68decc 100644 --- a/src/system/startup.cpp +++ b/src/system/startup.cpp @@ -44,15 +44,15 @@ void startALPAKA(void * arg) { STA_ASSERT_MSG(osKernelGetState() != osKernelInactive, "Cannot call startALPAKA() before osKernelInitialize()"); - // Call further initialization code - sta::rtos::startupExtras(arg); - // Initialize HAL sta::initHAL(); // Initialize RTOS system resources sta::rtos::initSystem(); + // Call further initialization code + sta::rtos::startupExtras(arg); + // Wake threads sta::rtos::signalStartupEvent();