From d7aa5cc9451c4637098f9f0491c29c79fc328375 Mon Sep 17 00:00:00 2001 From: WestfW Date: Mon, 18 Dec 2017 18:38:58 -0800 Subject: [PATCH] Remove printf call from _exit in syscalls_sam3.c The use of printf here is problematic (stdio and/or uart is probably not even set up) and expensive (~10k of code!) See https://github.com/arduino/ArduinoCore-sam/issues/47 --- cores/arduino/syscalls_sam3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cores/arduino/syscalls_sam3.c b/cores/arduino/syscalls_sam3.c index 3ea76659..6728c9e0 100644 --- a/cores/arduino/syscalls_sam3.c +++ b/cores/arduino/syscalls_sam3.c @@ -132,7 +132,8 @@ extern int _write( UNUSED(int file), char *ptr, int len ) extern void _exit( int status ) { - printf( "Exiting with status %d.\n", status ) ; +// printf is probably not set up by Arduino, and shouldn't be used. +// printf( "Exiting with status %d.\n", status ) ; for ( ; ; ) ; }