defragster
Senior Member+
I'm occasional working at a debug library to share and asked for a FASTER LTO compile so I could watch my windows disk traffic.
Turns out the code won't compile 2 of my 3 examples: HardFaults, DebugTest fail but a third Asserts doesn't have any trouble compiling/uploading/running? Using default compile optimizations I've never seen trouble.
Nothing magic about the library - it just adds live code for the Hard Faults [off by default in PJRC release] and then keeps the I/O alive {using PJRC code] to push out text messages to give feedback and allow USB to stay alive to reprogram without button.
I'm compiling for a T_3.6, but not sure that matters - no special code expected to work on all the ARMS.
The Error text I get on the above sketch 'DebugTest' in examples of the library with FAST/FASTER w/LTO below appears as:
Here is the WIP to unzip into active libraries folder - problem sketches are in the examples folder::
View attachment debug_t3.zip
Turns out the code won't compile 2 of my 3 examples: HardFaults, DebugTest fail but a third Asserts doesn't have any trouble compiling/uploading/running? Using default compile optimizations I've never seen trouble.
Nothing magic about the library - it just adds live code for the Hard Faults [off by default in PJRC release] and then keeps the I/O alive {using PJRC code] to push out text messages to give feedback and allow USB to stay alive to reprogram without button.
I'm compiling for a T_3.6, but not sure that matters - no special code expected to work on all the ARMS.
The Error text I get on the above sketch 'DebugTest' in examples of the library with FAST/FASTER w/LTO below appears as:
Linking everything together...
"T:\\arduino_1.8.5_142_TYC\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-gcc" -O2 -flto -fno-fat-lto-objects -Wl,--gc-sections,--relax,--defsym=__rtc_localtime=1534210583 "-TT:\\arduino_1.8.5_142_TYC\\hardware\\teensy\\avr\\cores\\teensy3/mk66fx1m0.ld" -lstdc++ -fuse-linker-plugin -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -o "T:\\TEMP\\arduino_build_723063/DebugTest.ino.elf" "T:\\TEMP\\arduino_build_723063\\sketch\\DebugTest.ino.cpp.o" "T:\\TEMP\\arduino_build_723063\\libraries\\debug_t3\\debug_t3.cpp.o" "T:\\TEMP\\arduino_build_723063/..\\arduino_cache_508721\\core\\core_teensy_avr_teensy36_usb_serial,speed_180,opt_o2lto,keys_en-us_6eba4e858d7c3fc764c7c08715f56282.a" "-LT:\\TEMP\\arduino_build_723063" -larm_cortexM4lf_math -lm
t:/arduino_1.8.5_142_tyc/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/lib/armv7e-m/fpu\libc.a(lib_a-closer.o): In function `_close_r':
closer.c.text._close_r+0xc): undefined reference to `_close'
t:/arduino_1.8.5_142_tyc/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/lib/armv7e-m/fpu\libc.a(lib_a-fstatr.o): In function `_fstat_r':
fstatr.c.text._fstat_r+0x10): undefined reference to `_fstat'
t:/arduino_1.8.5_142_tyc/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/lib/armv7e-m/fpu\libc.a(lib_a-isattyr.o): In function `_isatty_r':
isattyr.c.text._isatty_r+0xc): undefined reference to `_isatty'
t:/arduino_1.8.5_142_tyc/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/lib/armv7e-m/fpu\libc.a(lib_a-lseekr.o): In function `_lseek_r':
lseekr.c.text._lseek_r+0x12): undefined reference to `_lseek'
t:/arduino_1.8.5_142_tyc/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/lib/armv7e-m/fpu\libc.a(lib_a-readr.o): In function `_read_r':
readr.c.text._read_r+0x12): undefined reference to `_read'
collect2.exe: error: ld returned 1 exit status
Using library debug_t3 in folder: t:\tcode\libraries\debug_t3 (legacy)
Error compiling for board Teensy 3.6.
Here is the WIP to unzip into active libraries folder - problem sketches are in the examples folder::
View attachment debug_t3.zip