2025-05-22 10:10 PM - last edited on 2025-05-23 1:42 AM by mƎALLEm
Hello,
We are preparing a system based on STM32H7 series with FreeRTOS, and the memory configuration includes:
We plan to use a large static library (.a) with code and data totaling several megabytes. We have the following questions:
Q1. Handling Large Static Libraries
What is the recommended way to use large .a libraries in STM32 environments?
Are there common approaches to load/execute them from external memory such as SDRAM?
Q2. Dynamic Loading via QSPI Flash and File System
Is it feasible to store the library as a binary file in QSPI Flash (with a file system), then load it into SDRAM at runtime and execute it dynamically ?
We’d appreciate any suggestions, best practices, or examples.
Thanks.
2025-05-28 3:47 AM
Hello @st-kye,
Q1. Your external SDRAM needs to be properly configured using (FSMC) or FMC for efficient SDRAM access.
Also, you can directly execute from SDRAM with careful configuration of memory regions, note that this method can introduce latency
Q2: yes, for loading you'll probably need DMA to transfer the library from QSPI Flash to SDRAM.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.