mirror of https://github.com/ARMmbed/mbed-os.git
and armcc. 1. Remove use of printf from all code that may be directly or indirectly invoked from an interrupt context, 2. For occasions where a printf is required and the code in question may run both inside and outside an interrupt context, add a new interrupt safe version of printf, utest_printf(). This function will only pass its arguments down to printf if interrupts are not disabled. 3. In harness.cpp, is_busy() , fix a bug where the function can return leaving interrupts disabled. 4. In unity_handler.cpp add a new function, utest_safe_putc(), This is used to override the default putc() function used by Unity. This version checks that the current code does not have interrupts disabled prior to outputting the character to the serial port. This overriding is enabled by adding unity_config.h to the unity code and redefining UNITY_OUTPUT_CHAR to utest_safe_putc(). The new config file is included in the build by adding the define UNITY_INCLUDE_CONFIG_H. The Unity changes are submitted under a separate PR. This change ensures that any Unity ASSERTS executed from within interrupt context are safe. |
||
---|---|---|
.. | ||
utest | ||
greentea-client.lib | ||
unity.lib |