"Error opening USB device: No error" while programming by teensy_loader_cli

Status
Not open for further replies.

saeed

New member
Hi,

I don't have any prior experience with Teensy boards and I'm pretty newbie. I have one Teensy 4.0 board connected to a laptop which I don't have physical access to it but I have a ssh connection to the laptop so the only option for me to program the device is using teensy_loader_cli package.

I've successfully installed teensy_loader_cli and programmed the device for the first time using the following command with the available hex file example in the directory:

/teensy_loader_cli --mcu=TEENSY40 -s blink_slow_Teensy40.hex

and I confirmed that the LED toggles and every thing's OK.

In the next step I opened an example in Arduino:

/examples/Teensy/Tutorial3/HelloSerialMonitor


void setup() {
Serial.begin(38400);
}

void loop()
{
Serial.println("Hello World");
delay(1000);
}

I verify/compiled the code and export compiled binary file to the laptop and used the previous cli command to program the board, but I got this error and cli hangs in there:

"Error opening USB device: No error"

Well I know this was a bad code and I have to press the push button or reset the USB cable but why is it a bad code? Here is the Arduino Tools parameters for this sketch:

Board : "Teensy 4.0"
USB Type: "Serial"
...
 
It seems the precompiled HEX was built without Serial - so it requires a Button press for the next upload. This is how Teensy units ship due to some prior issue when the PC first sees it.

As noted building simple Blink with Serial will enable the Auto Upload.
 
Status
Not open for further replies.
Back
Top