Arduino 1.9 has multi-cpu parallel build

Status
Not open for further replies.

PaulStoffregen

Well-known member
Arduino's new 1.9 beta has a significantly faster build process. During part of the build (currently only the core library), it runs many copies of gcc in parallel. It seems to have other speed improvements too.

If you'd like to give it a try with Teensy, follow these steps...

1: Copy the arduino-builder program from 1.9 beta to 1.8.5, replacing the 1.8.5's copy.

2: Copy 1.9's tools-builder/arduino-preprocessor folder into 1.8.5. Inside another folder, it has just 1 large executable file which the new builder using instead of ctags.

3: Replace the platform.txt file in hardware/teensy/avr with the copy from this message.

I tested this on Linux 64 bit. It probably works on Windows? On Mac, use Show Package Contexts and look for this stuff stuff in Contents/Java.

The change from ctags to a full compiler for preprocessing should really help with Arduino's many long-standing bugs involving C++ syntax in sketches.
 

Attachments

  • platform.txt
    5 KB · Views: 520
macOS 10.12.6 | Arduino PR-beta1.9-BUILD-10 - Arduino 1.8.5 | Tennsyduino 1.40 - with the changes above when I try to compile blank sketch I get:
Code:
open /dev/null: too many open files in system
Error compiling for board Teensy 3.2 / 3.1.

or I get:
Code:
Cannot create temporary file in /var/folders/bj/vlzk0z7x3bqb_jzmz0k0vv2h0000gp/T//: Too many open files in system
cc1: fatal error: can't open '/var/folders/bj/vlzk0z7x3bqb_jzmz0k0vv2h0000gp/T//cc09oTc3.s' for writing: Too many open files in system
compilation terminated.
fork/exec /private/var/folders/bj/vlzk0z7x3bqb_jzmz0k0vv2h0000gp/T/AppTranslocation/D7F68FF0-85CF-43E4-B476-E041A45A0900/d/Arduino-4.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-gcc: too many open files in system
Error compiling for board Teensy 3.2 / 3.1.
 
Win 10 - pulled the Beta 1.9.0 zip. Not sure all got directed properly? How do I know if it worked? Both the above and the 1.8.5 IDE build all in ~16 seconds?

Copied my 1.8.5 folder- ended up with:
>> "I:\arduino-1.8.5_b190\tools-builder\arduino-preprocessor"
>> "I:\arduino-1.8.5_b190\tools-builder\ctags"

Saved platform.txt as :: "I:\arduino-1.8.5_b190\hardware\teensy\avr\platform.txt"

<EDIT> Also copy arduino-builder.exe from ZIP to replace:
>> "I:\arduino-1.8.5_b190\arduino-builder.exe"


>> Last <EDIT> file was missed and required for new functionality
 
Last edited:
Did you copy the arduino-builder.exe from 1.9beta into 1.8.5? Without that, these other changes sit there unused.

Not sure all got directed properly? How do I know if it worked?

Two things:

1: If you turn on verbose info while compiling, and scroll through tons of info to find "Generating function prototypes...", you should see that part run 2 commands. The first is arm-none-eabi-g++ with -E. If the 2nd command has ctags, then it's still the old builder. If the 2nd command is the arduino-preprocessor program, then you're using the new version. You could also delete or move the arduino-preprocessor and see if it gives a (likely cryptic) error when it can't find the arduino-preprocessor executable.

2: If you watch the Windows Task Manager, for a brief time while it's compiling the core library files, you should see all your CPU cores go to near 100% usage. With the normal 1.8.5 you'll likely see only 1 core at 100%.
 
Did you copy the arduino-builder.exe from 1.9beta into 1.8.5? Without that, these other changes sit there unused.

No Sir, I did not.

Doing that the compile looks to be ~10 seconds and seems [from ~16].

Re #2: My 'prior' compiles too short and fast to see anything significant on TaskMan's 8 cores. I have too much open and no idle cores.
Opened Audio/MemoryAndCpuUsage and did a VERIFY build - no build errors and no warnings:
> I:\arduino-1.8.5_b190 [beta 1.9.0 build] :: ~28 seconds
> I:\arduino-1.8.5 :: ~57 seconds

Re #1: Generating function prototypes
And renaming 'arduino-preprocessor.exe' results in:
'"I:\arduino-1.8.5_b190\tools-builder\arduino-preprocessor\0.1.3/arduino-preprocessor" "C:\Users\Tim\AppData\Local\Temp\arduino_build_395238\preproc\ctags_target_for_gcc_minus_e.cpp" "" -- -std=gnu++14
panic: interface conversion: error is *exec.Error, not *exec.ExitError'

And >> Two sketches I did show things like 'unknown escape sequence' and below: "I:\tCodeSTRING_TESTSTRING_TEST.ino:35:9: warning: unknown escape sequence: '\S'"
...

Generating function prototypes...
"I:\arduino-1.8.5_b190\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=140 -DARDUINO=10805 -DF_CPU=120000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-II:\arduino-1.8.5_b190\hardware\teensy\avr\cores\teensy3" "-Ii:\tcode\libraries\TeensyThreads" "C:\Users\Tim\AppData\Local\Temp\arduino_build_761070\sketch\TeensyTimer1.ino.cpp" -o "C:\Users\Tim\AppData\Local\Temp\arduino_build_761070\preproc\ctags_target_for_gcc_minus_e.cpp"
"I:\arduino-1.8.5_b190\tools-builder\arduino-preprocessor\0.1.3/arduino-preprocessor" "C:\Users\Tim\AppData\Local\Temp\arduino_build_761070\preproc\ctags_target_for_gcc_minus_e.cpp" "" -- -std=gnu++14
Compiling sketch...
"I:\arduino-1.8.5_b190\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -felide-constructors -std=gnu++14 -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=140 -DARDUINO=10805 -DF_CPU=120000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-II:\arduino-1.8.5_b190\hardware\teensy\avr\cores\teensy3" "-Ii:\tcode\libraries\TeensyThreads" "C:\Users\Tim\AppData\Local\Temp\arduino_build_761070\sketch\TeensyTimer1.ino.cpp" -o "C:\Users\Tim\AppData\Local\Temp\arduino_build_761070\sketch\TeensyTimer1.ino.cpp.o"
I:\tCode\RTOS\TeensyTimer1\TeensyTimer1\TeensyTimer1.ino:68:10: warning: unknown escape sequence: '\R'

Compiling libraries... int count = 0;


^

I:\tCode\RTOS\TeensyTimer1\TeensyTimer1\TeensyTimer1.ino:68:10: warning: unknown escape sequence: '\T'

Compiling library "TeensyThreads"I:\tCode\RTOS\TeensyTimer1\TeensyTimer1\TeensyTimer1.ino:68:10: warning: unknown escape sequence: '\T'

...
 
Is the "\T" a tab ? tried "\t" <- lowercase instead ?

Don't have a minute to look - got a bag to pack and a TODO list waiting . . . - just found it odd, probably something trivial. I expected to see worse when I did the AUDIO sample and it was CLEAN.
 
If this code compiles under normal 1.8.5, then I'd say it's very likely you've found a bug in Arduino's new preprocessor. Please save a copy and post the code if you can. I'd really like to dig into the cause and if it really does look like a bug, hopefully we can get a useful bug report to the Arduino devs sometime this week.
 
In the airport now. Those two are recent forum samples I had open. One was teensy threads testing the restore of the sys timer, the other was strings sample where name string case mattered.

<edit>Beta 1.9.0 on home desktop and flash drive in bag.

One sample was variant of : https://forum.pjrc.com/threads/46866-string-help

And of this one: https://forum.pjrc.com/threads/44723-Arduino-Events?p=155253&viewfull=1#post155253

Maybe the problem is cut and paste from forum posting? But did not see same before beta update. Whenever I cut and past from PJRC pages it gets horrid inclusion of failed characters.
 
Last edited:
I tried copy & paste of that first one. Compiles without any error. But I'm using Linux 64 bit. Maybe it's a Windows problem?

If you can get it to happen again, please save the .ino file and put it into a .zip archive and upload that here. Inside a .zip should preserve any character translations or other subtle problems.
 
I just used a slightly modified version of And of this one: https://forum.pjrc.com/threads/44723...l=1#post155253 and received not only the \T warning but a few other escape character warnings. I am using a win10 i5-5200. I attaching the .ino file and the warnings as well: View attachment EvventResponder.zip.

Just for reference I tried this on another more complicated sketch and received the same warnings so its not just limited to the EvventResponder sketch. Those are the only warnings I get and it does compile fine after that.
 
I opened this on Linux. Can't reproduce the errors. Guess it's time to clear off my workbench (currently Ethernet lib stuff) and get the Windows test machine out....
 
Thought I would finally try it... So I tried with my usbhost SerialTest host case... It also shows lots of the unknown escape sequences...
Code:
D:\arduino-1.8.5-BBeta\arduino-builder -dump-prefs -logger=machine -hardware D:\arduino-1.8.5-BBeta\hardware -hardware C:\Users\kurte\AppData\Local\Arduino15\packages -hardware C:\Users\kurte\Documents\Arduino\hardware -tools D:\arduino-1.8.5-BBeta\tools-builder -tools D:\arduino-1.8.5-BBeta\hardware\tools\avr -tools C:\Users\kurte\AppData\Local\Arduino15\packages -built-in-libraries D:\arduino-1.8.5-BBeta\libraries -libraries C:\Users\kurte\Documents\Arduino\libraries -fqbn=teensy:avr:teensy36:usb=serial,speed=180,opt=o2std,keys=en-us -ide-version=10805 -build-path C:\Users\kurte\AppData\Local\Temp\arduino_build_894355 -warnings=all -build-cache C:\Users\kurte\AppData\Local\Temp\arduino_cache_991674 -verbose C:\Users\kurte\Documents\Arduino\libraries\USBHost_t36\examples\SerialTest\SerialTest.ino
D:\arduino-1.8.5-BBeta\arduino-builder -compile -logger=machine -hardware D:\arduino-1.8.5-BBeta\hardware -hardware C:\Users\kurte\AppData\Local\Arduino15\packages -hardware C:\Users\kurte\Documents\Arduino\hardware -tools D:\arduino-1.8.5-BBeta\tools-builder -tools D:\arduino-1.8.5-BBeta\hardware\tools\avr -tools C:\Users\kurte\AppData\Local\Arduino15\packages -built-in-libraries D:\arduino-1.8.5-BBeta\libraries -libraries C:\Users\kurte\Documents\Arduino\libraries -fqbn=teensy:avr:teensy36:usb=serial,speed=180,opt=o2std,keys=en-us -ide-version=10805 -build-path C:\Users\kurte\AppData\Local\Temp\arduino_build_894355 -warnings=all -build-cache C:\Users\kurte\AppData\Local\Temp\arduino_cache_991674 -verbose C:\Users\kurte\Documents\Arduino\libraries\USBHost_t36\examples\SerialTest\SerialTest.ino
Using board 'teensy36' from platform in folder: D:\arduino-1.8.5-BBeta\hardware\teensy\avr
Using core 'teensy3' from platform in folder: D:\arduino-1.8.5-BBeta\hardware\teensy\avr
Detecting libraries used...
"D:\arduino-1.8.5-BBeta\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=140 -DARDUINO=10805 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\arduino-1.8.5-BBeta\hardware\teensy\avr\cores\teensy3" "C:\Users\kurte\AppData\Local\Temp\arduino_build_894355\sketch\SerialTest.ino.cpp" -o "nul"
"D:\arduino-1.8.5-BBeta\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=140 -DARDUINO=10805 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\arduino-1.8.5-BBeta\hardware\teensy\avr\cores\teensy3" "-IC:\Users\kurte\Documents\Arduino\libraries\USBHost_t36" "C:\Users\kurte\AppData\Local\Temp\arduino_build_894355\sketch\SerialTest.ino.cpp" -o "nul"
"D:\arduino-1.8.5-BBeta\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=140 -DARDUINO=10805 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\arduino-1.8.5-BBeta\hardware\teensy\avr\cores\teensy3" "-IC:\Users\kurte\Documents\Arduino\libraries\USBHost_t36" "C:\Users\kurte\Documents\Arduino\libraries\USBHost_t36\antplus.cpp" -o "nul"
"D:\arduino-1.8.5-BBeta\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=140 -DARDUINO=10805 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\arduino-1.8.5-BBeta\hardware\teensy\avr\cores\teensy3" "-IC:\Users\kurte\Documents\Arduino\libraries\USBHost_t36" "C:\Users\kurte\Documents\Arduino\libraries\USBHost_t36\ehci.cpp" -o "nul"
"D:\arduino-1.8.5-BBeta\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=140 -DARDUINO=10805 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\arduino-1.8.5-BBeta\hardware\teensy\avr\cores\teensy3" "-IC:\Users\kurte\Documents\Arduino\libraries\USBHost_t36" "C:\Users\kurte\Documents\Arduino\libraries\USBHost_t36\enumeration.cpp" -o "nul"
"D:\arduino-1.8.5-BBeta\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=140 -DARDUINO=10805 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\arduino-1.8.5-BBeta\hardware\teensy\avr\cores\teensy3" "-IC:\Users\kurte\Documents\Arduino\libraries\USBHost_t36" "C:\Users\kurte\Documents\Arduino\libraries\USBHost_t36\hid.cpp" -o "nul"
"D:\arduino-1.8.5-BBeta\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=140 -DARDUINO=10805 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\arduino-1.8.5-BBeta\hardware\teensy\avr\cores\teensy3" "-IC:\Users\kurte\Documents\Arduino\libraries\USBHost_t36" "C:\Users\kurte\Documents\Arduino\libraries\USBHost_t36\hub.cpp" -o "nul"
"D:\arduino-1.8.5-BBeta\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=140 -DARDUINO=10805 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\arduino-1.8.5-BBeta\hardware\teensy\avr\cores\teensy3" "-IC:\Users\kurte\Documents\Arduino\libraries\USBHost_t36" "C:\Users\kurte\Documents\Arduino\libraries\USBHost_t36\joystick.cpp" -o "nul"
"D:\arduino-1.8.5-BBeta\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=140 -DARDUINO=10805 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\arduino-1.8.5-BBeta\hardware\teensy\avr\cores\teensy3" "-IC:\Users\kurte\Documents\Arduino\libraries\USBHost_t36" "C:\Users\kurte\Documents\Arduino\libraries\USBHost_t36\keyboard.cpp" -o "nul"
"D:\arduino-1.8.5-BBeta\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=140 -DARDUINO=10805 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\arduino-1.8.5-BBeta\hardware\teensy\avr\cores\teensy3" "-IC:\Users\kurte\Documents\Arduino\libraries\USBHost_t36" "C:\Users\kurte\Documents\Arduino\libraries\USBHost_t36\keyboardHIDExtras.cpp" -o "nul"
"D:\arduino-1.8.5-BBeta\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=140 -DARDUINO=10805 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\arduino-1.8.5-BBeta\hardware\teensy\avr\cores\teensy3" "-IC:\Users\kurte\Documents\Arduino\libraries\USBHost_t36" "C:\Users\kurte\Documents\Arduino\libraries\USBHost_t36\memory.cpp" -o "nul"
"D:\arduino-1.8.5-BBeta\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=140 -DARDUINO=10805 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\arduino-1.8.5-BBeta\hardware\teensy\avr\cores\teensy3" "-IC:\Users\kurte\Documents\Arduino\libraries\USBHost_t36" "C:\Users\kurte\Documents\Arduino\libraries\USBHost_t36\midi.cpp" -o "nul"
"D:\arduino-1.8.5-BBeta\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=140 -DARDUINO=10805 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\arduino-1.8.5-BBeta\hardware\teensy\avr\cores\teensy3" "-IC:\Users\kurte\Documents\Arduino\libraries\USBHost_t36" "C:\Users\kurte\Documents\Arduino\libraries\USBHost_t36\mouse.cpp" -o "nul"
"D:\arduino-1.8.5-BBeta\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=140 -DARDUINO=10805 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\arduino-1.8.5-BBeta\hardware\teensy\avr\cores\teensy3" "-IC:\Users\kurte\Documents\Arduino\libraries\USBHost_t36" "C:\Users\kurte\Documents\Arduino\libraries\USBHost_t36\print.cpp" -o "nul"
"D:\arduino-1.8.5-BBeta\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=140 -DARDUINO=10805 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\arduino-1.8.5-BBeta\hardware\teensy\avr\cores\teensy3" "-IC:\Users\kurte\Documents\Arduino\libraries\USBHost_t36" "C:\Users\kurte\Documents\Arduino\libraries\USBHost_t36\rawhidd.cpp" -o "nul"
"D:\arduino-1.8.5-BBeta\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=140 -DARDUINO=10805 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\arduino-1.8.5-BBeta\hardware\teensy\avr\cores\teensy3" "-IC:\Users\kurte\Documents\Arduino\libraries\USBHost_t36" "C:\Users\kurte\Documents\Arduino\libraries\USBHost_t36\serial.cpp" -o "nul"
Generating function prototypes...
"D:\arduino-1.8.5-BBeta\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=140 -DARDUINO=10805 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\arduino-1.8.5-BBeta\hardware\teensy\avr\cores\teensy3" "-IC:\Users\kurte\Documents\Arduino\libraries\USBHost_t36" "C:\Users\kurte\AppData\Local\Temp\arduino_build_894355\sketch\SerialTest.ino.cpp" -o "C:\Users\kurte\AppData\Local\Temp\arduino_build_894355\preproc\ctags_target_for_gcc_minus_e.cpp"
"D:\arduino-1.8.5-BBeta\tools-builder\arduino-preprocessor\0.1.3/arduino-preprocessor" "C:\Users\kurte\AppData\Local\Temp\arduino_build_894355\preproc\ctags_target_for_gcc_minus_e.cpp" "" -- -std=gnu++14
Compiling sketch...
"D:\arduino-1.8.5-BBeta\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -felide-constructors -std=gnu++14 -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=140 -DARDUINO=10805 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\arduino-1.8.5-BBeta\hardware\teensy\avr\cores\teensy3" "-IC:\Users\kurte\Documents\Arduino\libraries\USBHost_t36" "C:\Users\kurte\AppData\Local\Temp\arduino_build_894355\sketch\SerialTest.ino.cpp" -o "C:\Users\kurte\AppData\Local\Temp\arduino_build_894355\sketch\SerialTest.ino.cpp.o"
Multiple libraries were found for "USBHost_t36.h"
 Used: C:\Users\kurte\Documents\Arduino\libraries\USBHost_t36
C:\Users\kurte\Documents\Arduino\libraries\USBHost_t36\examples\SerialTest\SerialTest.ino:73:10: warning: unknown escape sequence: '\k'

 Not used: D:\arduino-1.8.5-BBeta\hardware\teensy\avr\libraries\USBHost_t36
           delay(2);

          ^

C:\Users\kurte\Documents\Arduino\libraries\USBHost_t36\examples\SerialTest\SerialTest.ino:73:10: warning: unknown escape sequence: '\D'

C:\Users\kurte\Documents\Arduino\libraries\USBHost_t36\examples\SerialTest\SerialTest.ino:73:10: warning: unknown escape sequence: '\A'

C:\Users\kurte\Documents\Arduino\libraries\USBHost_t36\examples\SerialTest\SerialTest.ino:73:10: warning: unknown escape sequence: '\l'

SerialTest:73: error: incomplete universal character name \U
C:\Users\kurte\Documents\Arduino\libraries\USBHost_t36\examples\SerialTest\SerialTest.ino:73:10: warning: unknown escape sequence: '\S'

C:\Users\kurte\Documents\Arduino\libraries\USBHost_t36\examples\SerialTest\SerialTest.ino:73:10: warning: unknown escape sequence: '\S'

C:\UserskurteDocumentsArduinolibrariesSBHost_t36xamplesSerialTestSerialTest.ino:40:11: warning: unknown escape sequence: '\k'

C:\UserskurteDocumentsArduinolibrariesSBHost_t36xamplesSerialTestSerialTest.ino:40:11: warning: unknown escape sequence: '\D'

C:\UserskurteDocumentsArduinolibrariesSBHost_t36xamplesSerialTestSerialTest.ino:40:11: warning: unknown escape sequence: '\A'

C:\UserskurteDocumentsArduinolibrariesSBHost_t36xamplesSerialTestSerialTest.ino:40:11: warning: unknown escape sequence: '\l'

C:\UserskurteDocumentsArduinolibrariesSBHost_t36xamplesSerialTestSerialTest.ino:40:11: error: incomplete universal character name \U

C:\UserskurteDocumentsArduinolibrariesSBHost_t36xamplesSerialTestSerialTest.ino:40:11: warning: unknown escape sequence: '\S'

C:\UserskurteDocumentsArduinolibrariesSBHost_t36xamplesSerialTestSerialTest.ino:40:11: warning: unknown escape sequence: '\S'

C:\UserskurteDocumentsArduinolibrariesSBHost_t36xamplesSerialTestSerialTest.ino:108:11: warning: unknown escape sequence: '\k'

C:\UserskurteDocumentsArduinolibrariesSBHost_t36xamplesSerialTestSerialTest.ino:108:11: warning: unknown escape sequence: '\D'

C:\UserskurteDocumentsArduinolibrariesSBHost_t36xamplesSerialTestSerialTest.ino:108:11: warning: unknown escape sequence: '\A'

C:\UserskurteDocumentsArduinolibrariesSBHost_t36xamplesSerialTestSerialTest.ino:108:11: warning: unknown escape sequence: '\l'

C:\UserskurteDocumentsArduinolibrariesSBHost_t36xamplesSerialTestSerialTest.ino:108:11: error: incomplete universal character name \U

C:\UserskurteDocumentsArduinolibrariesSBHost_t36xamplesSerialTestSerialTest.ino:108:11: warning: unknown escape sequence: '\S'

C:\UserskurteDocumentsArduinolibrariesSBHost_t36xamplesSerialTestSerialTest.ino:108:11: warning: unknown escape sequence: '\S'

C:\UserskurteDocumentsArduinolibrariesSBHost_t36xamplesSerialTestSerialTest.ino:152:11: warning: unknown escape sequence: '\k'

C:\UserskurteDocumentsArduinolibrariesSBHost_t36xamplesSerialTestSerialTest.ino:152:11: warning: unknown escape sequence: '\D'

C:\UserskurteDocumentsArduinolibrariesSBHost_t36xamplesSerialTestSerialTest.ino:152:11: warning: unknown escape sequence: '\A'

C:\UserskurteDocumentsArduinolibrariesSBHost_t36xamplesSerialTestSerialTest.ino:152:11: warning: unknown escape sequence: '\l'

C:\UserskurteDocumentsArduinolibrariesSBHost_t36xamplesSerialTestSerialTest.ino:152:11: error: incomplete universal character name \U

C:\UserskurteDocumentsArduinolibrariesSBHost_t36xamplesSerialTestSerialTest.ino:152:11: warning: unknown escape sequence: '\S'

C:\UserskurteDocumentsArduinolibrariesSBHost_t36xamplesSerialTestSerialTest.ino:152:11: warning: unknown escape sequence: '\S'

C:\UserskurteDocumentsArduinolibrariesSBHost_t36xamplesSerialTestSerialTest.ino:175:10: warning: unknown escape sequence: '\k'

C:\UserskurteDocumentsArduinolibrariesSBHost_t36xamplesSerialTestSerialTest.ino:175:10: warning: unknown escape sequence: '\D'

C:\UserskurteDocumentsArduinolibrariesSBHost_t36xamplesSerialTestSerialTest.ino:175:10: warning: unknown escape sequence: '\A'

C:\UserskurteDocumentsArduinolibrariesSBHost_t36xamplesSerialTestSerialTest.ino:175:10: warning: unknown escape sequence: '\l'

C:\UserskurteDocumentsArduinolibrariesSBHost_t36xamplesSerialTestSerialTest.ino:175:10: error: incomplete universal character name \U

C:\UserskurteDocumentsArduinolibrariesSBHost_t36xamplesSerialTestSerialTest.ino:175:10: warning: unknown escape sequence: '\S'

C:\UserskurteDocumentsArduinolibrariesSBHost_t36xamplesSerialTestSerialTest.ino:175:10: warning: unknown escape sequence: '\S'

Using library USBHost_t36 at version 0.1 in folder: C:\Users\kurte\Documents\Arduino\libraries\USBHost_t36 
incomplete universal character name \U
Code is up on my FORK/Branch of the usbhost_t36 library... Note that line 73 is in a #if 0 region of code: delay(2);

Note my current code is slightly different than what is up on github... Currently debugging USB2AX with CDCACM... Will update it later.
 
I just built FrankB's Teensy64 code base on my i7 laptop - code space used :: 377904 bytes.

IDE 1.8.5 built in ~90 seconds - clean first build on Battery and 47 seconds on AC.

Modified beta IDE 1.9.0 built in ~60 seconds on Battery and 30 seconds on AC.

Only one existing warning appeared in both builds, the code space was the same - RAM use was a few bytes off - but one used 1.40 release and the other 1.40b3 of TD
>> Commodore-C64-Emulation-on-a-Teensy-3-6-Microcontroller
 
I just tried building "I:\tCode\libraries\USBHost_t36\examples\Test" and it failed to build - not sure what that Private version is so removed it and I get the same from 1.40 beta3: I:\arduino-1.8.5_b190\hardware\teensy\avr\libraries\USBHost_t36\examples\Test

I:\arduino-1.8.5_b190\hardware\teensy\avr\libraries\USBHost_t36\examples\Test\Test.ino:25:10: warning: unknown escape sequence: '\h'
I:\arduino-1.8.5_b190\hardware\teensy\avr\libraries\USBHost_t36\examples\Test\Test.ino:25:10: warning: unknown escape sequence: '\l'

Test:25: error: incomplete universal character name \U
I:\arduino-1.8.5_b190\hardware\teensy\avr\libraries\USBHost_t36\examples\Test\Test.ino:25:10: warning: unknown escape sequence: '\T'
I:\arduino-1.8.5_b190\hardware\teensy\avr\libraries\USBHost_t36\examples\Test\Test.ino:25:10: warning: unknown escape sequence: '\T'
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:16:10: warning: unknown escape sequence: '\h'
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:16:10: warning: unknown escape sequence: '\l'
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:16:10: error: incomplete universal character name \U
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:16:10: warning: unknown escape sequence: '\T'
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:16:10: warning: unknown escape sequence: '\T'
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:29:10: warning: unknown escape sequence: '\h'
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:29:10: warning: unknown escape sequence: '\l'
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:29:10: error: incomplete universal character name \U
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:29:10: warning: unknown escape sequence: '\T'
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:29:10: warning: unknown escape sequence: '\T'
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:36:10: warning: unknown escape sequence: '\h'
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:36:10: warning: unknown escape sequence: '\l'
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:36:10: error: incomplete universal character name \U
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:36:10: warning: unknown escape sequence: '\T'
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:36:10: warning: unknown escape sequence: '\T'
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:49:10: warning: unknown escape sequence: '\h'
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:49:10: warning: unknown escape sequence: '\l'
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:49:10: error: incomplete universal character name \U
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:49:10: warning: unknown escape sequence: '\T'
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:49:10: warning: unknown escape sequence: '\T'
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:60:10: warning: unknown escape sequence: '\h'
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:60:10: warning: unknown escape sequence: '\l'
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:60:10: error: incomplete universal character name \U
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:60:10: warning: unknown escape sequence: '\T'
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:60:10: warning: unknown escape sequence: '\T'
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:71:10: warning: unknown escape sequence: '\h'
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:71:10: warning: unknown escape sequence: '\l'
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:71:10: error: incomplete universal character name \U
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:71:10: warning: unknown escape sequence: '\T'
I:\arduino-1.8.5_b190hardware eensyvrlibrariesSBHost_t36xamplesTestTest.ino:71:10: warning: unknown escape sequence: '\T'

Using library USBHost_t36 at version 0.1 in folder: I:\arduino-1.8.5_b190\hardware\teensy\avr\libraries\USBHost_t36
incomplete universal character name \U
 
Paul - FYI - I pulled ZIP of : https://github.com/PaulStoffregen/USBHost_t36

I get the same build failure on my 1.85 IDE with the 1.90 parallel build on extracted example:: I:\tCode\libraries\USBHost_t36\examples\Test

Similar issue building : I:\tCode\libraries\USBHost_t36\examples\Mouse

No issue building from the IDE 1.8.5 used to clone the version with beta 1.90 builder. And both sketches work.
 
I just gave it try on one of my rover sketches as in the past and am still seeing the same behavior. This is assuming I did it right. I am running windows 10 machine, modified IDE 1.8.5 and using TD1.4.
 
I mentioned this on the other thread, so just a quick followup here.

Arduino recently made this change, which seems to be aimed at fixing this Windows-only bug.

https://github.com/arduino/arduino-preprocessor/commit/8217efdb2abbf75d36fd9e3f410a9d06c0001d14

If you replace arduino-builder.exe and tools-builder/arduino-preprocessor with the copies from the very latest 1.9 beta, odds are good this problem will be solved.

Thanks Paul, I'll give it a try soon on a Win 10 system - with an on beta IDE 1.9.0 UNO if I have to.

NOTE - [so I don't forget I saw this]: on that code I posted for T3-5-Locks-Up-when-assigning-Long-to-Float-(Surprised) - unchanged first b1.9.0 on 1.8.5 gave bad errors - I switched to IDE 1.8.5 and it was the posted 'hangs here' comments not after '//' - really confused the compiler, and threw the 'escape char' messages.

With the working sketch I went back to the b1.90/1.8.5 and no errors, until I just put text 'bad' after the one code line - that threw the same 'escape' errors all over the place and then in the end it called out the 'bad' - but on the wrong line #
 
Update: New {to Arduino} Computer - Fresh install IDE 1.8.5 and TD 1.40 - copied over beta IDE 1.9.0 _Build25 builder:
The sketch: T:\arduino_1.8.5\hardware\teensy\avr\libraries\USBHost_t36\examples\Test
Still has numerous "warning: unknown escape sequence:"

So does the previously noted "#include <EventResponder.h>" sample. But the two non Teensy samples [ String and FLOAT ] do not exhibit that problem?

I have a SFun RedBoard connected - but without a failing 'non-Teensy' sample I can't hope to re-create the issue in the Beta IDE 1.9.0. The code below works on beta 1.9.0 for RedBoard. I cannot upload to RedBoard under 'hacked' 1.8.5 because: 'arduino-preprocessor pattern is missing'



Not sure if this helps? Maybe there is another change in the 'pre-processor'? In a pared down prior 'String' sample. Until I defined a forward reference it gave the errors { based on the nature of EventResponder forward references }. On this setup it presents 12 errors, unless this line is uncommented: "// void dosomething ..."

Code:
// void dosomething(); // UNCOMMENT THIS for Windows 10 to remove 12 'warning: unknown escape sequence'

void setup() {
  Serial.begin(115200);
  dosomething();
}

void loop() {
  String hello("hello ");
  Serial.print(hello.c_str());
  delay(1000);
}

void dosomething()
{
  Serial.println("dosomething event");
}
 
I was able to reproduce this problem on Windows 10, using both Teensy and Arduino Zero (on Arduino's beta without Teensyduino). I filed a new issue on Arduino's github.

https://github.com/arduino/arduino-preprocessor/issues/5

@defragster - With the files from their latest "arduino-PR-beta1.9-BUILD-26", can you find any cases where this actually results in a compile error? I was only able to get compiler warnings, not errors.
 
Status
Not open for further replies.
Back
Top