semf
|
Having errors in a source code is always a pain. Debugging is time consuming but most of the time leads to the goal. To have simple debugging messages available and make it more efficient we added a method to semf where you can easily get messages from the semf library if an error in the target hardware or in the library occurres.
First define USE_SEMF_ASSERT
. The best way to do that is to add it as a Symbol in the project settings (e.g. Project -> Properties -> C/C++ General -> Paths and Symbols -> Symbols in Eclipse based IDEs).
Secondly implement the assertFailed
function in your project, for example in the maincpp.cpp
file.
For debugging it is often helpful to have printf functionallity available through e.g. UART or SWD. Refer to your micocontrollers documentation on how to set this up.