mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-11-05 03:02:36 -05:00
Update ESP32 port to ESP-IDF release v4.2 and add ESP-IDF version check (#231)
* Revert "Reintroduce Espressif's IDF v4.2 changes to ESP32 port (#193)"
This reverts commit 3d4d17178f.
* Update ESP32 port files to work with ESP-IDF v4.2 as well as ESP-IDF v3.3
Add changes required to support ESP32-S2
* portmacro.h: Change return type of vApplicationSleep to void
This fixes build failure when automatic light sleep is enabled
* prevent header checks for files with different licensing
Co-authored-by: David Chalco <david@chalco.io>
This commit is contained in:
parent
341e9f06d0
commit
ef4c305244
33 changed files with 327 additions and 6890 deletions
|
|
@ -70,7 +70,11 @@ static inline bool __attribute__( ( always_inline ) )
|
|||
#ifdef CONFIG_FREERTOS_PORTMUX_DEBUG
|
||||
uint32_t owner = mux->owner;
|
||||
|
||||
#if (ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(4, 2, 0))
|
||||
if( ( owner != portMUX_FREE_VAL ) && ( owner != CORE_ID_PRO ) && ( owner != CORE_ID_APP ) )
|
||||
#else
|
||||
if (owner != portMUX_FREE_VAL && owner != CORE_ID_REGVAL_PRO && owner != CORE_ID_REGVAL_APP)
|
||||
#endif
|
||||
{
|
||||
ets_printf( "ERROR: vPortCPUAcquireMutex: mux %p is uninitialized (0x%X)! Called from %s line %d.\n", mux, owner, fnName, line );
|
||||
mux->owner = portMUX_FREE_VAL;
|
||||
|
|
@ -84,7 +88,11 @@ static inline bool __attribute__( ( always_inline ) )
|
|||
/* Note: coreID is the full 32 bit core ID (CORE_ID_PRO/CORE_ID_APP),
|
||||
* not the 0/1 value returned by xPortGetCoreID()
|
||||
*/
|
||||
#if (ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(4, 2, 0))
|
||||
otherCoreID = CORE_ID_XOR_SWAP ^ coreID;
|
||||
#else
|
||||
otherCoreID = CORE_ID_REGVAL_XOR_SWAP ^ coreID;
|
||||
#endif
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -163,7 +171,11 @@ static inline bool __attribute__( ( always_inline ) )
|
|||
mux->lastLockedLine = line;
|
||||
uint32_t owner = mux->owner;
|
||||
|
||||
#if (ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(4, 2, 0))
|
||||
if( ( owner != portMUX_FREE_VAL ) && ( owner != CORE_ID_PRO ) && ( owner != CORE_ID_APP ) )
|
||||
#else
|
||||
if (owner != portMUX_FREE_VAL && owner != CORE_ID_REGVAL_PRO && owner != CORE_ID_REGVAL_APP)
|
||||
#endif
|
||||
{
|
||||
ets_printf( "ERROR: vPortCPUReleaseMutex: mux %p is invalid (0x%x)!\n", mux, mux->owner );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue