Hello Team,
How can i add variable(flag) in fixed location of ROM and RAM. Any sample for customized linker and CMake files
ESP32-S3: variable(flag) in fixed location of ROM and RAM memory
-
- Posts: 9739
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32-S3: variable(flag) in fixed location of ROM and RAM memory
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
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.
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.
-
- Posts: 9739
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32-S3: variable(flag) in fixed location of ROM and RAM memory
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().
Who is online
Users browsing this forum: Corand and 117 guests