# TACOS This is the Trajectory Analysis Control OS (TACOS) that serves as a starting point for developing TACOS-based projects, by implementing threads in the App directory. TACOS is a subset of the features provided by ALPAKA. In particular, TACOS consists of the STM32-specific components of sta-core, rtos-2 and rtos2-utils. ## Setting Up TACOS Clone the repository using `--recurse-submodules` and then add it to an existing CubeIDE FreeRTOS project. Be sure to add the include paths for Tacos, sta-core and rtos2-utils to the project with the following steps: ``` Properties -> C/C++ General -> Paths and Symbols -> Includes -> GNU C -> Add... Properties -> C/C++ General -> Paths and Symbols -> Includes -> GNU C++ -> Add... Properties -> C/C++ General -> Paths and Symbols -> Source Location -> Add Folder... ``` Under Core/Src/freertos.c you must call startALPAKA() from the default task. It should look like this: ``` void StartDefaultTask(void *argument) { /* USER CODE BEGIN StartDefaultTask */ extern void startALPAKA(void *); startALPAKA(argument); /* Infinite loop */ for(;;) { osDelay(1); } /* USER CODE END StartDefaultTask */ } ``` ## Configuring TACOS Be sure to add a "config.hpp" to the App/Inc/sta directory. This file could look like this: ``` #ifndef INC_STA_CONFIG_HPP_ #define INC_STA_CONFIG_HPP_ // Use the STM32F411 microprocessor. #include // Doesn't really do too much right now. Has to be added for successful compilation. #define STA_PRINTF_USE_STDLIB // Enable debug serial output and assertions. #define STA_ASSERT_FORCE #define STA_DEBUGGING_ENABLED // Activate the timer for microsecond delays. // #define STA_STM32_DELAY_ENABLE // #define STA_STM32_DELAY_US_TIM htim1 // Settings for the rtos-utils #define STA_RTOS_SYSTEM_EVENTS_ENABLE // #define STA_RTOS_SYSTEM_WATCHDOG_ENABLE // #define STA_RTOS_WATCHDOG_ENABLE // Settings for TACOS #define STA_TACOS_MANAGER_PRIORITY osPriorityNormal #define STA_TACOS_STATEMACHINE_PRIORITY osPriorityNormal // Statemachine settings. Here, we only have a single state which is also the initial state. #define STA_TACOS_NUM_STATES 3 #define STA_TACOS_INITIAL_STATE 0 #endif /* INC_STA_CONFIG_HPP_ */ ```