esp32c3 arduino ide my code is not executed

khoih-prog
Posts: 53
Joined: Sat Feb 22, 2020 8:16 pm

Re: esp32c3 arduino ide my code is not executed

Postby khoih-prog » Mon Aug 23, 2021 5:03 pm

FYI, Problem still persists in ESP32 Arduino 2.0.0 RC2 and Arduino IDE 1.8.15

After reupload with ESP32_DEV

Code: Select all

xx⸮xxxx⸮⸮x⸮⸮x⸮⸮x⸮⸮x⸮x⸮xx⸮⸮⸮⸮⸮⸮x⸮⸮xxxxx⸮⸮x⸮xx⸮⸮⸮⸮⸮⸮⸮x⸮⸮⸮⸮⸮
ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x1 (POWERON),boot:0xc (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd6100,len:0x1428
load:0x403ce000,len:0xc04
load:0x403d0000,len:0x292c
entry 0x403ce000
I (30) boot: ESP-IDF v4.4-dev-2313-gc69f0ec32 2nd stage bootloader
I (30) boot: compile time 12:10:14
I (30) boot: chip revision: 3
I (30) boot_comm: chip revision: 3, min. bootloader chip revision: 0
I (37) qio_mode: Enabling default flash chip QIO
I (41) boot.esp32c3: SPI Speed      : 80MHz
I (45) boot.esp32c3: SPI Mode       : QIO
I (49) boot.esp32c3: SPI Flash Size : 2MB
I (52) boot: Enabling RNG early entropy source...
I (57) boot: Partition Table:
I (59) boot: ## Label            Usage          Type ST Offset   Length
I (66) boot:  0 nvs              WiFi data        01 02 00009000 00005000
I (72) boot:  1 otadata          OTA data         01 00 0000e000 00002000
I (79) boot:  2 app0             OTA app          00 10 00010000 00140000
I (85) boot:  3 spiffs           Unknown data     01 82 00150000 000b0000
I (92) boot: End of partition table
I (95) boot_comm: chip revision: 3, min. application chip revision: 0
I (101) esp_image: segment 0: paddr=00010020 vaddr=3c030020 size=08c60h ( 35936) map
I (114) esp_image: segment 1: paddr=00018c88 vaddr=3fc8b600 size=0155ch (  5468) load
I (117) esp_image: segment 2: paddr=0001a1ec vaddr=40380000 size=05e2ch ( 24108) load
I (128) esp_image: segment 3: paddr=00020020 vaddr=42000020 size=23db4h (146868) map
I (152) esp_image: segment 4: paddr=00043ddc vaddr=40385e2c size=056ech ( 22252) load
I (156) esp_image: segment 5: paddr=000494d0 vaddr=50000000 size=00010h (    16) load
I (160) boot: Loaded app from partition at offset 0x10000
I (161) boot: Disabling RNG early entropy source...

Starting ISR_16_Timers_Array_Complex on ESP32C3_DEV
ESP32_New_TimerInterrupt v1.0.0
CPU Frequency = 160 MHz
Starting ITimer OK, millis() = 2188
SimpleTimer : 2, ms : 12203, Dms : 10005
Timer : 0, programmed : 5000, actual : 5000
Timer : 1, programmed : 10000, actual : 10000
Timer : 2, programmed : 15000, actual : 0
Timer : 3, programmed : 20000, actual : 0
Timer : 4, programmed : 25000, actual : 0
Timer : 5, programmed : 30000, actual : 0
Timer : 6, programmed : 35000, actual : 0
Timer : 7, programmed : 40000, actual : 0
Timer : 8, programmed : 45000, actual : 0
Timer : 9, programmed : 50000, actual : 0
Timer : 10, programmed : 55000, actual : 0
Timer : 11, programmed : 60000, actual : 0
Timer : 12, programmed : 65000, actual : 0
Timer : 13, programmed : 70000, actual : 0
Timer : 14, programmed : 75000, actual : 0
Timer : 15, programmed : 80000, actual : 0
SimpleTimer : 2, ms : 22269, Dms : 10066

chegewara
Posts: 2364
Joined: Wed Jun 14, 2017 9:00 pm

Re: esp32c3 arduino ide my code is not executed

Postby chegewara » Tue Aug 24, 2021 7:14 am

I cant tell why you are having this issue, i can only say i am using C3 rev2 with UART and C3 rev3 with USB interface and i dont have any problems with flashing them.
Maybe you have to update toolchain/esptool with get.py/get.exe.

khoih-prog
Posts: 53
Joined: Sat Feb 22, 2020 8:16 pm

Re: esp32c3 arduino ide my code is not executed

Postby khoih-prog » Tue Aug 24, 2021 5:17 pm

I'm using Python 2.7.18 (default, Mar 8 2021, 13:02:45) and esptool_py v3.1.0 and the following is the Arduino IDE uploading commands

Code: Select all

Sketch uses 232542 bytes (17%) of program storage space. Maximum is 1310720 bytes.
Global variables use 10436 bytes (3%) of dynamic memory, leaving 317244 bytes for local variables. Maximum is 327680 bytes.
python /home/kh/.arduino15/packages/esp32/tools/esptool_py/3.1.0/esptool.py --chip esp32c3 --port /dev/ttyUSB1 --baud 460800 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xe000 /home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.0-rc2/tools/partitions/boot_app0.bin 0x0 /tmp/arduino_build_607689/ISR_16_Timers_Array_Complex.ino.bootloader.bin 0x10000 /tmp/arduino_build_607689/ISR_16_Timers_Array_Complex.ino.bin 0x8000 /tmp/arduino_build_607689/ISR_16_Timers_Array_Complex.ino.partitions.bin 
esptool.py v3.1
Serial port /dev/ttyUSB1
Connecting....
Chip is unknown ESP32-C3 (revision 3)            <===========  Strange here
Features: Wi-Fi
Crystal is 40MHz
MAC: 7c:df:a1:b6:ab:f0
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 2MB
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00000000 to 0x00004fff...
Flash will be erased from 0x00010000 to 0x00049fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.2 seconds (effective 420.0 kbit/s)...
Hash of data verified.
Compressed 18864 bytes to 11759...
Writing at 0x00000000... (100 %)
Wrote 18864 bytes (11759 compressed) at 0x00000000 in 0.7 seconds (effective 206.1 kbit/s)...
Hash of data verified.
Compressed 234768 bytes to 113604...
Writing at 0x00010000... (14 %)
Writing at 0x0001a7f2... (28 %)
Writing at 0x00021148... (42 %)
Writing at 0x0002913d... (57 %)
Writing at 0x0002fb6b... (71 %)
Writing at 0x00037bc4... (85 %)
Writing at 0x00042f02... (100 %)
Wrote 234768 bytes (113604 compressed) at 0x00010000 in 3.9 seconds (effective 475.5 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 118...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (118 compressed) at 0x00008000 in 0.1 seconds (effective 271.3 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
It's possible some bug of Arduino esp32 core as it's still OK with esp-idf.

I'm afraid this issue is board dependent and will order some different boards to try and see.

The current board is Image
and ordered from https://www.aliexpress.com/item/1005002783695684.html
Attachments
Selection_021.png
Selection_021.png (249.72 KiB) Viewed 2666 times

Who is online

Users browsing this forum: No registered users and 66 guests