I am using the SAM4E with FreeRTOS version 9.0.0 as I am using FreeRTOS Labs as I am wanting to use the plus libraries. I am using Heap4.
One of the first tasks I have is to allocate the heap to external SRAM, therefore I initalise the SRAM peripheral and allocate ucHeap before any freertos interaction.
/* Allocating FreeRTOS Heap to external memory*/
ucHeap = (uint8_t*)mh_get_freertos_base();
I can then step through the vTaskStartScheduler, and can see all memory allocation is done in 0x6… which is where my SRAM is. The problem I encounter is that once it enters the timer task it does not switch to the first user defined task at all, however I can see that it has a valid pcb.
To test my code I have even allocated the heap to internal RAM location:
ucHeap = array;
And this works, my user defined task is executed. I have further tested my SRAM by writing and reading back the correct data.
Am I missing another requirement to be able to put the FreeRTOS Heap on external memory? Is there anything else I could do to get any more clues?
I would appreciate any help,