Skip to content

Commit

Permalink
freertos: always inline xPortSetInterruptMaskFromISR and vPortClearIn…
Browse files Browse the repository at this point in the history
…terruptMaskFromISR

These were called from IRAM context where the caller expect them to be inlined
and accessible when cache is disabled. This was not the case when compiled with -O0.

Closes #8301
  • Loading branch information
ESP-Marius committed Mar 3, 2022
1 parent f02c603 commit b30ff28
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ typedef unsigned portBASE_TYPE UBaseType_t;
// Cleaner solution allows nested interrupts disabling and restoring via local registers or stack.
// They can be called from interrupts too.
// WARNING: Only applies to current CPU. See notes above.
static inline unsigned portENTER_CRITICAL_NESTED(void) {
static inline unsigned __attribute__((always_inline)) portENTER_CRITICAL_NESTED(void) {
unsigned state = XTOS_SET_INTLEVEL(XCHAL_EXCM_LEVEL);
portbenchmarkINTERRUPT_DISABLE();
return state;
Expand Down
3 changes: 3 additions & 0 deletions tools/unit-test-app/configs/no_optimization_c3
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CONFIG_IDF_TARGET="esp32c3"
TEST_COMPONENTS=esp_ipc spi_flash
CONFIG_COMPILER_OPTIMIZATION_NONE=y
3 changes: 3 additions & 0 deletions tools/unit-test-app/configs/no_optimization_esp32
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CONFIG_IDF_TARGET="esp32"
TEST_COMPONENTS=esp_ipc spi_flash
CONFIG_COMPILER_OPTIMIZATION_NONE=y

0 comments on commit b30ff28

Please sign in to comment.