Access to serial device is allowed when DEVICE_SERIAL is defined

pull/5733/head
Deepika 2017-10-10 22:29:05 -05:00
parent 9ebefcd63d
commit 5bc33b94f8
1 changed files with 3 additions and 0 deletions

View File

@ -351,7 +351,9 @@ extern "C" void PREFIX(_exit)(int return_code) {
} }
extern "C" void _ttywrch(int ch) { extern "C" void _ttywrch(int ch) {
#if DEVICE_SERIAL
serial_putc(&stdio_uart, ch); serial_putc(&stdio_uart, ch);
#endif
} }
#endif #endif
@ -739,6 +741,7 @@ extern "C" int errno;
// Dynamic memory allocation related syscall. // Dynamic memory allocation related syscall.
#if defined(TARGET_NUVOTON) #if defined(TARGET_NUVOTON)
// Overwrite _sbrk() to support two region model (heap and stack are two distinct regions). // Overwrite _sbrk() to support two region model (heap and stack are two distinct regions).
// __wrap__sbrk() is implemented in: // __wrap__sbrk() is implemented in:
// TARGET_NUMAKER_PFM_NUC472 targets/TARGET_NUVOTON/TARGET_NUC472/TARGET_NUMAKER_PFM_NUC472/TOOLCHAIN_GCC_ARM/nuc472_retarget.c // TARGET_NUMAKER_PFM_NUC472 targets/TARGET_NUVOTON/TARGET_NUC472/TARGET_NUMAKER_PFM_NUC472/TOOLCHAIN_GCC_ARM/nuc472_retarget.c