Teensy 3.5 Stuck Compiling

Status
Not open for further replies.

rw429

Member
I'm having issues compiling the default Blink sketch for my Teensy 3.5 using the Arduino IDE on Windows 10. After sifting through https://forum.pjrc.com/threads/40417-Unable-to-program-Teensy-3-5 and uninstalling and reinstalling the latest version of the IDE (1.8.9) and Teensyduino (1.46), I found the hex file in...
Code:
C:\\Users\\myName~1\\AppData\\Local\\Temp\\arduino_build_515378"
after looking through the IDE verbose output...
Code:
Linking everything together...
"D:\\myName\\Documents\\Projects\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-gcc" -O2 -Wl,--gc-sections,--relax,--defsym=__rtc_localtime=1565615245 "-TD:\\myName\\Documents\\Projects\\Arduino\\hardware\\teensy\\avr\\cores\\teensy3/mk64fx512.ld" -lstdc++ -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -o "C:\\Users\\myName~1\\AppData\\Local\\Temp\\arduino_build_515378/Blink.ino.elf" "C:\\Users\\myName~1\\AppData\\Local\\Temp\\arduino_build_515378\\sketch\\Blink.ino.cpp.o" "C:\\Users\\myName~1\\AppData\\Local\\Temp\\arduino_build_515378/core\\core.a" "-LC:\\Users\\myName~1\\AppData\\Local\\Temp\\arduino_build_515378" -larm_cortexM4lf_math -lm
"D:\\myName\\Documents\\Projects\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\myName~1\\AppData\\Local\\Temp\\arduino_build_515378/Blink.ino.elf" "C:\\Users\\myName~1\\AppData\\Local\\Temp\\arduino_build_515378/Blink.ino.eep"
"D:\\myName\\Documents\\Projects\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-objcopy" -O ihex -R .eeprom "C:\\Users\\myName~1\\AppData\\Local\\Temp\\arduino_build_515378/Blink.ino.elf" "C:\\Users\\myName~1\\AppData\\Local\\Temp\\arduino_build_515378/Blink.ino.hex"
"D:\\myName\\Documents\\Projects\\Arduino\\hardware\\teensy/../tools/stdout_redirect" "C:\\Users\\myName~1\\AppData\\Local\\Temp\\arduino_build_515378/Blink.ino.lst" "D:\\myName\\Documents\\Projects\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-objdump" -d -S -C "C:\\Users\\myName~1\\AppData\\Local\\Temp\\arduino_build_515378/Blink.ino.elf"
"D:\\myName\\Documents\\Projects\\Arduino\\hardware\\teensy/../tools/stdout_redirect" "C:\\Users\\myName~1\\AppData\\Local\\Temp\\arduino_build_515378/Blink.ino.sym" "D:\\myName\\Documents\\Projects\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-objdump" -t -C "C:\\Users\\myName~1\\AppData\\Local\\Temp\\arduino_build_515378/Blink.ino.elf"
"D:\\myName\\Documents\\Projects\\Arduino\\hardware\\teensy/../tools/teensy_post_compile" -file=Blink.ino "-path=

The verbose info from Teensy is ...
Code:
13:34:41.151 (loader): Teensy Loader 1.46, begin program
13:34:41.212 (loader): Listening for remote control on port 3149
13:34:41.213 (loader): initialized, showing main window
13:34:47.684 (loader): Verbose Info event
13:51:15.090 (loader): Open File event
13:51:17.656 (loader): File "Blink.ino.hex". 10520 bytes, 2% used
13:51:21.146 (loader): Auto Button event
13:51:21.147 (loader): Auto mode: enabled
13:51:25.212 (loader): Device came online, code_size = 524288
13:51:25.219 (loader): Board is: Teensy 3.5 (MK64FX512), version 1.03
13:51:25.237 (loader): File "Blink.ino.hex". 10520 bytes, 2% used
13:51:25.248 (loader): set background IMG_ONLINE
13:51:25.260 (loader): File "Blink.ino.hex". 10520 bytes, 2% used
13:51:25.264 (loader): elf appears to be for Teensy 3.5 (MK64FX512) (524288 bytes)
13:51:25.267 (loader): elf binary data matches hex file
13:51:25.270 (loader): elf file is for Teensy 3.5 (MK64FX512)
13:51:25.273 (loader): begin operation
13:51:25.291 (loader): flash, block=0, bs=1024, auto=1
13:51:25.295 (loader):  gauge old value = 0
13:51:25.298 (loader): flash, block=1, bs=1024, auto=1
13:51:25.302 (loader):  gauge old value = 1
13:51:25.304 (loader): flash, block=2, bs=1024, auto=1
13:51:25.306 (loader):  gauge old value = 2
13:51:25.307 (loader): flash, block=3, bs=1024, auto=1
13:51:25.436 (loader):  gauge old value = 3
13:51:25.442 (loader): flash, block=4, bs=1024, auto=1
13:51:25.449 (loader):  gauge old value = 4
13:51:25.456 (loader): flash, block=5, bs=1024, auto=1
13:51:25.462 (loader):  gauge old value = 5
13:51:25.465 (loader): flash, block=6, bs=1024, auto=1
13:51:25.469 (loader):  gauge old value = 6
13:51:25.472 (loader): flash, block=7, bs=1024, auto=1
13:51:25.476 (loader):  gauge old value = 7
13:51:25.479 (loader): flash, block=8, bs=1024, auto=1
13:51:25.484 (loader):  gauge old value = 8
13:51:25.487 (loader): flash, block=9, bs=1024, auto=1
13:51:25.491 (loader):  gauge old value = 9
13:51:25.493 (loader): flash, block=10, bs=1024, auto=1
13:51:25.512 (loader):  gauge old value = 10
13:51:25.518 (loader): sending reboot
13:51:25.522 (loader): begin wait_until_offline
13:51:25.626 (loader): offline, waited 2
13:51:25.627 (loader): end operation, total time = 0.352 seconds
13:51:25.630 (loader): set background IMG_REBOOT_OK
13:51:25.633 (loader): redraw timer set, image 14 to show for 1200 ms
13:51:26.833 (loader): redraw, image 9

The board is recognized on COM 11 (serial monitor works correctly with Serial.println("hello world")) and I was able to successfully manually upload this hex file (and other files such as fast_blink.ino) to the board, but the IDE would still say "compiling sketch..." and would never finish (green progress bar in bottom right doesn't fill up completely). This happens when I try to compile for all Teensy boards on my machine, but Arduino boards work as expected. This was the first time that I used a Teensy device on my computer, but I also tested this board on another machine and it works as it's supposed to so I don't think it is a faulty board.

I also get no error message. The last info received from the IDE before the teensy loader window is opened and getting stuck in the loop is the posted verbose output

Could it be an issue with my installation path? The other machine that I tested the board successfully on has only 1 "C:\\" drive, but I have "C:\\" and "D:\\". Again, I can compile and upload sketches manually, however it is annoying when I have to track down the hex file in my directory and hit the "program" button on the teensy every time.

Thanks for any advice :) :)
 
Not a good solution - but may be an improvement and show something if it works.

Do a Verify Build with 'Ctrl+R' - then press the button.

If that doesn't work the install is broken getting the path to Teensy Loader. It will show
 
Not a good solution - but may be an improvement and show something if it works.

Do a Verify Build with 'Ctrl+R' - then press the button.

If that doesn't work the install is broken getting the path to Teensy Loader. It will show

This produces the same behavior/results that have been giving me trouble. The teensy window says "Blink.ino.hex (unreadable)" at the bottom and after hitting the manual program button on the board, the window only allows me to reboot ("program" and "automatic" buttons are not highlighted, "Open hex file" and "reboot" are highlighted).

I will try installing the IDE and Teensyduino on my "C:\\" drive again.
 
This produces the same behavior/results that have been giving me trouble. The teensy window says "Blink.ino.hex (unreadable)" at the bottom and after hitting the manual program button on the board, the window only allows me to reboot ("program" and "automatic" buttons are not highlighted, "Open hex file" and "reboot" are highlighted).

I will try installing the IDE and Teensyduino on my "C:\\" drive again.

No change, same behavior with a fresh installation of the IDE and Teensyduino in "C:\Program Files\". I don't understand why the path is broken.
 
Are you using the Windows installer version of the IDE? If so, try using the ZIP file instead.
- Download the Windows ZIP IDE
- Unzip it into C:\ (Not Program Files)
- install Teensyduino on top of this. You may have to point TD at this directory if it doesn't choose that initially.
- Use windows explorer to find arduino.exe in c:\arduino-1.8.9 and double click on it.
- Now try opening and compiling Blink again.

If you keep using this install, you might find it useful to
- rename c:\arduino-1.8.9 to something like c:\arduino-1.8.9_1.47_b6 to keep track of the versions.
- use windows explorer to create a shortcut of arduino.exe and then drag and drop it onto the desktop

Pete
 
Maybe try temporarily turning off Windows Defender and any other anti-virus software you may have?

Also, try rebooting first before you do anything else. Windows 10 is better than prior versions, but you may have some program lingering somehow, tying up resources or holding exclusive access to certain files.
 
Are you using the Windows installer version of the IDE? If so, try using the ZIP file instead.
- Download the Windows ZIP IDE
- Unzip it into C:\ (Not Program Files)
- install Teensyduino on top of this. You may have to point TD at this directory if it doesn't choose that initially.
- Use windows explorer to find arduino.exe in c:\arduino-1.8.9 and double click on it.
- Now try opening and compiling Blink again.

If you keep using this install, you might find it useful to
- rename c:\arduino-1.8.9 to something like c:\arduino-1.8.9_1.47_b6 to keep track of the versions.
- use windows explorer to create a shortcut of arduino.exe and then drag and drop it onto the desktop

Pete

I moved your unzipped files straight to C:\ and installed teensyduino into that directory (it doesn't let you install TD unless a compatible version of IDE is detected). Unfortunately it did not resolve the issue. What is the difference between the windows installer version and the link that you provided? I noticed the icon shortcuts on my previous installed versions had the windows firewall emblem on top of the Arduino IDE icon, but yours did not.

I have a suspicion that it may have to do with the windows firewall so I doubled checked to make sure that the firewall allowed arduino.exe and teensy.exe to pass through and even disabled the private network firewall entirely but to no avail. Could this still be a cause even if I disabled the firewall entirely?
 
That ZIP link looks like a valid IDE 1.8.9 release build. If it fully unzipped then TeensyInstaller pointed to the right folder with Arduino.exe in it should accept installation. If not then there is something else wrong.

NOTE: I find the UNZIP puts the actual files in a subfolder of the folder - so I move them UP a level - if that is not done then TeensyInstaller would need to drill down to the actual location of the Arduino.exe for it to identify the valid install.

That is the process used here - except on a non-"C" drive under Windows 10. Perhaps the new RansomeWare thwarting disk write controls are interfering. My installs on Win 10 work with no problem on an SSD T:\ drive with no interference from Firewall or Defender. Except on first execution of new IDE install Windows Firewall does pop up asking to approve the JAVA access - but that is after Unzip and TeensyDuino install before ever starting the IDE as was done yesterday to Fresh directory.
 
Maybe try temporarily turning off Windows Defender and any other anti-virus software you may have?

Also, try rebooting first before you do anything else. Windows 10 is better than prior versions, but you may have some program lingering somehow, tying up resources or holding exclusive access to certain files.

I was in the process of writing post #7 when you posted this. I agree, I think it may have to do with the annoying Windows Defender.

Okay and this is weird now. I rebooted my PC and I still cannot successfully finish compiling in the IDE, but now the teensy loader automatically recognizes the new post compile hex files. So now when I hit the program button on the board, it uploads the new post compile hex file and works normally. This isn't perfect because I would prefer to just hit "Upload" in the IDE and it is also very finnicky. Also, I get this when I try to print to the serial monitor sometimes....
Code:
Error while setting serial port parameters: 9,600 N 8 1
 
That ZIP link looks like a valid IDE 1.8.9 release build. If it fully unzipped then TeensyInstaller pointed to the right folder with Arduino.exe in it should accept installation. If not then there is something else wrong.

NOTE: I find the UNZIP puts the actual files in a subfolder of the folder - so I move them UP a level - if that is not done then TeensyInstaller would need to drill down to the actual location of the Arduino.exe for it to identify the valid install.

That is the process used here - except on a non-"C" drive under Windows 10. Perhaps the new RansomeWare thwarting disk write controls are interfering. My installs on Win 10 work with no problem on an SSD T:\ drive with no interference from Firewall or Defender. Except on first execution of new IDE install Windows Firewall does pop up asking to approve the JAVA access - but that is after Unzip and TeensyDuino install before ever starting the IDE as was done yesterday to Fresh directory.

Understood. I have verified that the unzipped files are in the folder named "arduino-1.8.9" and not some arduino subfolder and these are all on my C:\ drive now, not D:\. And just to be sure, the correct folder that TeensyInstaller is supposed to point to is "arduino-1.8.9" that contains folders named drivers, hardware, libraries, reference, etc. and the .exe named "arduino", right?
 
Oh, sounds like something is really messed up with your Windows system.

I'm not a Windows expert like Defragster. The only way I know how to solve a "strange Windows problem" like this is to do a complete image restore from before the problem started. On my 2 physical test machines and every virtual machine, I always do a complete image backup shortly after installing...
 
Status
Not open for further replies.
Back
Top