Uploading sketch to ESP8266 through 32u4 as USB to FTDI
Posted: Fri Apr 03, 2015 10:01 pm
Hello, all.
First I am able to uplaod a sketch to the ESP8266 using the Arudino IDE and an FTDI adaptor.
I am trying to uplaod a sketch using a 32u4 as the FTDI adpator, but the process does not complete.
I have a very simple sketch on the 32u4 that listens for any bytes of data on USB Serial port and writes those bytes to Serial1.
The serial connection between the 32u4 and ESP8266 is working. I can send data between the two of them.
Here is the sketch I have on the 32u4
I have verbose logging turned on for both compile and upload, but I don't get any logged output after esptool starts up. the process hangs indefinatley.
here is as far as the verbose logging goes.
Has anybody been able to upload sketches to the ESP8266 in this way, or can you think of any command line switches I could try on esptool? I have tried multiple upload speeds.
First I am able to uplaod a sketch to the ESP8266 using the Arudino IDE and an FTDI adaptor.
I am trying to uplaod a sketch using a 32u4 as the FTDI adpator, but the process does not complete.
I have a very simple sketch on the 32u4 that listens for any bytes of data on USB Serial port and writes those bytes to Serial1.
The serial connection between the 32u4 and ESP8266 is working. I can send data between the two of them.
Here is the sketch I have on the 32u4
Code: Select all
void setup()
{
Serial.begin(115200);
Serial1.begin(115200);// 1200 2400 19200, 38400, 57600, 115200
}
void loop()
{
while (Serial.available())
{
char sbyte = Serial.read();
Serial1.write(sbyte);
}
delay(1);
while (Serial1.available())
{
char sbyte = Serial1.read();
Serial.write(sbyte);
}
delay(1);
}
I have verbose logging turned on for both compile and upload, but I don't get any logged output after esptool starts up. the process hangs indefinatley.
here is as far as the verbose logging goes.
Code: Select all
setting board to none
setting baudrate from 115200 to 115200
setting port from /dev/tty.usbserial to /dev/cu.usbmodem142141
setting address from 0x00000000 to 0x00000000
espcomm_upload_file
stat /var/folders/69/gdyqzzv91jq_4fdl81x_xbt40000gn/T/build7816511780309378484.tmp/esp_blink.cpp_00000.bin success
opening port /dev/cu.usbmodem142141 at 115200
tcgetattr
tcsetattr
serial open
opening bootloader
resetting board
trying to connect
setting character timeout 0
done
setting character timeout 1
done
espcomm_cmd: sending command header
espcomm_cmd: sending command payload
trying to connect
setting character timeout 0
done
setting character timeout 1
done
espcomm_cmd: sending command header
espcomm_cmd: sending command payload
espcomm cmd: receiving 2 bytes of data
setting character timeout 0
done
setting character timeout 1
done
espcomm_open
Uploading 30160 bytes from /var/folders/69/gdyqzzv91jq_4fdl81x_xbt40000gn/T/build7816511780309378484.tmp/esp_blink.cpp_00000.bin to flash at 0x00000000
erasing flash
espcomm_cmd: sending command header
espcomm_cmd: sending command payload
setting timeout 5000
setting character timeout 50
done
setting timeout 1
setting character timeout 1
done
espcomm cmd: receiving 2 bytes of data
writing flash
Has anybody been able to upload sketches to the ESP8266 in this way, or can you think of any command line switches I could try on esptool? I have tried multiple upload speeds.