From 1f9af8ebc0a5e5f8c497bca2864f71b439158a6f Mon Sep 17 00:00:00 2001 From: dario Date: Sat, 7 Dec 2024 13:53:57 +0000 Subject: [PATCH] README.md aktualisiert --- README.md | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 6195cf9..f04f39c 100644 --- a/README.md +++ b/README.md @@ -84,25 +84,13 @@ In order to use TACOS, you need to provide a configuration file in the path `sta #ifndef INC_STA_CONFIG_HPP_ #define INC_STA_CONFIG_HPP_ -// Using a board with an ASEAG module present. -#define STA_STM32_ASEAG // Use the STM32F407 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_ASSERT_ENABLED #define STA_DEBUGGING_ENABLED -// Enable Features -#define STA_RTOS_SYSTEM_EVENTS_ENABLE -// #define STA_RTOS_SYSTEM_WATCHDOG_ENABLE -// #define STA_RTOS_WATCHDOG_ENABLE -// #define STA_TACOS_WATCHDOG_FREQUENCY 10000 -#define STA_CAN_BUS_ENABLE - // Statemachine settings. #define STA_TACOS_NUM_STATES 3 @@ -118,6 +106,9 @@ PS: For not officially supported chips use this as the include: #define STA_PLATFORM_STM32 ``` +> [!WARNING] +> If you want to use debug printing (enabled using the macro `STA_DEBUGGING_ENABLED`) in a TACOS project, you should also enable float formatting under `Project Settings -> C/C++ Build -> MPU/MCU Settings -> Use float with printf from newlib-nano`. This allows you to format print floats using `STA_DEBUG_PRINTF`. + ### Implementing your own threads Let's create a simple thread that prints "Hello World" every second. First create a new file in the `App/Inc/tasks` folder called `spam_task.hpp`. Then add the following code: @@ -148,6 +139,7 @@ This code defines a new thread that inherits from `TacosThread` and implements t Now create a new file in the `App/Src/tasks` folder called `spam_task.cpp` and add the following code: ```cpp #include +#include namespace tasks { SpamTask::SpamTask() :