Page 1 of 1

Changing ESP32 Classic project to ESP32 C3

Posted: Sun Oct 16, 2022 3:18 pm
by renantesch
Hello People!

I'm changing my project that i use the microcontroller ESP32 Classic with 4MB flash, i'm changings this project to ESP32 C3, but i have an problem, in first build i'm not get success, because my project is more larger in ESP32 C3 than in ESP32 Classic.
I'm attaching some prints where i set the comand "idf.py size-components", and some libs is more larger in ESP32 C3!

This is my partition table!

# ESP-IDF Partition Table
# Name, Type, SubType, Offset, Size,
factory, app, factory, 0x10000, 1310K
ota_0, app, ota_0, , 1310K
ota_1, app, ota_1, , 1310K
otadata, data, ota, , 8K,
nvs, data, nvs, , 16K,
phy_init, data, phy, , 4K,

I'm doing something wrong, or is this a normal architectural change effect?
Size-components ESP32 Classic.jpg
Size-components ESP32 Classic.jpg (289.67 KiB) Viewed 1644 times
Size-components ESP32 C3.jpg
Size-components ESP32 C3.jpg (280.54 KiB) Viewed 1644 times

Re: Changing ESP32 Classic project to ESP32 C3

Posted: Mon Oct 17, 2022 12:13 am
by ESP_Sprite
Some differences are indeed to be expected: not only do the chips not have the same CPU core (RiscV vs Xtensa), the peripherals used in them are also different meaning different code paths in the libraries are used.

Re: Changing ESP32 Classic project to ESP32 C3

Posted: Mon Oct 17, 2022 1:24 am
by renantesch
Ok, thanks for response!
Has some help that we use to the resolve this problem?
I'm use diverses components, for example!

HTTP Server, HTTP Client, MQTT, Provisioning AESCrypt etc!

How can I know how each of these components was written?

I'm using IDF version 4.4.1.

Re: Changing ESP32 Classic project to ESP32 C3

Posted: Mon Oct 17, 2022 4:53 am
by ESP_Sprite
How do you mean 'how each of these components was written'? In general, sources of all those components come with ESP-IDF, you can just browse through them if you want.

Re: Changing ESP32 Classic project to ESP32 C3

Posted: Tue Oct 18, 2022 11:13 pm
by renantesch
Yes, yes, but I wanted to understand why the components are bigger, but I'm change my code to running in 4MB in ESP32-C3, i'm not have another option.

Thanks!