diff options
author | danicampora <danicampora@gmail.com> | 2015-03-02 14:11:02 +0100 |
---|---|---|
committer | danicampora <danicampora@gmail.com> | 2015-03-11 16:59:29 +0100 |
commit | 26cbc91373cdfff43317da01e102617ed5885655 (patch) | |
tree | 21291ed917e4452d0712de1d270b1eb2f60a24ff /cc3200/FreeRTOS/Source/tasks.c | |
parent | 02fda44a30d114dbcead18df44c3ec3aefec61cd (diff) | |
download | micropython-26cbc91373cdfff43317da01e102617ed5885655.tar.gz micropython-26cbc91373cdfff43317da01e102617ed5885655.zip |
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/tasks.c')
-rw-r--r-- | cc3200/FreeRTOS/Source/tasks.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cc3200/FreeRTOS/Source/tasks.c b/cc3200/FreeRTOS/Source/tasks.c index 11bbc251c1..ea3ff3c571 100644 --- a/cc3200/FreeRTOS/Source/tasks.c +++ b/cc3200/FreeRTOS/Source/tasks.c @@ -515,6 +515,7 @@ static void prvResetNextTaskUnblockTime( void ); /*-----------------------------------------------------------*/ +__attribute__ ((section (".boot"))) BaseType_t xTaskGenericCreate( TaskFunction_t pxTaskCode, const char * const pcName, const uint16_t usStackDepth, void * const pvParameters, UBaseType_t uxPriority, TaskHandle_t * const pxCreatedTask, StackType_t * const puxStackBuffer, const MemoryRegion_t * const xRegions ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ { BaseType_t xReturn; @@ -1454,6 +1455,7 @@ TCB_t * pxNewTCB; #endif /* ( ( INCLUDE_xTaskResumeFromISR == 1 ) && ( INCLUDE_vTaskSuspend == 1 ) ) */ /*-----------------------------------------------------------*/ +__attribute__ ((section (".boot"))) void vTaskStartScheduler( void ) { BaseType_t xReturn; @@ -2700,7 +2702,7 @@ static portTASK_FUNCTION( prvIdleTask, pvParameters ) } #endif /* configUSE_TICKLESS_IDLE */ /*-----------------------------------------------------------*/ - +__attribute__ ((section (".boot"))) static void prvInitialiseTCBVariables( TCB_t * const pxTCB, const char * const pcName, UBaseType_t uxPriority, const MemoryRegion_t * const xRegions, const uint16_t usStackDepth ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ { UBaseType_t x; @@ -2809,7 +2811,7 @@ UBaseType_t x; #endif /* portUSING_MPU_WRAPPERS */ /*-----------------------------------------------------------*/ - +__attribute__ ((section (".boot"))) static void prvInitialiseTaskLists( void ) { UBaseType_t uxPriority; @@ -2912,7 +2914,7 @@ static void prvAddCurrentTaskToDelayedList( const TickType_t xTimeToWake ) } } /*-----------------------------------------------------------*/ - +__attribute__ ((section (".boot"))) static TCB_t *prvAllocateTCBAndStack( const uint16_t usStackDepth, StackType_t * const puxStackBuffer ) { TCB_t *pxNewTCB; |