1 # Non-blocking blink example 2 3 This is an example/template of a bare metal, event triggered application that 4 runs tasks secuentally for STM32 boards using HAL library, in particular 5 STM32F103RB on NUCLEO-F103RB board. 6 7 ## Execution stack 8 9 The main loop calls the main app and then this app executes the attached tasks 10 secuentially in order: `task_sensor`, `task_system` and `task_actuator`. 11 12 ## Debug 13 14 In Stm32CubeIDE Project Explorer view right click over the project, then debug 15 configurations. In Debugger tab set Debug probe as ST-LINK (OpenOCD) and after 16 pressing Show generator options setupReset Mode as Software system reset. 17 In Startup tab add 'monitor arm semihosting enable' to the initialization 18 commands. Finally Apply and Close (or Debug). 19 20 ## Running without IDE 21 22 By default the code is written to run with the Stm32CubeIDE opened and in debug 23 mode, this by using semihosting. Semihosting is a way to log to the host console 24 via the attached debugger (without using an additional serial port). But if a 25 host console is not detected during initilization the program will halt. 26 27 To run code without debug mode or without having the IDE opened semihosting 28 needs to be disabled. This is done by defining the macro 29 `LOGGER_CONFIG_USE_SEMIHOSTING` as `0` instead of `1` in the file `app/logger.h`.
