ESP-ROM:esp32s2-rc4-20191025 Build:Oct 25 2019 rst:0x1 (POWERON),boot:0x8 (SPIFASTFLASHBOOT) SPIWP:0xee mode:DIO, clock div:1 load:0x3ffe6100,len:0x4 load:0x3ffe6104,len:0x1a24 load:0x4004c000,len:0x1a6c load:0x40050000,len:0x20fc entry 0x4004c35c I (46) boot: ESP-IDF v4.2 2nd stage bootloader I (46) boot: compile time 11:24:34 I. Regarding the Windows GUI flash download tool, we'll check with the developers if this tool has been updated for ESP32-D2WD yet. Espressif Systems is a fabless.
M5Stackには、
・Arduinoで開発できる、M5Stack
・MicroPythonで開発できる、M5Cloud
・スマホからビジュアルプログラミングに対応した、M5go
の3種類が出ている。ファームウェアを書き換えれば、開発環境を入れ替えることができる。
esptoolのインストール: pip install esptool
Espressif Flash Download Toolsをダウンロードする。
Espressif Flash Download Tool
以下から*.binのファイルをダウンロードする。
M5Stack
https://github.com/m5stack/M5Cloud/tree/master/firmwares/OFF-LINE
M5Cloud
https://github.com/m5stack/M5Cloud/tree/master/firmwares
M5go
https://github.com/m5stack/M5GO/tree/master/firmware/v0.11
1.Flash ROMの内容を消去(erase)する、/dev/ttyUSB0はM5Stackのポートを調べて書き換える。
esptool.py --chip esp32 --port /dev/ttyUSB0 erase_flash
2.Flash ROMにファームウェアを書き込む、firmware.binはファームウェアのファイル名に書き換える。
esptool.py --chip esp32 --port /dev/ttyttyUSB0 write_flash --flash_mode dio -z 0x1000 firmware.bin
1.esp32 download toolsを選択する。
2.SPI Downloadタブから、ファームウェアを選択し、Eraseを押した後、Startを押す。
M5GOのfirmwareをM5Stack用に書き換える(+戻し方)http://littlewing.hatenablog.com/entry/2018/05/21/153646
M5Cloud
https://github.com/m5stack/M5Cloud/blob/master/README_JP.md
Use Arduino MKR (SAMD21) as serial proxy/passthrough for sending AT commands, watch bootloader messages or flash ESP firmware
| × | 1 | ||
| × | 1 | ||
| × | 1 | ||
| × | 7 |
The ESP8266 (ESP-01) is a WiFi module running at 3.3V, so it normally requires a 3.3V TTL level USB to Serial port adapter, for serial connection from a PC.
This writeup shows how a compatible MCU can be used as a serial proxy or serial passthrough, to forward USB traffic from the PC to the ESP8266. And of course returning traffic from the ESP8266 back to the PC.
The solution is to use an Arduino MKR series, Arduino Zero or compatible, based on SAMD21 or SAMD51 MCU’s with at least 8 Kbytes of SRAM and 16 Kbyte of flash, working at 3.3 volt. A special Arduino sketch must be flashed on the microcontroller.
The MCU should use native USB for PC connection and a hardware UART for connecting to the ESP. The Arduino SAMD21/51-based MCU’s fulfill these requirements.
This writeup is primarily meant for flashing new firmware on the ESP, but may also be used to watch bootloader messages or execute AT-commands on the ESP from the Arduino Serial Monitor or using a terminal emulator with serial port support.
Connect the ESP8266 (ESP-01) to the Arduino like this:
Pin 8, 9 and 10 might be replaced with other pins, just remember to change the definitions in the Arduino sketch.
Install the Arduino sketch from https://github.com/ksmith3036/EspSerialPassthrough using Arduino Studio or Visual Micro into the Arduino MKR or compatible,
Firmware may be found at https://www.espressif.com/en/support/download/at.
Content of firmware downloaded from espressif:
Substitute Fwfolder with a real name, like ESP8266_NonOS_AT_Bin_V1.7.4.
First part of FwfolderbinatREADME.md:
For an ESP8266 with 8 Mbit / 1 Mbyte flash, configure the ESP8266 Download Tool according to the information from the README.md file like below. Some deduction must be done, to find the correct files:
For an ESP8266 with 16 Mbit / 2 Mbyte flash, configure the ESP8266 Download Tool according to the information from the README.md file like below. Some deduction must be done, to find the correct files:
If having a flash of 16 Mbit or more, or wanting to use the AT-SDIO version for 16 Mbit flash, refer to the Fwfolderbinat_sdioREADME.md file.
The ESP firmware flashing tool may be downloaded from https://www.espressif.com/en/support/download/other-tools.
Unpack and run the flash download tool:
A black window appears.
After 5 to 30 seconds, a window appears: select Developer Mode
Then select ESP8266 DownloadTool
Use SpiAutoSet to get parameters from ESP, by checking SpiAutoSet and then pressing START with no files selected for flashing. Filenames may be listed, but they must be unchecked.
When using an Arduino MKR or Zero, baud rate could be set at up to 1500000 baud. If using an Arduino without native USB, 115200 should be used.
The command window shows the working. Initially the flashing program connect using 115200 baud, sending a stub loader to the ESP. If another baud rate than 115200 is selected in the user interface, the baud rate is switched. Switching baud rates will only work for Arduinos with native USB connection to the PC, since they in fact ignore the baud rate between the PC and Arduino, always running at full USB speed, which for an SAMD21 is 12 Mbit/sec. The EspSerialPassthrough sketch detects the baud rate change command, and changes the baud rate between the Arduino and the ESP accordingly.
The results for an ESP-01 / ESP8266 with 8 Mbit flash:
The program finds the crystal frequency (CrystFreq) and flash size. In my case it also keeps the SPI MODE set to QIO. Several tries flashing with SPI mode set to QIO failed, but an Internet search found that DOUT might be necessary to select manually.
Uncheck SpiAutoSet and select the appropriate SPI MODE, which for my ESP8266 was DOUT. SPI Mode seems to control the way the ESP flashes itself.
Then select the correct files to flash, according to the README.md file of the ESP firmware, and click START:
For baud rates, using an Arduino MKR with SAMD21 microcontroller, connected to the PC using native USB, I successfully have flashed with baud rates up to 1500000.
Reset the Arduino, which makes the Arduino program reset the ESP8266.
Open a serial monitor or terminal emulator like Putty. Make sure to send both NewLine and Carriage Return as line feeds. May manually be entered as Ctrl-M + Ctrl-J instead of using the ENTER key.
Run the AT+GMR command:
Firmware upgraded successfully!