aboutsummaryrefslogtreecommitdiff
path: root/cc3200/FreeRTOS/Source/portable
diff options
context:
space:
mode:
authordanicampora2015-03-02 14:11:02 +0100
committerdanicampora2015-03-11 16:59:29 +0100
commit26cbc91373cdfff43317da01e102617ed5885655 (patch)
tree21291ed917e4452d0712de1d270b1eb2f60a24ff /cc3200/FreeRTOS/Source/portable
parent02fda44a30d114dbcead18df44c3ec3aefec61cd (diff)
cc3200: Place functions only used while booting in a special section.
Such functions are never used after MicroPython has started, and they remain in RAM wasting space. Now they are placed in a special section named "boot" which sits just before the heap, allowing us to extend the effective heap area up to the new boot section. Right now, this gives us back ~1K, but in the future, more functions might end up in there as well.
Diffstat (limited to 'cc3200/FreeRTOS/Source/portable')
-rw-r--r--cc3200/FreeRTOS/Source/portable/GCC/ARM_CM3/port.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cc3200/FreeRTOS/Source/portable/GCC/ARM_CM3/port.c b/cc3200/FreeRTOS/Source/portable/GCC/ARM_CM3/port.c
index b287f7df9..8c94d7d79 100644
--- a/cc3200/FreeRTOS/Source/portable/GCC/ARM_CM3/port.c
+++ b/cc3200/FreeRTOS/Source/portable/GCC/ARM_CM3/port.c
@@ -202,6 +202,7 @@ static void prvTaskExitError( void );
/*
* See header file for description.
*/
+__attribute__ ((section (".boot")))
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{
/* Simulate the stack frame as it would be created by a context switch
@@ -220,6 +221,7 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px
}
/*-----------------------------------------------------------*/
+__attribute__ ((section (".boot")))
static void prvTaskExitError( void )
{
/* A function that implements a task must not exit or attempt to return to
@@ -254,6 +256,7 @@ void vPortSVCHandler( void )
}
/*-----------------------------------------------------------*/
+__attribute__ ((section (".boot")))
static void prvPortStartFirstTask( void )
{
__asm volatile(
@@ -274,6 +277,7 @@ static void prvPortStartFirstTask( void )
/*
* See header file for description.
*/
+__attribute__ ((section (".boot")))
BaseType_t xPortStartScheduler( void )
{
/* configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to 0.
@@ -643,6 +647,7 @@ void xPortSysTickHandler( void )
* Setup the systick timer to generate the tick interrupts at the required
* frequency.
*/
+__attribute__ ((section (".boot")))
__attribute__(( weak )) void vPortSetupTimerInterrupt( void )
{
/* Calculate the constants required to configure the tick interrupt. */