Page 1 of 1
ESP32-S3: variable(flag) in fixed location of ROM and RAM memory
Posted: Tue Nov 01, 2022 7:38 am
by Kumaresan
Hello Team,
How can i add variable(flag) in fixed location of ROM and RAM. Any sample for customized linker and CMake files
Re: ESP32-S3: variable(flag) in fixed location of ROM and RAM memory
Posted: Tue Nov 01, 2022 8:30 am
by ESP_Sprite
Generally you don't want to do that... Can you describe what problem you are trying to solve? It sounds like an XY problem to me and there probably is a better way to solve your actual issue.
Re: ESP32-S3: variable(flag) in fixed location of ROM and RAM memory
Posted: Tue Nov 01, 2022 12:37 pm
by Kumaresan
Example 1:
in our project,
internal flash - 8MB - esp32-s3-Fn8
external flash - 16MB - Winbond.
During every startup around 32kb of content need to copy from external flash to internal flash(so, here need to allocate 32kb memory in internal flash with fixed location)
Example 2:
We need calculate checksum of application content and need to append end of application file at fixed location.
total application memory allocated assume 0xFFFF, so here, need to checksum calculate during build time and checksumvalue append memory at 0xFFFB.
Re: ESP32-S3: variable(flag) in fixed location of ROM and RAM memory
Posted: Tue Nov 01, 2022 11:33 pm
by ESP_Sprite
Ah, gotcha. What you'd use in ESP-IDF is a
partition of 32K to store the application data in. You can then read and write it using the
partition table API, and you can even map the flash (read-only) into memory using
spi_flash_mmap().