ESP-IDF : Esp32S3 - How to place constants into partitions
Posted: Tue Jun 20, 2023 12:33 pm
Good afternoon,
I am working on a project using an Esp32s3 chip.
I have defined a "partitions.csv" file with the following partitions :
nvs, data, nvs, 0x9000, 0x4000,
otadata, data, ota, 0xd000, 0x2000,
phy_init, data, phy, 0xf000, 0x1000,
Form, data, , 0x10000, 0x1000,
FormMirror, data, , 0x11000, 0x1000,
storage, data, fat, , 1M,
ota_0, app, ota_0, , 2M,
ota_1, app, ota_1, , 2M,
I have removed the factory partition, so my application is automatically downloaded into ota_0 partition while flashing.
In my program, I would like to define a structure for example :
struct MyStruct
{
uint8_t Var1;
uint8_t Var2;
uint8_t Var3;
}
And I would like to do a : const struct MyStruct structure1; so that the structure 1 is not placed into the ota_0 partition but in
the Form partition (Memory section).
Do you know how to do it please ?
Using other microcontrollers (Renesas), I know that I can do that using memory sections.
Unfortunately, I don't know how to do it with Espressif chips.
Could you please explain me how to do it ?
Best regards,
Thomas TRUILHE
I am working on a project using an Esp32s3 chip.
I have defined a "partitions.csv" file with the following partitions :
nvs, data, nvs, 0x9000, 0x4000,
otadata, data, ota, 0xd000, 0x2000,
phy_init, data, phy, 0xf000, 0x1000,
Form, data, , 0x10000, 0x1000,
FormMirror, data, , 0x11000, 0x1000,
storage, data, fat, , 1M,
ota_0, app, ota_0, , 2M,
ota_1, app, ota_1, , 2M,
I have removed the factory partition, so my application is automatically downloaded into ota_0 partition while flashing.
In my program, I would like to define a structure for example :
struct MyStruct
{
uint8_t Var1;
uint8_t Var2;
uint8_t Var3;
}
And I would like to do a : const struct MyStruct structure1; so that the structure 1 is not placed into the ota_0 partition but in
the Form partition (Memory section).
Do you know how to do it please ?
Using other microcontrollers (Renesas), I know that I can do that using memory sections.
Unfortunately, I don't know how to do it with Espressif chips.
Could you please explain me how to do it ?
Best regards,
Thomas TRUILHE