mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 04:43:33 +00:00
freertos: Refactor configuration files
This commit refactors the FreeRTOS configuration headers as follows: - Layout is now similar to FreeRTOSConfig.h found in other upstream demos - Separate out Vanilla FreeRTOS configurations and ESP-IDF additions - Move/remove some irrelevant/unused macros and configurations
This commit is contained in:
@@ -7,32 +7,25 @@
|
||||
#ifndef FREERTOS_CONFIG_RISCV_H
|
||||
#define FREERTOS_CONFIG_RISCV_H
|
||||
|
||||
// This file is included in the common FreeRTOSConfig.h.
|
||||
//RISC-V Archiecture specific configuration. This file is included in the common FreeRTOSConfig.h.
|
||||
|
||||
#include "sdkconfig.h"
|
||||
|
||||
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
|
||||
/* ------------------------------------------------- FreeRTOS Config ---------------------------------------------------
|
||||
* - All Vanilla FreeRTOS configuration goes into this section
|
||||
* ------------------------------------------------------------------------------------------------------------------ */
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
#include "esp_rom_sys.h"
|
||||
#endif // __ASSEMBLER__
|
||||
// ------------------ Scheduler Related --------------------
|
||||
|
||||
/* The maximum interrupt priority from which FreeRTOS.org API functions can
|
||||
be called. Only API functions that end in ...FromISR() can be used within
|
||||
interrupts. */
|
||||
#define configMAX_SYSCALL_INTERRUPT_PRIORITY 0
|
||||
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
|
||||
#define configMAX_API_CALL_INTERRUPT_PRIORITY 0
|
||||
|
||||
/* ------------------------------------------------ ESP-IDF Additions --------------------------------------------------
|
||||
*
|
||||
* ------------------------------------------------------------------------------------------------------------------ */
|
||||
|
||||
#ifndef configISR_STACK_SIZE
|
||||
#define configISR_STACK_SIZE (CONFIG_FREERTOS_ISR_STACKSIZE)
|
||||
#endif
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
#if CONFIG_APPTRACE_SV_ENABLE
|
||||
extern int xPortSwitchFlag;
|
||||
#define os_task_switch_is_pended(_cpu_) (xPortSwitchFlag)
|
||||
#else
|
||||
#define os_task_switch_is_pended(_cpu_) (false)
|
||||
#endif
|
||||
#define configISR_STACK_SIZE (CONFIG_FREERTOS_ISR_STACKSIZE)
|
||||
#endif
|
||||
|
||||
#endif // FREERTOS_CONFIG_RISCV_H
|
||||
|
@@ -498,7 +498,22 @@ bool xPortcheckValidStackMem(const void *ptr);
|
||||
#define portVALID_TCB_MEM(ptr) xPortCheckValidTCBMem(ptr)
|
||||
#define portVALID_STACK_MEM(ptr) xPortcheckValidStackMem(ptr)
|
||||
|
||||
// --------------------- App-Trace -------------------------
|
||||
|
||||
#if CONFIG_APPTRACE_SV_ENABLE
|
||||
extern int xPortSwitchFlag;
|
||||
#define os_task_switch_is_pended(_cpu_) (xPortSwitchFlag)
|
||||
#else
|
||||
#define os_task_switch_is_pended(_cpu_) (false)
|
||||
#endif
|
||||
|
||||
// --------------------- Debugging -------------------------
|
||||
|
||||
#if CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION
|
||||
#define UNTESTED_FUNCTION() { esp_rom_printf("Untested FreeRTOS function %s\r\n", __FUNCTION__); configASSERT(false); } while(0)
|
||||
#else
|
||||
#define UNTESTED_FUNCTION()
|
||||
#endif
|
||||
|
||||
/* ---------------------------------------------------- Deprecate ------------------------------------------------------
|
||||
* - Pull in header containing deprecated macros here
|
||||
|
Reference in New Issue
Block a user