Beetle ESP32-C3 - flash and use Micropython

userHead PiiePython 2022-04-28 01:28:32 981 Views3 Replies

Hi

 

I think I successfully flashed Micropython onto my Beetle, but I cannot get any code onto the device now.

 

On my Windows 11 PC, when I connect the device via USB cable, I can see a COM4 is “added” to my sytem, but if I try to use Mu Editor, it says there is no device connected to my PC. Other Micropython devices I've used in the past allows you to drop python files directly onto the device like a USB Flash drive, but I cannot seem to write a python file to these devices?

 

Any help is appreciated.

 

 

2022-05-05 15:12:50

1. ESP32 - C3 use micropython environmental needs through esptool download firmware (firmware link: https://www.micropython.org/download/esp32c3-usb/)2. Esp32-c3 does not support dragging python files from the USB device to the ESP32-C3 device like other MicroPython devices. You can only burn Python files to esp32-C3 through the serial port3. In the Arduino environment, if you cannot download programs, pull IO9 down, power it on, and then burn it.What exactly is wrong with the page when you cannot burn? Is it convenient to send us screenshots?

userHeadPic Tonny12138
PiiePython wrote:

Hi, thank you for your response and the suggestion to pull down IO 9.

 

This seems to have brought me one step closer to being able to use the device again, but it's not quite there yet.

 

After bridging IO9 with GND, I was able to again run the esptool.py command to erase the flash ( recall that I already flashed micropython to this unit) - but now I think I should just give up and restore the unit to “factory default”?

 

I used these commands to erase and flash micropython:

 

python esptool.py --chip esp32c3 --port COM4 erase_flash 

 

 

python esptool.py --chip esp32c3 -p COM4 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 4MB 0x0 esp32c3-usb-20220117-v1.18.bin 

Each of these commands ran without error, but after completing, Mu Editor still does not detect a micropython device.

 

I then tried removing the micropython again by erasing the flash again, and then tried to use ESPTools in VS Studio with platform IO to write a simple “hello world” example to the unit. When I try to do this, it also seems to get further than before, but it hangs here:

 

de-panic backtrace c:\users\piie\pycharmprojects\esp-idf\examples\get-started\hello_world\build\hello_world.elf -m 'C:\Users\piie\.espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe' 'C:\Users\piie\esp\esp-idf\tools\idf.py' '-p' 'COM4'"...--- WARNING: GDB cannot open serial ports accessed as COMx--- Using \\.\COM4 instead...--- idf_monitor on \\.\COM4 115200 ------ Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---ESP-ROM:esp32c3-api1-20210207Build:Feb  7 2021rst:0x15 (USB_UART_CHIP_RESET),boot:0x5 (DOWNLOAD(USB/UART0/1))Saved PC:0x400462dc

waiting for download

 

 

2022-05-07 15:28:55
1 Replies
2022-05-04 16:54:56

Is there a way to restore the boards to “factory” setting without flashing? When I try to use esptool.py to remove flash, the first part of the script receives something from the board, since it shows that it detects it as an esp32-c3, but then when it starts with the erase part it errors out saying it did not receive anything via serial.

 

I've tried using esptools, Arduino IDE and also Platform-io and ESP-IDF to try anmd “restore” the units, but they all refuse to erase/reflash the unit

userHeadPic PiiePython