Uploading sketches fail to Teensy 4.1

spectasaurus

Active member
I just bought 4 Teensy 4.1's and am getting errors uploading to all of them. I am running MacOS 1.13.6 and a clean installation of Arduino 1.8.12 and have installed TeensyDuino 1.52. When attempting to upload a simple blink code, it compiles, but then returns the error about not uploading. I have picked the Teensy 4.1, and have made sure it it uploading to the correct port. I have confirmed everything works on Teensy 3.0 and 3.2, but ALL of my Teensy 4.1's behave this same way.

When I press the Program button, a little red LED lights, but I still can't upload sketches. Thoughts?

Code:
Sketch uses 14688 bytes (0%) of program storage space. Maximum is 8126464 bytes.
Global variables use 41660 bytes (7%) of dynamic memory, leaving 482628 bytes for local variables. Maximum is 524288 bytes.
Teensy did not respond to a USB-based request to enter program mode.
Please press the PROGRAM MODE BUTTON on your Teensy to upload your sketch.
An error occurred while uploading the sketch
 
Check the cable - try another one perhaps. The T_4.1 runs USB at 480 Mbps versus prior T_3.x's at 12 Mbps. So a cable that has worked before may fail at the higher speeds it has been seen.

Pressing the Button and seeing the red light shows the T_4.1 is ready to be programmed - and at that point if TeensyLoader is running - the IDE port selection does not matter - the named sketch HEX shown on the lower portion of the loader app will be uploaded when it comes online with the computer. A bad cable can prevent that. Seeing this with 4 new T_4.1's all having the issue suggests computer connectivity is the problem. The TeensyLoader has " Help / Verbose " option that opens a second window logging Teensy arrival and programming process. Openeing that should update when the button is pressed.
 
Good suggestion. Well, I tried two USB other cables and I get the same problem. I have also tried to upload the blink sketch to a Teensy 4.0 and this works. I think the 4.0 uses the same 480 Mbps USB as 4.1 So it really does seem to be a Teensy 4.1 issue. The TeensyLoader doesn't even pop up when I try to upload to the 4.1.

When I compile, then press the Program button, I get the following on the Teensy Loader:

Code:
16:16:18.163 (ports 2): HID remove callback
16:16:18.163 (ports 2): HID add callback, vid=16c0, pid=0478, ver=0105, loc=fa400000
16:16:18.163 (loader): HID/macos: detach callback: is currently open device
16:16:18.163 (ports 2): USB device remove callback
16:16:18.163 (ports 2): remove, loc=fa400000
16:16:18.163 (ports 2): usb_remove: usb:fa400000
16:16:18.163 (ports 2): del device: location=fa400000
16:16:18.257 (loader): Device went offline
16:16:18.508 (loader): HID/macos: number of devices found = 0
16:16:18.512 (loader): HID/macos: no devices found (empty set)
16:16:18.717 (ports 2): USB device add callback
16:16:18.717 (ports 2):   loc=fa400000, vid=16C0, pid=0478, ver=0105, ser=000BAFAB
16:16:18.717 (ports 2):   actual serailnum=765867
16:16:18.717 (ports 2):   found prior teensy at this loc, age=0.554
16:16:18.717 (ports 2):     name: [no_device] (Teensy 4.1) Bootloader
16:16:18.759 (loader): HID/macos: attach callback
16:16:18.783 (loader): Device came online, code_size = 8126464
16:16:18.788 (loader): Board is: Teensy 4.1 (IMXRT1062), version 1.05
16:16:18.805 (loader): File "Blink.ino.hex". 14308 bytes, 0% used
16:16:18.811 (loader): set background IMG_ONLINE
16:16:19.007 (loader): HID/macos: status: ok

And it seems to keep trying to connect every 40 seconds or so. But never uploads.
 
Last edited:
In Teensy Loader, click Teensy > About. Is it really version 1.52?

If you had an older version already running before upgrading to 1.52, it's possible the old one is still active. All you need to do is click File > Quit, so the old Teensy Loader isn't running anymore. Then click Verify or Upload in Arduino and it will run a copy of 1.52 (assuming you're using Arduino with Teensyduino 1.52 installed).
 
In Teensy Loader, click Teensy > About. Is it really version 1.52?

If you had an older version already running before upgrading to 1.52, it's possible the old one is still active. All you need to do is click File > Quit, so the old Teensy Loader isn't running anymore. Then click Verify or Upload in Arduino and it will run a copy of 1.52 (assuming you're using Arduino with Teensyduino 1.52 installed).

It seems this was the problem. Obviously I never saw that TeensyLoader was still open. Thanks a lot Paul!
 
I have the same problem ....

It seems this was the problem. Obviously I never saw that TeensyLoader was still open. Thanks a lot Paul!

Hello, I have the same problem with a Teensy 4.1 ..... and initially ignored it because changes I was making to the code seemed to be uploaded. My Teensy Loader is 1.54 and after quitting and re-Uploading it is still the same version and same issue.

The verbose report shows this:
13:32:24.106 (ports 1): del child: location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1:1.0/tty/ttyACM0
13:32:24.106 (ports 1): devnode=/dev/bus/usb/001/050, subsystem=usb, ifacenum=-1
13:32:24.108 (ports 1): unknown action: unbind
13:32:24.110 (ports 1): unknown action: unbind
13:32:24.112 (ports 1): del child: location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1:1.1
13:32:24.113 (ports 1): del child: location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1:1.0
13:32:24.115 (ports 1): unknown action: unbind
13:32:24.126 (ports 1): del device: location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1
13:32:24.715 (ports 1): add device: subsys=usb, type=usb_device, location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1
13:32:24.715 (ports 1): devnode=/dev/bus/usb/001/051, subsystem=usb, ifacenum=-1
13:32:24.715 (ports 1): usb_add: /dev/bus/usb/001/051 (Teensy 4.1) Serial

Re-trying every 12 seconds or so.

I hope this makes sense to you. It almost seems to me that the Serial Monitor is not releasing the port so it can be used for programming ... is that possible? If so how do I stop it?
lsusb shows Bus 001 Device 033: ID 16c0:0483 Van Ooijen Technische Informatica Teensyduino Serial ... so that is connected .... Then the button on the T4.1 just appears to be flickering without stopping! Device number has changed, now 41.

I am using Ubuntu 20.04.4LTS 64bit ..... I notice that the last parameter in the last line in the above is incrementing .... is it searching for the T4.1?

Richard
 
Hello, I have the same problem with a Teensy 4.1 ..... and initially ignored it because changes I was making to the code seemed to be uploaded. My Teensy Loader is 1.54 and after quitting and re-Uploading it is still the same version and same issue.

The verbose report shows this:
13:32:24.106 (ports 1): del child: location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1:1.0/tty/ttyACM0
13:32:24.106 (ports 1): devnode=/dev/bus/usb/001/050, subsystem=usb, ifacenum=-1
13:32:24.108 (ports 1): unknown action: unbind
13:32:24.110 (ports 1): unknown action: unbind
13:32:24.112 (ports 1): del child: location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1:1.1
13:32:24.113 (ports 1): del child: location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1:1.0
13:32:24.115 (ports 1): unknown action: unbind
13:32:24.126 (ports 1): del device: location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1
13:32:24.715 (ports 1): add device: subsys=usb, type=usb_device, location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1
13:32:24.715 (ports 1): devnode=/dev/bus/usb/001/051, subsystem=usb, ifacenum=-1
13:32:24.715 (ports 1): usb_add: /dev/bus/usb/001/051 (Teensy 4.1) Serial

Re-trying every 12 seconds or so.

I hope this makes sense to you. It almost seems to me that the Serial Monitor is not releasing the port so it can be used for programming ... is that possible? If so how do I stop it?
lsusb shows Bus 001 Device 033: ID 16c0:0483 Van Ooijen Technische Informatica Teensyduino Serial ... so that is connected .... Then the button on the T4.1 just appears to be flickering without stopping! Device number has changed, now 41.

I am using Ubuntu 20.04.4LTS 64bit ..... I notice that the last parameter in the last line in the above is incrementing .... is it searching for the T4.1?

Richard
Hi, I have tried my T4 and that is OK when writing Blink ....on returning to thr T4.1 I still get errors even when sending Blink ... but blink is loaded and working. the verbose output may show the issue:
15:32:17.115 (ports 5): add child: subsys=usb, type=usb_interface, location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1:1.0
15:32:17.115 (ports 5): parent location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1
15:32:17.115 (ports 5): model=37 (Teensy 4.1)
15:32:17.115 (ports 5): usb_add: /dev/bus/usb/001/026 (Teensy 4.1) Serial
15:32:17.115 (ports 5): add child: subsys=usb, type=usb_interface, location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1:1.1
15:32:17.115 (ports 5): parent location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1
15:32:17.115 (ports 5): usb_add: /dev/bus/usb/001/026 (Teensy 4.1) Serial
15:32:17.119 (ports 5): unknown action: bind
15:32:17.208 (ports 5): add child: subsys=tty, type=(null), location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1:1.0/tty/ttyACM0
15:32:17.208 (ports 5): parent location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1
15:32:17.208 (ports 5): devnode=/dev/ttyACM0, subsystem=tty, ifacenum=0
15:32:17.208 (ports 5): usb_add: /dev/ttyACM0 (Teensy 4.1) Serial
15:32:17.214 (ports 5): unknown action: bind
15:32:17.218 (ports 5): unknown action: bind
15:33:44.654 (post_compile 1): Begin, version=1.54
15:33:44.887 (loader): Teensy Loader 1.54, begin program
15:33:44.926 (loader): File "Blink.ino.hex". 20480 bytes, 0% used
15:33:44.927 (loader): Listening for remote control on port 3149
15:33:44.927 (loader): initialized, showing main window
15:33:44.955 (loader): remote connection 15 opened
15:33:44.956 (post_compile 1): Sending command: comment: Teensyduino 1.54 - LINUX64 (teensy_post_compile)
15:33:44.956 (loader): remote cmd from 15: "comment: Teensyduino 1.54 - LINUX64 (teensy_post_compile)"
15:33:44.956 (loader): remote cmd from 15: "status"
15:33:44.962 (post_compile 1): Status: 1, 0, 0, 0, 0, 0, /tmp/arduino_build_301714/, Blink.ino.hex
15:33:44.962 (post_compile 1): Sending command: auto:eek:n
15:33:44.962 (loader): remote cmd from 15: "auto:eek:n"
15:33:44.962 (post_compile 1): Disconnect
15:33:44.972 (loader): remote connection 15 closed
15:33:44.984 (post_compile 2): Begin, version=1.54
15:33:44.985 (loader): remote connection 15 opened
15:33:44.985 (post_compile 2): Sending command: comment: Teensyduino 1.54 - LINUX64 (teensy_post_compile)
15:33:44.985 (loader): remote cmd from 15: "comment: Teensyduino 1.54 - LINUX64 (teensy_post_compile)"
15:33:44.985 (loader): remote cmd from 15: "status"
15:33:44.985 (post_compile 2): Status: 1, 1, 0, 0, 0, 0, /tmp/arduino_build_301714/, Blink.ino.hex
15:33:44.985 (post_compile 2): Disconnect
15:33:44.996 (post_compile 3): Running teensy_reboot: /home/richard/arduino-1.8.15/hardware/teensy/../tools/teensy_reboot
15:33:44.996 (loader): remote connection 15 closed
15:33:44.996 (loader): remote connection 15 opened
15:33:44.996 (loader): remote connection 15 closed
15:33:44.997 (reboot 4): Begin, version=1.54
15:33:44.997 (reboot 4): location = /dev/ttyACM0
15:33:44.997 (reboot 4): portlabel = /dev/ttyACM0
15:33:44.997 (reboot 4): portprotocol = serial
15:33:44.997 (reboot 4): Serial device /dev/ttyACM0 will be tried first
15:33:45.015 (loader): remote connection 15 opened
15:33:45.017 (reboot 4): add device: subsys=usb, type=usb_device, location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1
15:33:45.017 (reboot 4): devnode=/dev/bus/usb/001/026, subsystem=usb, ifacenum=-1
15:33:45.017 (reboot 4): add child: subsys=usb, type=usb_interface, location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1:1.0
15:33:45.017 (reboot 4): parent location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1
15:33:45.017 (reboot 4): model=37 (Teensy 4.1)
15:33:45.017 (reboot 4): add child: subsys=tty, type=(null), location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1:1.0/tty/ttyACM0
15:33:45.017 (reboot 4): parent location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1
15:33:45.017 (reboot 4): devnode=/dev/ttyACM0, subsystem=tty, ifacenum=0
15:33:45.017 (reboot 4): add child: subsys=usb, type=usb_interface, location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1:1.1
15:33:45.017 (reboot 4): parent location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1
15:33:45.062 (loader): remote cmd from 15: "show:arduino_attempt_reboot"
15:33:45.062 (loader): got request to show arduino rebooting message
15:33:45.064 (loader): remote cmd from 15: "comment: Teensyduino 1.54 - LINUX64 (teensy_reboot)"
15:33:45.064 (loader): remote cmd from 15: "status"
15:33:45.143 (loader): remote connection 15 closed
15:33:45.150 (ports 5): unknown action: unbind
15:33:45.152 (ports 5): del child: location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1:1.0/tty/ttyACM0
15:33:45.152 (ports 5): devnode=/dev/bus/usb/001/026, subsystem=usb, ifacenum=-1
15:33:45.153 (ports 5): del child: location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1:1.1
15:33:45.153 (loader): remote connection 15 opened
15:33:45.156 (ports 5): unknown action: unbind
15:33:45.158 (ports 5): del child: location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1:1.0
15:33:45.161 (ports 5): unknown action: unbind
15:33:45.169 (ports 5): del device: location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1
15:33:45.607 (ports 5): add device: subsys=usb, type=usb_device, location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1
15:33:45.607 (ports 5): devnode=/dev/bus/usb/001/027, subsystem=usb, ifacenum=-1
15:33:45.607 (ports 5): usb_add: /dev/bus/usb/001/027 (Teensy 4.1) Bootloader
15:33:45.616 (ports 5): add child: subsys=usb, type=usb_interface, location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1:1.0
15:33:45.616 (ports 5): parent location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1
15:33:45.616 (ports 5): usb_add: /dev/bus/usb/001/027 (Teensy 4.1) Bootloader
15:33:45.620 (ports 5): add child: subsys=hid, type=(null), location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1:1.0/0003:16C0:0478.000D
15:33:45.620 (ports 5): parent location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1
15:33:45.620 (ports 5): model=37 (Teensy 4.1)
15:33:45.620 (ports 5): usb_add: /dev/bus/usb/001/027 (Teensy 4.1) Bootloader
15:33:45.628 (ports 5): add child: subsys=hidraw, type=(null), location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1:1.0/0003:16C0:0478.000D/hidraw/hidraw0
15:33:45.628 (ports 5): parent location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1
15:33:45.628 (ports 5): usb_add: /dev/bus/usb/001/027 (Teensy 4.1) Bootloader
15:33:45.630 (ports 5): unknown action: bind
15:33:45.633 (ports 5): unknown action: bind
15:33:45.638 (ports 5): unknown action: bind
15:33:45.685 (loader): Device came online, code_size = 8126464
15:33:45.685 (loader): Board is: Teensy 4.1 (IMXRT1062), version 1.05
15:33:45.689 (ports 5): del child: location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1:1.0/0003:16C0:0478.000D/hidraw/hidraw0
15:33:45.692 (ports 5): unknown action: unbind
15:33:45.694 (ports 5): del child: location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1:1.0/0003:16C0:0478.000D
15:33:45.698 (ports 5): unknown action: unbind
15:33:45.703 (loader): File "Blink.ino.hex". 20480 bytes, 0% used
15:33:45.703 (loader): set background IMG_ONLINE
15:33:45.719 (loader): File "Blink.ino.hex". 20480 bytes, 0% used
15:33:45.720 (loader): elf appears to be for Teensy 4.1 (IMXRT1062) (8126464 bytes)
15:33:45.720 (loader): elf binary data matches hex file
15:33:45.720 (loader): elf file is for Teensy 4.1 (IMXRT1062)
15:33:45.721 (loader): begin operation
15:33:45.738 (loader): flash, block=0, bs=1024, auto=1
15:33:45.739 (loader): gauge old value = 0
15:33:45.739 (loader): flash, block=1, bs=1024, auto=1
15:33:45.994 (loader): gauge old value = 1
15:33:46.008 (loader): flash, block=2, bs=1024, auto=1
15:33:46.008 (loader): gauge old value = 2
15:33:46.008 (loader): flash, block=3, bs=1024, auto=1
15:33:46.009 (loader): gauge old value = 3
15:33:46.009 (loader): flash, block=4, bs=1024, auto=1
15:33:46.009 (loader): gauge old value = 4
15:33:46.010 (loader): flash, block=5, bs=1024, auto=1
15:33:46.010 (loader): gauge old value = 5
15:33:46.011 (loader): flash, block=6, bs=1024, auto=1
15:33:46.012 (loader): gauge old value = 6
15:33:46.013 (loader): flash, block=7, bs=1024, auto=1
15:33:46.014 (loader): gauge old value = 7
15:33:46.018 (loader): flash, block=8, bs=1024, auto=1
15:33:46.018 (loader): gauge old value = 8
15:33:46.018 (loader): flash, block=9, bs=1024, auto=1
15:33:46.020 (loader): gauge old value = 9
15:33:46.020 (loader): flash, block=10, bs=1024, auto=1
15:33:46.021 (loader): gauge old value = 10
15:33:46.022 (loader): flash, block=11, bs=1024, auto=1
15:33:46.023 (loader): gauge old value = 11
15:33:46.023 (loader): flash, block=12, bs=1024, auto=1
15:33:46.025 (loader): gauge old value = 12
15:33:46.028 (loader): flash, block=13, bs=1024, auto=1
15:33:46.029 (loader): gauge old value = 13
15:33:46.029 (loader): flash, block=14, bs=1024, auto=1
15:33:46.030 (loader): gauge old value = 14
15:33:46.031 (loader): flash, block=15, bs=1024, auto=1
15:33:46.032 (loader): gauge old value = 15
15:33:46.033 (loader): flash, block=16, bs=1024, auto=1
15:33:46.034 (loader): gauge old value = 16
15:33:46.034 (loader): flash, block=17, bs=1024, auto=1
15:33:46.035 (loader): gauge old value = 17
15:33:46.035 (loader): flash, block=18, bs=1024, auto=1
15:33:46.036 (loader): gauge old value = 18
15:33:46.037 (loader): flash, block=19, bs=1024, auto=1
15:33:46.038 (loader): gauge old value = 19
15:33:46.055 (loader): sending reboot
15:33:46.056 (loader): begin wait_until_offline
15:33:46.061 (ports 5): unknown action: unbind
15:33:46.064 (ports 5): del child: location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1:1.0
15:33:46.067 (ports 5): unknown action: unbind
15:33:46.076 (ports 5): del device: location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1
15:33:46.106 (loader): HID/linux: something changed, try reading a descriptor
15:33:46.106 (loader): HID/linux: Device was just disconnected
15:33:46.106 (loader): offline, waited 1
15:33:46.106 (loader): end operation, total time = 0.385 seconds
15:33:46.106 (loader): set background IMG_REBOOT_OK
15:33:46.109 (loader): redraw timer set, image 14 to show for 1200 ms
15:33:46.627 (ports 5): add device: subsys=usb, type=usb_device, location=/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1
15:33:46.627 (ports 5): devnode=/dev/bus/usb/001/028, subsystem=usb, ifacenum=-1
15:33:46.627 (ports 5): usb_add: /dev/bus/usb/001/028 (Teensy 4.1) Serial
15:33:47.310 (loader): redraw, image 9
15:34:00.222 (loader): Verbose Info event
I hope this helps .... can I reload the Boot Loader? R
 
Back
Top