Merge branch 'feature/link_freertos_queue_to_iram' into 'release/v3.1'

Link SoftIsrHdl and its sub functions to IRAM

See merge request sdk/ESP8266_RTOS_SDK!815
This commit is contained in:
Dong Heng
2019-03-06 10:36:17 +08:00
6 changed files with 21 additions and 19 deletions

View File

@ -133,6 +133,8 @@ SECTIONS
*libesp8266.a:ets_printf.o(.literal .text .literal.* .text.* .rodata.* .rodata)
#endif
*libheap.a:(.literal .text .literal.* .text.*)
_text_end = ABSOLUTE(.);
_etext = .;
} >iram1_0_seg :iram1_0_phdr

View File

@ -50,7 +50,7 @@ static void task_yield_wrapper(void)
portYIELD();
}
static void task_yield_from_isr_wrapper(void)
static void IRAM_ATTR task_yield_from_isr_wrapper(void)
{
portYIELD();
}
@ -206,7 +206,7 @@ static bool queue_send_wrapper(void *queue, void *item, uint32_t block_time_tick
return ret == pdPASS ? true : false;
}
static bool queue_send_from_isr_wrapper(void *queue, void *item, int *hptw)
static bool IRAM_ATTR queue_send_from_isr_wrapper(void *queue, void *item, int *hptw)
{
signed portBASE_TYPE ret;
@ -272,7 +272,7 @@ static bool timer_delete_wrapper(void *timer, uint32_t ticks)
return xTimerDelete(timer, ticks);
}
static void *malloc_wrapper(uint32_t s, uint32_t cap, const char *file, size_t line)
static void IRAM_ATTR *malloc_wrapper(uint32_t s, uint32_t cap, const char *file, size_t line)
{
uint32_t os_caps;
@ -284,7 +284,7 @@ static void *malloc_wrapper(uint32_t s, uint32_t cap, const char *file, size_t l
return _heap_caps_malloc(s, os_caps, file, line);
}
static void *zalloc_wrapper(uint32_t s, uint32_t cap, const char *file, size_t line)
static void IRAM_ATTR *zalloc_wrapper(uint32_t s, uint32_t cap, const char *file, size_t line)
{
uint32_t os_caps;
@ -296,7 +296,7 @@ static void *zalloc_wrapper(uint32_t s, uint32_t cap, const char *file, size_t l
return _heap_caps_zalloc(s, os_caps, file, line);
}
static void *realloc_wrapper(void *ptr, uint32_t s, uint32_t cap, const char *file, size_t line)
static void IRAM_ATTR *realloc_wrapper(void *ptr, uint32_t s, uint32_t cap, const char *file, size_t line)
{
uint32_t os_caps;
@ -308,7 +308,7 @@ static void *realloc_wrapper(void *ptr, uint32_t s, uint32_t cap, const char *fi
return _heap_caps_realloc(ptr, s, os_caps, file, line);
}
static void *calloc_wrapper(uint32_t cnt, uint32_t s, uint32_t cap, const char *file, size_t line)
static void IRAM_ATTR *calloc_wrapper(uint32_t cnt, uint32_t s, uint32_t cap, const char *file, size_t line)
{
uint32_t os_caps;
@ -320,7 +320,7 @@ static void *calloc_wrapper(uint32_t cnt, uint32_t s, uint32_t cap, const char *
return _heap_caps_calloc(cnt , s, os_caps, file, line);
}
static void free_wrapper(void *ptr, const char *file, size_t line)
static void IRAM_ATTR free_wrapper(void *ptr, const char *file, size_t line)
{
_heap_caps_free(ptr, file, line);
}
@ -342,7 +342,7 @@ void *osi_task_top_sp(void)
return pxCurrentTCB[0];
}
const wifi_osi_funcs_t s_wifi_osi_funcs = {
wifi_osi_funcs_t s_wifi_osi_funcs = {
.version = ESP_WIFI_OS_ADAPTER_VERSION,
.task_create = task_create_wrapper,

View File

@ -71,7 +71,7 @@ void vListInitialiseItem( ListItem_t * const pxItem )
}
/*-----------------------------------------------------------*/
void vListInsertEnd( List_t * const pxList, ListItem_t * const pxNewListItem )
void IRAM_ATTR vListInsertEnd( List_t * const pxList, ListItem_t * const pxNewListItem )
{
ListItem_t * const pxIndex = pxList->pxIndex;
@ -167,7 +167,7 @@ const TickType_t xValueOfInsertion = pxNewListItem->xItemValue;
}
/*-----------------------------------------------------------*/
UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove )
UBaseType_t IRAM_ATTR uxListRemove( ListItem_t * const pxItemToRemove )
{
/* The list item knows which list it is in. Obtain the list from the list
item. */

View File

@ -920,7 +920,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
}
/*-----------------------------------------------------------*/
BaseType_t xQueueGenericSendFromISR( QueueHandle_t xQueue, const void * const pvItemToQueue, BaseType_t * const pxHigherPriorityTaskWoken, const BaseType_t xCopyPosition )
BaseType_t IRAM_ATTR xQueueGenericSendFromISR( QueueHandle_t xQueue, const void * const pvItemToQueue, BaseType_t * const pxHigherPriorityTaskWoken, const BaseType_t xCopyPosition )
{
BaseType_t xReturn;
UBaseType_t uxSavedInterruptStatus;
@ -2037,7 +2037,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
#endif /* configUSE_MUTEXES */
/*-----------------------------------------------------------*/
static BaseType_t prvCopyDataToQueue( Queue_t * const pxQueue, const void *pvItemToQueue, const BaseType_t xPosition )
static BaseType_t IRAM_ATTR prvCopyDataToQueue( Queue_t * const pxQueue, const void *pvItemToQueue, const BaseType_t xPosition )
{
BaseType_t xReturn = pdFALSE;
UBaseType_t uxMessagesWaiting;
@ -2843,7 +2843,7 @@ BaseType_t xReturn;
#if ( configUSE_QUEUE_SETS == 1 )
static BaseType_t prvNotifyQueueSetContainer( const Queue_t * const pxQueue, const BaseType_t xCopyPosition )
static BaseType_t IRAM_ATTR prvNotifyQueueSetContainer( const Queue_t * const pxQueue, const BaseType_t xCopyPosition )
{
Queue_t *pxQueueSetContainer = pxQueue->pxQueueSetContainer;
BaseType_t xReturn = pdFALSE;

View File

@ -2873,7 +2873,7 @@ BaseType_t xSwitchRequired = pdFALSE;
#endif /* configUSE_APPLICATION_TASK_TAG */
/*-----------------------------------------------------------*/
void vTaskSwitchContext( void )
void IRAM_ATTR vTaskSwitchContext( void )
{
if( uxSchedulerSuspended != ( UBaseType_t ) pdFALSE )
{
@ -3006,7 +3006,7 @@ void vTaskPlaceOnUnorderedEventList( List_t * pxEventList, const TickType_t xIte
#endif /* configUSE_TIMERS */
/*-----------------------------------------------------------*/
BaseType_t xTaskRemoveFromEventList( const List_t * const pxEventList )
BaseType_t IRAM_ATTR xTaskRemoveFromEventList( const List_t * const pxEventList )
{
TCB_t *pxUnblockedTCB;
BaseType_t xReturn;
@ -3781,7 +3781,7 @@ static void prvCheckTasksWaitingTermination( void )
#endif /* INCLUDE_vTaskDelete */
/*-----------------------------------------------------------*/
static void prvResetNextTaskUnblockTime( void )
static void IRAM_ATTR prvResetNextTaskUnblockTime( void )
{
TCB_t *pxTCB;
@ -3939,7 +3939,7 @@ TCB_t *pxTCB;
#if ( configUSE_MUTEXES == 1 )
BaseType_t xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder )
BaseType_t IRAM_ATTR xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder )
{
TCB_t * const pxTCB = ( TCB_t * ) pxMutexHolder;
BaseType_t xReturn = pdFALSE;

View File

@ -118,7 +118,7 @@ void IRAM_ATTR HDL_MAC_SIG_IN_LV1_ISR(void)
extern portBASE_TYPE MacIsrSigPostDefHdl(void);
void SoftIsrHdl(void* arg)
void IRAM_ATTR SoftIsrHdl(void* arg)
{
ETS_NMI_LOCK();
@ -130,7 +130,7 @@ void SoftIsrHdl(void* arg)
}
if (xHigherPriorityTaskWoken || (SWReq == 1)) {
_xt_timer_int1();
_xt_timer_int1(); // call vTaskSwitchContext
SWReq = 0;
}