Index: tools/configure =================================================================== --- tools/configure (revision 30429) +++ tools/configure (working copy) @@ -17,6 +17,7 @@ extradefines="" use_logf="#undef ROCKBOX_HAS_LOGF" use_bootchart="#undef DO_BOOTCHART" +use_logf_serial="#undef LOGF_SERIAL" scriptver=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'` @@ -684,7 +685,7 @@ echo "" printf "Enter your developer options (press only enter when done)\n\ (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\ -(T)est plugins, S(m)all C lib:" +(T)est plugins, S(m)all C lib, Logf to Ser(i)al port:" if [ "$memory" = "2" ]; then printf ", (8)MB MOD" fi @@ -734,10 +735,15 @@ extradefines="$extradefines -DHAVE_TEST_PLUGINS" ;; [Cc]) - echo "bootchart enabled (logf also enabled)" + echo "bootchart enabled (logf also enabled)" bootchart="yes" logf="yes" ;; + [Ii]) + echo "Logf to serial port enabled (logf also enabled)" + logf="yes" + logf_serial="yes" + ;; [Ss]) echo "Simulator build enabled" simulator="yes" @@ -823,6 +829,9 @@ if [ "yes" = "$logf" ]; then use_logf="#define ROCKBOX_HAS_LOGF 1" fi + if [ "yes" = "$logf_serial" ]; then + use_logf_serial="#define LOGF_SERIAL 1" + fi if [ "yes" = "$bootchart" ]; then use_bootchart="#define DO_BOOTCHART 1" fi @@ -3549,6 +3558,9 @@ /* Define this if you build rockbox to support the logf logging and display */ ${use_logf} +/* Define this if you want logf to output to the serial port */ +${use_logf_serial} + /* Define this to record a chart with timings for the stages of boot */ ${use_bootchart} Index: firmware/logf.c =================================================================== --- firmware/logf.c (revision 30429) +++ firmware/logf.c (working copy) @@ -186,7 +186,7 @@ logfbuffer[logfindex++] = c; check_logfindex(); -#if defined(HAVE_SERIAL) && !defined(SIMULATOR) +#if defined(HAVE_SERIAL) && !defined(SIMULATOR) && defined(LOGF_SERIAL) if(c != '\0') { char buf[2]; @@ -223,7 +223,7 @@ /* add trailing zero */ logf_push(NULL, '\0'); -#if defined(HAVE_SERIAL) && !defined(SIMULATOR) +#if defined(HAVE_SERIAL) && !defined(SIMULATOR) && defined(LOGF_SERIAL) serial_tx("\r\n"); #endif #ifdef USB_ENABLE_SERIAL