2025-04-30 6:29 AM
I want to take buffer of ~4MB in XSPI_PSRAM_MemoryMapped example of STM32N6. I am just increasing the size BUFFERSIZE to 3MB but there is a error in building. As XSPI RAM is 256Mbit(16MB) I was hoping this buffer size should be valid. But that is not the case. What modifications I need so I can increase buffer size >4MB.
I am attaching my project here. Only modification I made in this project from default code is increase buffer size.
#define BUFFERSIZE 302400
2025-05-02 8:44 AM
Hi,
You must modify the linker script accordingly, from your project I assume you are using IAR IDE then you must omdify the stm32n657xx_axisram2_fsbl.icf file.
In your project the RAM region is from 0x341C0000 to 0x341FFFFF so only 262 143 Bytes.
You should modify the __ICFEDIT_region_RAM_start__ value and __ICFEDIT_region_RAM_end__ value.
For the memory mapping of the various SRAM and their range, please see the user manual (page 166):
0x34100000 AXISRAM2
0x34000000 AXISRAM1
For example to use 1MBytes of SRAM1 you can set
__ICFEDIT_region_RAM_start__ to 0x34000000
__ICFEDIT_region_RAM_end__ to 0x340FFFFF
Best regards,
Nicolas
2025-05-02 9:33 AM
Pointers?
Add the space to the arena from which malloc() draws? Perhaps via _sbrk() on GNU/GCC side