Flashing troubles [SOLVED] #7401
Replies: 1 comment
-
Posted at 2020-04-21 by AkosLukacs What command did you use to flash Espruino? For example the last couple of times I used this command (basically what's in the ESP32 directory, replace COM6 with your com port):
Posted at 2020-04-21 by Sdellava I've copied your command replacing only the COM port. This is the output: esptool.py --port COM4 --baud 921600 write_flash -z --flash_mode "dio" --flash_freq "40m" 0x1000 bootloader.bin 0x10000 espruino_esp32.bin 0x8000 partitions_espruino.bin Then using the web IDE I get the result captured in the attached image Attachments: Posted at 2020-04-21 by Sdellava Thanks for the replay. I've answered in the next message. Posted at 2020-04-22 by Lixas I would omit (delete) Posted at 2020-04-22 by Sdellava I've followed your suggestion, but I get the same result: C:\esptool\espruino_2v05.15_esp32> espruino_2v05.15_esp32>esptool.py --chip esp32 --port COM4 erase_flash C:\esptool\espruino_2v05.15_esp32>esptool.py --port COM4 --baud 921600 write_flash -z 0x1000 bootloader.bin 0x10000 espruino_esp32.bin 0x8000 partitions_espruino.bin Leaving... C:\esptool\espruino_2v05.15_esp32> IDE output is identical to the previously uploaded. The fact that flashing with the Arduino IDE and then replacing the bin, the Espruino code boot and work for some seconds before to crash, make me think that the bootloader provided in the Espruino kit is bugged. I've tried some old version with no luck. Can someone share the working kit version? Posted at 2020-04-22 by Lixas your baud rate is still 921600. Lower it to 115200 Posted at 2020-04-22 by Lixas i have found your error: wrong adresses on chip Should be: Posted at 2020-04-22 by Lixas https://www.espruino.com/binaries/espruino_2v05_esp32/ C:\Users\lixas\Workspace\JS\ESP32_Firmware\2v05>esptool.py --chip esp32 --port COM3 --baud 115200 erase_flash C:\Users\lixas\Workspace\JS\ESP32_Firmware\2v05>esptool.py --chip esp32 --port COM3 --baud 115200 write_flash -z 0x1000 bootloader.bin 0x8000 partitions_espruino.bin 0x10000 espruino_esp32.bin Leaving... IMPORTANT: change baud speed at IDE-> Settings-> Communication t0 115200 Attachments: Posted at 2020-04-22 by Sdellava Thanks Lixas, but unfortunately I did not receive the same result. I've tried with lower speed. Tried with different cables and changed the pc's USB port I got always the same boot loop as reported in my upload. May be my board is not a standard one? I've attached a picture. Attachments: Posted at 2020-04-22 by Lixas Mine looks the same. Try to burn Micropython firmware just to be sure. Probably it has something to do with your particular board... Attachments: Posted at 2020-04-22 by Sdellava Update: flashed again with Arduino IDE, then with esptool without erasing (only espruino.bin and partitions) attached the result. It's clear that it work (I've don sum) then it crash for some reason. Attachments: Posted at 2020-04-22 by Lixas This will not help, but at least explain restarting. I see reason is RTCWDT_RTC_RESET - that means somewhere in begining watchdog is set up and board was reset by watchdog. I'm not aware of ways to disable a WDT if it was set up (based on expierence from micropython). In micropython, only way to keep your board running is to WDT.feed() the dog if that was set somewhere. Posted at 2020-04-22 by Sdellava I guess the error comes from the Arduino bootload config/build. But in any case I was not looking to run the Espruino in this way. This is only to show that the bin flashing process works and so there must be a bug in the Espruino bootloader.bin Otherwise I can't understand why with the Arduino boot loader, Espruino boots correctly. Posted at 2020-04-22 by Lixas
I have various ESP32's and all works correctly (version 2v04 as i was testing what to choose- espruino or micropython). So you should try another esp32 if its available. Posted at 2020-04-23 by Sdellava UPDATE: installing a very old kit (1.96 release) ESP boot properly. Installing then the bin of a newer release do not help. So I can confirm the the newer version of the bootloader contain some incompatibility at least with my board. I'll try to find the last working kit to help the devs to find the bug. Posted at 2020-04-23 by Sdellava I confirm that the last working version is the espruino_2v00_esp32 Upgrading only the espruino_esp32.bin do not help. So after the 2.00 a compatibility limit has been introduced. I hope my research can help in finding the bug. Posted at 2020-04-23 by AkosLukacs I have used later versions without problem. Right now I have 2v04.406 on two ESP32 boards (one TTGO T-display, one generic). One thing could be the power supply: Espruino turns on the wifi radio right at boot and both cores at full power without sleep. Significantly higher power draw, and that may cause a brownout with Espruino with the same power supply & cable that works with Arduino or Micro Python. Since (AFAIK) those don't turn on the radio at boot by default. Can you try a shorter / better USB cable and adding some extra decoupling capacitor on the board? Posted at 2020-04-23 by Sdellava Thanks AkosLukacs. I've tried with many different cables including a very short one (14 cm) without success. In addition I've tried all the releases since the 1.96 up to the last and every old release older than the 2.00 work fine. Therefore I do not think the issue is caused by random element like a cable quality o board specific configuration. More probably from the 2.1 on the bootloader or the main image contains some code that can cause the issue systematically. It is clear that there must be a specific reason on my board, but it was there since the the earlier version. Posted at 2020-04-24 by Sdellava SOLVED: I've opened an issue on githup: espruino/Espruino#1804 From version 2.01 on the board running with 160 MHz clock are no more supported by Espruino, and this is the case of my board. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-04-20 by Sdellava
Hi, I'm trying to flash a ESP 32 board (precisely a ESP32D0WDQ6 revision 1) with no success.
I'm able to flash the device with Arduino IDE, the device boot and code works perfectly.
Then I've downloaded the Espruino late release and following the instruction I obtain the continuous boot loop.
E (62) boot: Chip CPU frequency rated for 160MHz. Modify CPU frequency in menuconfig
user code done
ets Jun 8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:2668
load:0x40078000,len:7304
load:0x40080000,len:5312
entry 0x40080274
the strange fact is that if I flash the device using Adruino IDE then flash only the espruino bin the device boots.
Unfortunately it still reboot with this message:
E (62) boot: Chip CPU frequency rated for 160MHz. Modify CPU frequency in menuconfig user code done ets Jun 8 2016 00:22:57 rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:2668 load:0x40078000,len:7304 load:0x40080000,len:5312 entry 0x40080274
Any idea?
Beta Was this translation helpful? Give feedback.
All reactions