Hi,
I am using FreeRTOS with heap_1.c, and the configuration
configAPPLICATION_ALLOCATED_HEAP = 1 is enabled.
I have allocated the FreeRTOS heap in DTCM RAM from main.c as shown below:
uint8_t ucHeap[ configTOTAL_HEAP_SIZE ]
__attribute__((section(".my_heap")));
In the linker script, I have mapped the heap section to DTCM memory as follows:
/* Heap section */
/* Data tightly coupled memory (D-TCM) */
dtcm (rw) : ORIGIN = 0x20000000, LENGTH = 0x1F000 /* 124KB Data RAM */
stack_dtcm (rw) : ORIGIN = 0x2001F000, LENGTH = 0x1000 /* 4KB */
.bss_tcm_data (NOLOAD) :
{
. = ALIGN(4);
__dtcm_bss_start__ = .;
*(.dtcm_bss*)
. = ALIGN(4);
__dtcm_bss_end__ = .;
*(.my_heap)
} > dtcm
.heap (NOLOAD) :
{
. = ALIGN(4);
_end = .;
end = .;
_heap_start = .;
. += HEAP_SIZE;
_heap_end = .;
} > dtcm
.my_heap (NOLOAD) :
{
*(.my_heap)
} > dtcm
The .map file confirms that the heap memory has been placed in DTCM.
However, after this change, FreeRTOS is not functioning correctly.
Could you please help review this setup and advise on what might be missing or incorrect?