arendst / Tasmota-firmware

Alternative firmware for ESP8266 with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
94 stars 17 forks source link

Flashing the 2MB ESP32-C3 variant #5

Closed pearson closed 2 years ago

pearson commented 2 years ago

I am having trouble flashing Tasmota to the 2MB ESP32-C3 variant. Using the first command syntax shown at this link, 4MB modules flash successfully. However, 2MB modules will not boot correctly after flashing them with the 2MB variant command syntax. The flash process itself seems to go correctly, with all hashes verified, but the terminal will show the following when the module is rebooted:

ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x1 (POWERON),boot:0xf (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DOUT, clock div:2
load:0x3fcd6100,len:0x48
load:0x403ce000,len:0x648
load:0x403d0000,len:0x21ac
entry 0x403ce000

A few notes:

Just to be clear: I'm flashing with the appropriate command syntax for the 2MB module -- the one that uses the partitions_2M.bin file. 😃

Suggestions as to what is wrong would be appreciated!

pearson commented 2 years ago

It seems that the partitions.bin and partitions_2M.bin files are identical.

Decoding the partitions_2M.bin with gen_esp32part.py shows the following:

# ESP-IDF Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0x9000,20K,
otadata,data,ota,0xe000,8K,
app0,app,ota_0,0x10000,1856K,
app1,app,ota_1,0x1e0000,1856K,
spiffs,data,spiffs,0x3b0000,320K,

Obviously two ~2MB partitions can't work for a 2MB device. (I'm surprised the flasher doesn't throw an error here.)

I don't have much experience with ESP32 partition tables, so if someone with experience there knows what the tables should be for the 2M variant, your thoughts would be appreciated! 😃

Jason2866 commented 2 years ago

I removed the outdated not used anymore partition and bootloader files. We provide the Tasmota firmwares as factory files, which have all needed merged in one file. This file just needs to be flashed at address 0x0000. Easiest done with the Webinstaller. The used 2M partition csv file is here. The used [env] is here. We do not provide any helper .bin files anymore (since not needed).

pearson commented 2 years ago

@Jason2866 Thanks for those links!

For the unofficial firmware, is there any Bluetooth support for the 2MB variant of the ESP32-C3? The file you linked in Issue #2 is ~2.5MB in size, so it is (obviously) too large for the 2MB variant.

Jason2866 commented 2 years ago

@pearson It is under 2MB. You have looked at the wrong file. Use https://github.com/Jason2866/Tasmota-specials/blob/firmware/firmware/tasmota32/other/tasmota32c3_2M.factory.bin And no there is no 2MB BLE variant.

pearson commented 2 years ago

@Jason2866 , thanks again for the information.

One quick question about Tasmota, Bluetooth, and ESP32-C3 firmware, if you don't mind... Do you think it's possible to build a firmware that's small enough for OTA on the 2MB ESP32-C3, and that contains MQTT and Bluetooth, and possibly the web server? I've gone through the configs and disabled enough functionality to get a build of ~1.2MB, but that seems to be the limit.

BTW, I'm not asking you to waste your time trying it. I'm just hoping for the quick opinion of someone who knows a lot about Tasmota. 😃

Thanks!

Jason2866 commented 2 years ago

OTA is not possible with 2MB.

ozett commented 2 years ago

is that information correct for flashin the esp32-cam as a C3 Variant? https://templates.blakadder.com/ai-thinker_ESP32-CAM.html (its linked from the tasmota-devices page like this)

or what image must be used for flashing the esp32-cam aithinker-cam with the webinstaller? the devices page has only this link to the blakadder information with the C3 variant...seems wrong ..

edit: sorry, i looked closes and found it for the webinstaller. sorry, (but information on blackadder slightly misleading...)

image

Jason2866 commented 2 years ago

@ozett Seems there is a copy&paste error in the template description. AI-Thinker is a ESP32. Flash the ESP32 Tasmota32 Webcam version!