} > m_interrupts .flashconfig : { . = ALIGN(4); KEEP(*(.FlashConfig)) /* Flash Configuration Field (FCF) */ . = ALIGN(4); } > mflash_config privilegedfunctions : { . = ALIGN(4); *(privilegedfunctions) . = ALIGN(4);
/* Non privileged code is after _Privileged_Functions_Region_Size. */
__privileged_functions_actual_end__ = .;
. = _Privileged_Functions_Region_Size;
} > m_text
...
.interruptsram :
{
. = ALIGN(4);
VECTOR_RAM = .;
interrupts_ram_start = .; /* Create a global symbol at data start */
*(.minterruptsram) /* This is a user defined section */
. += MVECTORRAMSIZE;
. = ALIGN(4);
interruptsramend = .; /* Define a global symbol at data end */
} > m_data
VECTOR_RAM = DEFINED(ramvectortable) ? __VECTOR_RAM : ORIGIN(minterrupts);
RAM_VECTOR_TABLE_SIZE_BYTES = DEFINED(ramvectortable) ? (interruptsram_end__ – interrupts_ram_start) : 0x0;
privilegeddata :
{
*(privilegeddata)
/* Non kernel data is kept out of the first PrivilegedDataRegionSize
bytes of SRAM. */
privileged_data_actual_end = .;
. = _Privileged_Data_Region_Size;
} > m_data
.data : AT(__DATA_ROM)
{
…
~~~
And here the task set up in freertos_hello.c:
~~~
static void hello_task(void *pvParameters);
…
/* GCC specifics. */
define mainALIGN_TO( x ) attribute((aligned(x)))
/* Task priorities. */define hellotaskPRIORITY ((configMAX_PRIORITIES – 1))
define mainHELLOTASKSTACKSIZEWORDS 128
define mainHELLOTASKSTACKALIGNMENT ( mainHELLOTASKSTACKSIZEWORDS * sizeof( portSTACKTYPE ) )
define mainMPUDEBUGUART_SIZE (0x80)
define mainMPUDEBUGUARTBASEADDR ((uint32t *) BOARDDEBUGUARTBASEADDR)
static portSTACKTYPE xHelloTaskStack[ mainHELLOTASKSTACKSIZEWORDS ] mainALIGNTO( mainHELLOTASKSTACK_ALIGNMENT ); static const TaskParameterst xHelloTaskParameters = { hellotask, “Hello”, mainHELLOTASKSTACKSIZEWORDS, NULL, hellotaskPRIORITY, xHelloTaskStack, { { mainMPUDEBUGUARTBASEADDR, mainMPUDEBUGUARTSIZE, portMPUREGIONREADWRITE}, { 0x00, 0x00, 0x00 }, { 0x00, 0x00, 0x00 } }
};
…
int main(void)
{
/* Init board hardware. */
BOARD_InitPins();
BOARD_BootClockRUN();
BOARD_InitDebugConsole();
xTaskCreateRestricted( &xHelloTaskParameters, NULL);
vTaskStartScheduler();
for (;;)
;
}
/*!
* @brief Task responsible for printing of “Hello world.” message.
*/
static void hello_task(void *pvParameters)
{
for (;;)
{
GETCHAR();
PRINTF(“Hello world.rn”);
vTaskSuspend(NULL);
}
}
~~~