I am working on a project that requires at least 500 kB of memory. I have an SDK with this code defining a stack and a bunch, and it works fine.
Stack_Size EQU 0x00004000 AREA STACK, NOINIT, READWRITE, ALIGN=3 Stack_Mem SPACE Stack_Size __initial_sp ; <h> Heap Configuration ; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> ; </h> Heap_Size EQU 0x00200000 AREA HEAP, NOINIT, READWRITE, ALIGN=3 __heap_base Heap_Mem SPACE Heap_Size __heap_limit
However, I am trying to integrate the camera and LCD function in this SDK, and when I do, the highest stack and heap values ββthat at least will trigger the LCD screen are shown below. Any values ββabove this and the LCD screen remain black and the application does not work.
Stack_Size EQU 0x00004000 AREA STACK, NOINIT, READWRITE, ALIGN=3 Stack_Mem SPACE Stack_Size __initial_sp ; <h> Heap Configuration ; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> ; </h> Heap_Size EQU 0x00002B50 AREA HEAP, NOINIT, READWRITE, ALIGN=3 __heap_base Heap_Mem SPACE Heap_Size __heap_limit
I need the stack and heap sizes in the second code example to match the sizes in the first code example so that I don't get stuck in the hard loop of error elimination due to lack of available memory. Why does increasing heap size make my project worse? Sense, why doesnβt it even work when I increase the heap size?
I added a screenshot of my project settings so that you can see the RAM configuration.

The following is the amount of memory. Doesn't that mean I have 2 MB of RAM?
An 8 M x ββ32-bit SDRAM connects to SDRAM Bank1 from the STM32F439NIH6 FMC interface.
1 Mbps x 16 SRAM is connected to bank1 NOR / PSRAM2 of the FMC interface and both 8-bit and 16-bit access are allowed by BLN0 and BLN1 connected to BLE and BHE SRAM respectively.