From 5e895b4db6b73b90d76177723ecffa94910071b2 Mon Sep 17 00:00:00 2001 From: Ronak Patel <98669069+Rosnaky@users.noreply.github.com> Date: Sun, 18 Jan 2026 20:27:52 -0500 Subject: [PATCH] Remove startup threads --- stm32l552xx/boardfiles/model/src/drivers.cpp | 4 ++++ .../rtos/threads/inc/startup_threads.hpp | 5 ---- .../rtos/threads/inc/unified_threads.hpp | 1 - .../rtos/threads/src/startup_threads.cpp | 24 ------------------- .../rtos/threads/src/unified_threads.cpp | 1 - 5 files changed, 4 insertions(+), 31 deletions(-) delete mode 100644 stm32l552xx/boardfiles/rtos/threads/inc/startup_threads.hpp delete mode 100644 stm32l552xx/boardfiles/rtos/threads/src/startup_threads.cpp diff --git a/stm32l552xx/boardfiles/model/src/drivers.cpp b/stm32l552xx/boardfiles/model/src/drivers.cpp index 55b9a4aa..58adc9ad 100644 --- a/stm32l552xx/boardfiles/model/src/drivers.cpp +++ b/stm32l552xx/boardfiles/model/src/drivers.cpp @@ -122,6 +122,9 @@ void initDrivers() tmQueueHandle = new (&tmQueueStorage) MessageQueue(&tmQueueId); messageBufferHandle = new (&messageBufferStorage) MessageQueue(&messageBufferId); + // Initialize core utilities + loggerHandle->init(); + // Initialize hardware components leftAileronMotorHandle->init(); rightAileronMotorHandle->init(); @@ -136,6 +139,7 @@ void initDrivers() gpsHandle->init(); imuHandle->init(); pmHandle->init(); + // Motor instance bindings leftAileronMotorInstance = {leftAileronMotorHandle, true}; diff --git a/stm32l552xx/boardfiles/rtos/threads/inc/startup_threads.hpp b/stm32l552xx/boardfiles/rtos/threads/inc/startup_threads.hpp deleted file mode 100644 index 52b9ab96..00000000 --- a/stm32l552xx/boardfiles/rtos/threads/inc/startup_threads.hpp +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#include "cmsis_os2.h" - -void startUpInitThreads(); diff --git a/stm32l552xx/boardfiles/rtos/threads/inc/unified_threads.hpp b/stm32l552xx/boardfiles/rtos/threads/inc/unified_threads.hpp index 1f97588d..fb33e66a 100644 --- a/stm32l552xx/boardfiles/rtos/threads/inc/unified_threads.hpp +++ b/stm32l552xx/boardfiles/rtos/threads/inc/unified_threads.hpp @@ -1,6 +1,5 @@ #pragma once -#include "startup_threads.hpp" #include "am_threads.hpp" #include "sm_threads.hpp" #include "tm_threads.hpp" diff --git a/stm32l552xx/boardfiles/rtos/threads/src/startup_threads.cpp b/stm32l552xx/boardfiles/rtos/threads/src/startup_threads.cpp deleted file mode 100644 index 342c14ff..00000000 --- a/stm32l552xx/boardfiles/rtos/threads/src/startup_threads.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include "startup_threads.hpp" -#include "managers.hpp" -#include "utils.h" -#include "logger.hpp" - -osThreadId_t startUpMainHandle; -extern Logger * loggerHandle; - -static const osThreadAttr_t startUpAttr = { - .name = "startUpMain", - .stack_size = 1024, - .priority = (osPriority_t) osPriorityHigh -}; - -void startUpMain(void *arg) -{ - loggerHandle->init(); - vTaskDelete(NULL); -} - -void startUpInitThreads() -{ - startUpMainHandle = osThreadNew(startUpMain, NULL, &startUpAttr); -} diff --git a/stm32l552xx/boardfiles/rtos/threads/src/unified_threads.cpp b/stm32l552xx/boardfiles/rtos/threads/src/unified_threads.cpp index 3f40d054..29f4fd1d 100644 --- a/stm32l552xx/boardfiles/rtos/threads/src/unified_threads.cpp +++ b/stm32l552xx/boardfiles/rtos/threads/src/unified_threads.cpp @@ -2,7 +2,6 @@ void initThreads() { - startUpInitThreads(); amInitThreads(); smInitThreads(); tmInitThreads();