Merge pull request #4506 from c1728p9/disable_2_error_trapping

Disable error trapping for mbed 2 builds
pull/4519/head
Jimmy Brisson 2017-06-09 14:22:30 -05:00 committed by GitHub
commit 761151359e
1 changed files with 2 additions and 2 deletions

View File

@ -277,7 +277,7 @@ extern "C" int PREFIX(_write)(FILEHANDLE fh, const unsigned char *buffer, unsign
#endif #endif
int n; // n is the number of bytes written int n; // n is the number of bytes written
#if defined(MBED_TRAP_ERRORS_ENABLED) && MBED_TRAP_ERRORS_ENABLED #if defined(MBED_TRAP_ERRORS_ENABLED) && MBED_TRAP_ERRORS_ENABLED && defined(MBED_CONF_RTOS_PRESENT)
if (core_util_is_isr_active() || !core_util_are_interrupts_enabled()) { if (core_util_is_isr_active() || !core_util_are_interrupts_enabled()) {
error("Error - writing to a file in an ISR or critical section\r\n"); error("Error - writing to a file in an ISR or critical section\r\n");
} }
@ -327,7 +327,7 @@ extern "C" int PREFIX(_read)(FILEHANDLE fh, unsigned char *buffer, unsigned int
#endif #endif
int n; // n is the number of bytes read int n; // n is the number of bytes read
#if defined(MBED_TRAP_ERRORS_ENABLED) && MBED_TRAP_ERRORS_ENABLED #if defined(MBED_TRAP_ERRORS_ENABLED) && MBED_TRAP_ERRORS_ENABLED && defined(MBED_CONF_RTOS_PRESENT)
if (core_util_is_isr_active() || !core_util_are_interrupts_enabled()) { if (core_util_is_isr_active() || !core_util_are_interrupts_enabled()) {
error("Error - reading from a file in an ISR or critical section\r\n"); error("Error - reading from a file in an ISR or critical section\r\n");
} }