Skip to content

Commit 1b53aab

Browse files
authored
Merge pull request #5733 from deepikabhavnani/non_rtos_serial_fix
Access to serial device is allowed when DEVICE_SERIAL is defined
2 parents a4d1dee + 5bc33b9 commit 1b53aab

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

platform/mbed_retarget.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,9 @@ extern "C" void PREFIX(_exit)(int return_code) {
351351
}
352352

353353
extern "C" void _ttywrch(int ch) {
354+
#if DEVICE_SERIAL
354355
serial_putc(&stdio_uart, ch);
356+
#endif
355357
}
356358
#endif
357359

@@ -739,6 +741,7 @@ extern "C" int errno;
739741

740742
// Dynamic memory allocation related syscall.
741743
#if defined(TARGET_NUVOTON)
744+
742745
// Overwrite _sbrk() to support two region model (heap and stack are two distinct regions).
743746
// __wrap__sbrk() is implemented in:
744747
// TARGET_NUMAKER_PFM_NUC472 targets/TARGET_NUVOTON/TARGET_NUC472/TARGET_NUMAKER_PFM_NUC472/TOOLCHAIN_GCC_ARM/nuc472_retarget.c

0 commit comments

Comments
 (0)