diff --git a/components/freertos/freertos/tasks.c b/components/freertos/freertos/tasks.c index 685ea320..70e2eaa7 100644 --- a/components/freertos/freertos/tasks.c +++ b/components/freertos/freertos/tasks.c @@ -2873,7 +2873,7 @@ BaseType_t xSwitchRequired = pdFALSE; #endif /* configUSE_APPLICATION_TASK_TAG */ /*-----------------------------------------------------------*/ -void IRAM_ATTR vTaskSwitchContext( void ) +void vTaskSwitchContext( void ) { if( uxSchedulerSuspended != ( UBaseType_t ) pdFALSE ) { diff --git a/components/freertos/port/esp8266/freertos_hooks.c b/components/freertos/port/esp8266/freertos_hooks.c index 6d133711..4f0b80c0 100644 --- a/components/freertos/port/esp8266/freertos_hooks.c +++ b/components/freertos/port/esp8266/freertos_hooks.c @@ -38,7 +38,7 @@ static portMUX_TYPE hooks_spinlock = portMUX_INITIALIZER_UNLOCKED; static esp_freertos_idle_cb_t idle_cb[portNUM_PROCESSORS][MAX_HOOKS]; static esp_freertos_tick_cb_t tick_cb[portNUM_PROCESSORS][MAX_HOOKS]; -void IRAM_ATTR esp_vApplicationTickHook() +void esp_vApplicationTickHook() { int n; int core = xPortGetCoreID(); diff --git a/components/freertos/port/esp8266/os_cpu_a.S b/components/freertos/port/esp8266/os_cpu_a.S index 70a9a27e..95783769 100644 --- a/components/freertos/port/esp8266/os_cpu_a.S +++ b/components/freertos/port/esp8266/os_cpu_a.S @@ -59,7 +59,8 @@ vPortYield: call0 _xt_int_enter call0 vPortEnterCritical - call0 vTaskSwitchContext + movi a0, vTaskSwitchContext + callx0 a0 call0 vPortExitCritical call0 _xt_int_exit @@ -238,7 +239,8 @@ _xt_timer_int: /* Call the uCOS-II tick handler. */ #ifdef __XTENSA_CALL0_ABI__ /* OSTimeTick() */ - call0 xPortSysTickHandle + movi a0, xPortSysTickHandle + callx0 a0 #else call4 xTaskIncrementTick #endif @@ -279,7 +281,8 @@ _xt_timer_int1: #endif /* Call the uCOS-II tick handler. */ - call0 vTaskSwitchContext + movi a0, vTaskSwitchContext + callx0 a0 #ifdef __XTENSA_CALL0_ABI__ /* Restore a2 and a3. */ diff --git a/components/freertos/port/esp8266/port.c b/components/freertos/port/esp8266/port.c index 5b6069d6..cb0ced32 100644 --- a/components/freertos/port/esp8266/port.c +++ b/components/freertos/port/esp8266/port.c @@ -158,7 +158,7 @@ void IRAM_ATTR HDL_MAC_SIG_IN_LV1_ISR(void) extern portBASE_TYPE MacIsrSigPostDefHdl(void); -void IRAM_ATTR SoftIsrHdl(void* arg) +void SoftIsrHdl(void* arg) { ETS_NMI_LOCK(); @@ -177,7 +177,7 @@ void IRAM_ATTR SoftIsrHdl(void* arg) ETS_NMI_UNLOCK(); } -void IRAM_ATTR xPortSysTickHandle(void) +void xPortSysTickHandle(void) { if (xTaskIncrementTick() != pdFALSE) { vTaskSwitchContext(); @@ -275,7 +275,7 @@ void IRAM_ATTR vPortETSIntrUnlock(void) ETS_INTR_UNLOCK(); } -void IRAM_ATTR PortDisableInt_NoNest(void) +void PortDisableInt_NoNest(void) { if (NMIIrqIsOn == 0) { if (ClosedLv1Isr != 1) { @@ -285,7 +285,7 @@ void IRAM_ATTR PortDisableInt_NoNest(void) } } -void IRAM_ATTR PortEnableInt_NoNest(void) +void PortEnableInt_NoNest(void) { if (NMIIrqIsOn == 0) { if (ClosedLv1Isr == 1) { @@ -324,7 +324,7 @@ void _xt_isr_attach(uint8_t i, _xt_isr func, void* arg) isr[i].arg = arg; } -uint16_t IRAM_ATTR _xt_isr_handler(uint16_t i) +uint16_t _xt_isr_handler(uint16_t i) { uint8_t index; @@ -350,7 +350,7 @@ uint16_t IRAM_ATTR _xt_isr_handler(uint16_t i) return i & ~(1 << index); } -int IRAM_ATTR xPortInIsrContext(void) +int xPortInIsrContext(void) { return _xt_isr_status != 0; } diff --git a/components/freertos/port/esp8266/xtensa_vectors.S b/components/freertos/port/esp8266/xtensa_vectors.S index b7c8ffb8..d738d5af 100644 --- a/components/freertos/port/esp8266/xtensa_vectors.S +++ b/components/freertos/port/esp8266/xtensa_vectors.S @@ -925,7 +925,8 @@ _xt_user_entry1: s32i a1, a0, 0 mov a1, a0 - call0 _xt_isr_handler + movi a0, _xt_isr_handler + callx0 a0 movi a0, _chip_interrupt_tmp l32i a1, a0, 0 diff --git a/components/pthread/src/pthread.c b/components/pthread/src/pthread.c index c9fec073..43348c47 100644 --- a/components/pthread/src/pthread.c +++ b/components/pthread/src/pthread.c @@ -85,7 +85,7 @@ static SLIST_HEAD(esp_thread_list_head, esp_pthread_entry) s_threads_list static pthread_key_t s_pthread_cfg_key; -static int IRAM_ATTR pthread_mutex_lock_internal(esp_pthread_mutex_t *mux, TickType_t tmo); +static int pthread_mutex_lock_internal(esp_pthread_mutex_t *mux, TickType_t tmo); static inline void uxPortCompareSet(volatile uint32_t *addr, uint32_t compare, uint32_t *set) { @@ -503,7 +503,7 @@ int pthread_mutex_destroy(pthread_mutex_t *mutex) return 0; } -static int IRAM_ATTR pthread_mutex_lock_internal(esp_pthread_mutex_t *mux, TickType_t tmo) +static int pthread_mutex_lock_internal(esp_pthread_mutex_t *mux, TickType_t tmo) { if (mux->type == PTHREAD_MUTEX_RECURSIVE) { if (xSemaphoreTakeRecursive(mux->sem, tmo) != pdTRUE) { @@ -530,7 +530,7 @@ static int pthread_mutex_init_if_static(pthread_mutex_t *mutex) { return res; } -int IRAM_ATTR pthread_mutex_lock(pthread_mutex_t *mutex) +int pthread_mutex_lock(pthread_mutex_t *mutex) { if (!mutex) { return EINVAL; @@ -542,7 +542,7 @@ int IRAM_ATTR pthread_mutex_lock(pthread_mutex_t *mutex) return pthread_mutex_lock_internal((esp_pthread_mutex_t *)*mutex, portMAX_DELAY); } -int IRAM_ATTR pthread_mutex_trylock(pthread_mutex_t *mutex) +int pthread_mutex_trylock(pthread_mutex_t *mutex) { if (!mutex) { return EINVAL; @@ -554,7 +554,7 @@ int IRAM_ATTR pthread_mutex_trylock(pthread_mutex_t *mutex) return pthread_mutex_lock_internal((esp_pthread_mutex_t *)*mutex, 0); } -int IRAM_ATTR pthread_mutex_unlock(pthread_mutex_t *mutex) +int pthread_mutex_unlock(pthread_mutex_t *mutex) { esp_pthread_mutex_t *mux;