Nominal Animal
Well-known member
Will teensy_loader_cli get support for Teensy 4.0?
pi@RPI4B:~/teensy_loader_cli $ ./teensy_loader_cli --mcu=TEENSY31 -v -w Blink_any_pin.ino.TEENSY31.hex
Teensy Loader, Command Line, Version 2.1
Read "Blink_any_pin.ino.TEENSY31.hex": 32084 bytes, 12.2% usage
Waiting for Teensy device...
(hint: press the reset button)
Found HalfKay Bootloader
Read "Blink_any_pin.ino.TEENSY31.hex": 32084 bytes, 12.2% usage
Programming................................
Booting
pi@RPI4B:~/teensy_loader_cli $ ./teensy_loader_cli --mcu=TEENSY40 -v -w Blink_any_pin.ino.TEENSY40.hex
Teensy Loader, Command Line, Version 2.1
Warning, HEX parse error line 2
error reading intel hex file "Blink_any_pin.ino.TEENSY40.hex"
pi@RPI4B:~/teensy_loader_cli $
pi@RPI4B:~/teensy_loader_cli $ head Blink_any_pin.ino.TEENSY40.hex
:0200000460009A
:100000004643464200000156000000000101020084
:1000100000000000000000000000000000000000E0
:1000200000000000000000000000000000000000D0
:1000300000000000000000000000000000000000C0
:1000400000000000010403000000000000000000A8
:100050000000200000000000000000000000000080
:100060000000000000000000000000000000000090
:100070000000000000000000000000000000000080
:10008000EB04180A063204260000000000000000FD
pi@RPI4B:~/teensy_loader_cli $ head Blink_any_pin.ino.TEENSY31.hex
:1000000000800020BD010000850700003D070000C2
:100010003D0700003D0700003D0700003D070000D0
:100020003D0700003D0700003D0700008507000078
:10003000850700003D070000051D0000091E0000A7
:100040008507000085070000850700008507000080
:100050008507000085070000850700008507000070
:100060008507000085070000850700008507000060
:100070008507000085070000850700008507000050
:100080008507000085070000850700008507000040
:100090008507000085070000850700008507000030
pi@RPI4B:~/teensy_loader_cli $
pi@RPI4B:~/teensy_loader_cli $ tail Blink_any_pin.ino.TEENSY40.hex
:107F2C00E80F0020E80F0020F00F0020F00F0020D9
:107F3C00F80F0020F80F0020001000200010002087
:107F4C000810002008100020101000201010002035
:107F5C0018100020181000202010002020100020E5
:107F6C002810002028100020301000203010002095
:107F7C003810002038100020401000204010002045
:107F8C0048100020481000205010002050100020F5
:107F9C0000000200FFFFFFFF0000000000000000D7
:040000056000100087
:00000001FF
pi@RPI4B:~/teensy_loader_cli $ tail Blink_any_pin.ino.TEENSY31.hex
:107CC400F890FF1FF890FF1F0091FF1F0091FF1F06
:107CD4000891FF1F0891FF1F1091FF1F1091FF1FB4
:107CE4001891FF1F1891FF1F2091FF1F2091FF1F64
:107CF4002891FF1F2891FF1F3091FF1F3091FF1F14
:107D04003891FF1F3891FF1F4091FF1F4091FF1FC3
:107D14004891FF1F4891FF1F5091FF1F5091FF1F73
:107D24005891FF1F5891FF1F6091FF1F6091FF1F23
:107D34006891FF1F6891FF1F7091FF1F7091FF1FD3
:107D44007891FF1F7891FF1F00000200FFFFFFFFE3
:00000001FF
pi@RPI4B:~/teensy_loader_cli $
Line: length=2 Addr=0
After addr... test: 2
ext addr = 60000000
Line: length=16 Addr=0
Addr > Max: 1610612752 > 1048576
Warning, HEX parse error line 2
error reading intel hex file "Blink_any_pin.ino.TEENSY40.hex"
:0200000460009A
if (!(SNVS_LPCR & SNVS_LPCR_SRTC_ENV)) {
// if SRTC isn't running, start it with default Jan 1, 2019
SNVS_LPSRTCLR = 1546300800u << 15;
SNVS_LPSRTCMR = 1546300800u >> 17;
SNVS_LPCR |= SNVS_LPCR_SRTC_ENV;
}
Unable to soft reboot with USB error: error sending control message: Broken pipe
bool doStartBootloader()
{
if (isHalfKay) return true;
else if (isSerial)
{
if (String.IsNullOrEmpty(ComPort)) return false;
using (var port = new SerialPort(ComPort))
{
port.Open();
port.BaudRate = 134; //This will switch the board to HalfKay. Don't try to access port after this...
return true;
}
}
else
{
//Hack
var device = HidDevices.Enumerate(pjrcVID)
.Where(dev => parseHidSN(dev) == Serialnumber) // select all devices with correct serial number
.FirstOrDefault(d => d.Capabilities.FeatureReportByteLength == 5); // looks like we need a device with exactly that length to issue a reset command
if (device != null)
{
device.WriteFeatureData(new byte[] { 0x00, 0xA9, 0x45, 0xC2, 0x6B });
return true;
}
}
return false;
}
Hello All,
I'm trying to load a hex file for Teensy 4.0 on a ubuntu IoT SBC. This worked great on the 3.2, but I get an unknown MCU type "imxrt1062" when I modify the command for Teensy 4.0 like so: root@colibri-vf:~# teensy_loader_cli -mmcu=imxrt1062 -v -w -s U1-T40-2in2out_200311.ino.hex
Looks like it should work based on https://www.pjrc.com/teensy/loader_cli.html. I've tried -mmcu=imxrt1062, -mcu=imxrt1062, and --mcu=imxrt1062 (since the command that works on the T3.2 is teensy_loader_cli --mcu=mk20dx256 -v -w -s nameofhexfile.ino.hex). The problem seems to be the Unknown MCU type "imxrt1062".
So, I'm thinking the halfkay loader I'm using isn't current? Or the environment? Ideas? Thank You.
-J