mirror of https://github.com/ARMmbed/mbed-os.git
Disable printf in crash reporting for release builds
parent
2c5ae4aac2
commit
c04cd4eefb
|
@ -211,7 +211,9 @@ mbed_error_status_t mbed_error_initialize(void)
|
||||||
if ((report_error_ctx->crc_error_ctx == crc_val) && (report_error_ctx->is_error_processed == 0)) {
|
if ((report_error_ctx->crc_error_ctx == crc_val) && (report_error_ctx->is_error_processed == 0)) {
|
||||||
is_reboot_error_valid = true;
|
is_reboot_error_valid = true;
|
||||||
//Report the error info
|
//Report the error info
|
||||||
|
#ifndef NDEBUG
|
||||||
printf("\n== The system has been rebooted due to a fatal error. ==\n");
|
printf("\n== The system has been rebooted due to a fatal error. ==\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
//Call the mbed_error_reboot_callback, this enables applications to do some handling before we do the handling
|
//Call the mbed_error_reboot_callback, this enables applications to do some handling before we do the handling
|
||||||
mbed_error_reboot_callback(report_error_ctx);
|
mbed_error_reboot_callback(report_error_ctx);
|
||||||
|
@ -223,7 +225,9 @@ mbed_error_status_t mbed_error_initialize(void)
|
||||||
#if MBED_CONF_PLATFORM_FATAL_ERROR_AUTO_REBOOT_ENABLED
|
#if MBED_CONF_PLATFORM_FATAL_ERROR_AUTO_REBOOT_ENABLED
|
||||||
if (report_error_ctx->error_reboot_count >= MBED_CONF_PLATFORM_ERROR_REBOOT_MAX) {
|
if (report_error_ctx->error_reboot_count >= MBED_CONF_PLATFORM_ERROR_REBOOT_MAX) {
|
||||||
//We have rebooted more than enough, hold the system here.
|
//We have rebooted more than enough, hold the system here.
|
||||||
|
#ifndef NDEBUG
|
||||||
printf("\n== Reboot count(=%ld) exceeded maximum, system halting ==\n", report_error_ctx->error_reboot_count);
|
printf("\n== Reboot count(=%ld) exceeded maximum, system halting ==\n", report_error_ctx->error_reboot_count);
|
||||||
|
#endif
|
||||||
mbed_halt_system();
|
mbed_halt_system();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue