diff --git a/README.md b/README.md index f04f39c..9de5dce 100644 --- a/README.md +++ b/README.md @@ -99,15 +99,34 @@ In order to use TACOS, you need to provide a configuration file in the path `sta #endif /* INC_STA_CONFIG_HPP_ */ ``` -PS: For not officially supported chips use this as the include: + +> [!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`. If this setting is not enabled, your software will crash when debug printing floats. + +The configuration file shown in the example above initializes the project assuming that you are working on a STM32 Nucleo of type F407. Typically, you are using a different microcontroller, however. In this case you can replace the line ```cpp +#include +``` +with the include +```cpp +#include +``` +So far, only a few chips are officially supported. For not officially supported chips use this as the include: +```cpp +#define STA_STM32_SWD_USART_IDX + #include #define STA_MCU_LITTLE_ENDIAN #define STA_PLATFORM_STM32 ``` +> [!NOTE] +> The definition of `STA_STM32_SWD_USART_IDX` allows you to specify which UART handle to use for debug printing. If undefined, a default handle for Nucleos will be used. You can also add the macro `STA_STM32_ASEAG` instead if you are a cool kid using ASEAG-based hardware. -> [!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`. +> [!WARNING] +> The definition of `STA_STM32_SWD_USART_IDX` has to be placed _before_ the include `cpp #include ` + +> [!WARNING] +> Make sure you actually enable the UART bus in the under `Pinout & Configuration -> Connectivity` in the IOC. ### Implementing your own threads