I am trying to debug a code that was written with little error checking. I want to output via debug printf what the functions have returned, so whether threads were suspended or not. In this case the osStatus_t enum. Is there something similar to perror, that I can use here?
Only whatever you write yourself. The Watch window ought to decode them (as it will for enums it can 'see'). EventRecorder can be configured to decode the values, if you use EventRecorder.
That is what I thought. I am struggling to get the EventRecorder to work. It never shows any events and since I only have a ULINK 2 ME, the only other option that is left for me is printf debug.
How is EventRecorder (ER) not working? How are you configuring ER? uVision Help has several sections on ER. The online help has a very good explanation of how to configure and use ER.
The pack installer includes several example ER projects for the Cortex-M4 -- look for the SCVD examples on the Examples tab. These are for simulation only, but the code to initialize and configure EventRecorder would still work on a real device.
It works now. It did not record any events, because the RTX Kernel did not start due to some deprecated header files. Since I've updated them I can at least see the EventRecorder initialization. Nothing more at this point, but I this is related to the code.
View all questions in Keil forum