Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

vendors/espressif: ESP-IDF v4.4.2 upgrade and added support for ESP32-S3 #3541

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion demos/coreMQTT/mqtt_demo_mutual_auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@
/**
* @brief Transport timeout in milliseconds for transport send and receive.
*/
#define mqttexampleTRANSPORT_SEND_RECV_TIMEOUT_MS ( 500U )
#ifndef mqttexampleTRANSPORT_SEND_RECV_TIMEOUT_MS
#define mqttexampleTRANSPORT_SEND_RECV_TIMEOUT_MS ( 500U )
#endif

/**
* @brief Milliseconds per second.
Expand Down
4 changes: 3 additions & 1 deletion demos/ota/ota_demo_core_http/ota_demo_core_http.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@
/**
* @brief Transport timeout in milliseconds for transport send and receive.
*/
#define otaexampleMQTT_TRANSPORT_SEND_RECV_TIMEOUT_MS ( 500U )
#ifndef otaexampleMQTT_TRANSPORT_SEND_RECV_TIMEOUT_MS
#define otaexampleMQTT_TRANSPORT_SEND_RECV_TIMEOUT_MS ( 500U )
#endif

/**
* @brief The common prefix for all OTA topics.
Expand Down
4 changes: 3 additions & 1 deletion demos/ota/ota_demo_core_mqtt/ota_demo_core_mqtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,9 @@
/**
* @brief Transport timeout in milliseconds for transport send and receive.
*/
#define otaexampleMQTT_TRANSPORT_SEND_RECV_TIMEOUT_MS ( 500U )
#ifndef otaexampleMQTT_TRANSPORT_SEND_RECV_TIMEOUT_MS
#define otaexampleMQTT_TRANSPORT_SEND_RECV_TIMEOUT_MS ( 500U )
#endif

/**
* @brief The delay used in the main OTA Demo task loop to periodically output
Expand Down
2 changes: 1 addition & 1 deletion freertos_kernel
Submodule freertos_kernel updated 677 files
4 changes: 3 additions & 1 deletion tests/integration_test/core_mqtt_system_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,9 @@
/**
* @brief Transport timeout in milliseconds for transport send and receive.
*/
#define TRANSPORT_SEND_RECV_TIMEOUT_MS ( 200U )
#ifndef TRANSPORT_SEND_RECV_TIMEOUT_MS
#define TRANSPORT_SEND_RECV_TIMEOUT_MS ( 200U )
#endif

/**
* @brief Timeout for receiving CONNACK packet in milli seconds.
Expand Down
31 changes: 31 additions & 0 deletions tools/cmake/toolchains/xtensa-esp32s3.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
include("${CMAKE_CURRENT_LIST_DIR}/find_compiler.cmake")

set(CMAKE_SYSTEM_NAME Generic)

# Find GCC for Xtensa-ESP32S2.
afr_find_compiler(AFR_COMPILER_CC xtensa-esp32s3-elf-gcc)
afr_find_compiler(AFR_COMPILER_CXX xtensa-esp32s3-elf-g++)

# Specify the cross compiler.
set(CMAKE_C_COMPILER ${AFR_COMPILER_CC} CACHE FILEPATH "C compiler")
set(CMAKE_CXX_COMPILER ${AFR_COMPILER_CXX} CACHE FILEPATH "C++ compiler")
set(CMAKE_ASM_COMPILER ${AFR_COMPILER_CC} CACHE FILEPATH "ASM compiler")

# Disable compiler checks.
set(CMAKE_C_COMPILER_FORCED TRUE)
set(CMAKE_CXX_COMPILER_FORCED TRUE)

# Add target system root to cmake find path.
get_filename_component(AFR_COMPILER_DIR "${AFR_COMPILER_CC}" DIRECTORY)
get_filename_component(CMAKE_FIND_ROOT_PATH "${AFR_COMPILER_DIR}" DIRECTORY)

# Look for includes and libraries only in the target system prefix.
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)

# Helper variables to abstracts some common compiler flags.
set(AFR_COMPILER_NO_WARNINGS "-w" CACHE INTERNAL "")

# Global compiler flags.
set(CMAKE_C_FLAGS "-mlongcalls" CACHE STRING "C Compiler Base Flags")
set(CMAKE_CXX_FLAGS "-mlongcalls" CACHE STRING "C++ Compiler Base Flags")
33 changes: 11 additions & 22 deletions vendors/espressif/boards/components/freertos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ set(AMAZON_FREERTOS_KERNEL_DIR "${AFR_KERNEL_DIR}")
set(AMAZON_FREERTOS_FREERTOS_PLUS_DIR "${AFR_MODULES_FREERTOS_PLUS_DIR}")
set(AMAZON_FREERTOS_3RDPARTY_DIR "${AFR_3RDPARTY_DIR}")

string(FIND "${AFR_BOARD_NAME}" "esp32s3" SOC_NAME_ESP32S3)
string(FIND "${AFR_BOARD_NAME}" "esp32s2" SOC_NAME_ESP32S2)
string(FIND "${AFR_BOARD_NAME}" "esp32" SOC_NAME_ESP32)

if (NOT(${SOC_NAME_ESP32S2} EQUAL -1))
if(NOT(${SOC_NAME_ESP32S3} EQUAL -1))
set(SOC_NAME "esp32s3")
elseif(NOT(${SOC_NAME_ESP32S2} EQUAL -1))
set(SOC_NAME "esp32s2")
elseif(NOT($SOC_NAME_ESP32) EQUAL -1)
set(SOC_NAME "esp32")
Expand All @@ -22,41 +25,27 @@ if(AFR_ENABLE_TESTS)
list(APPEND include_dirs
"${AMAZON_FREERTOS_FREERTOS_PLUS_DIR}/standard/freertos_plus_posix/include"
"${AMAZON_FREERTOS_3RDPARTY_DIR}/unity/src"
"${CMAKE_CURRENT_LIST_DIR}/../../${SOC_NAME}/aws_tests/config_files"
)
if(SOC_NAME STREQUAL "esp32s2")
list(APPEND include_dirs
"${CMAKE_CURRENT_LIST_DIR}/../../esp32s2/aws_tests/config_files"
)
else()
list(APPEND include_dirs
"${CMAKE_CURRENT_LIST_DIR}/../../esp32/aws_tests/config_files"
)
endif()

else()
if(SOC_NAME STREQUAL "esp32s2")
list(APPEND include_dirs
"${CMAKE_CURRENT_LIST_DIR}/../../esp32s2/aws_demos/config_files"
)
else()
list(APPEND include_dirs
"${CMAKE_CURRENT_LIST_DIR}/../../esp32/aws_demos/config_files"
)
endif()
list(APPEND include_dirs
"${CMAKE_CURRENT_LIST_DIR}/../../${SOC_NAME}/aws_demos/config_files"
)
endif()

# Edit following two lines to set component requirements (see docs)
set(COMPONENT_REQUIRES )
set(COMPONENT_PRIV_REQUIRES )

idf_component_register(SRCS "extra.c"
"task_snapshot.c"
"${AMAZON_FREERTOS_KERNEL_DIR}/portable/ThirdParty/GCC/Xtensa_ESP32/FreeRTOS-openocd.c"
"${AMAZON_FREERTOS_KERNEL_DIR}/portable/ThirdParty/GCC/Xtensa_ESP32/port.c"
"${AMAZON_FREERTOS_KERNEL_DIR}/portable/ThirdParty/GCC/Xtensa_ESP32/port_common.c"
"${AMAZON_FREERTOS_KERNEL_DIR}/portable/ThirdParty/GCC/Xtensa_ESP32/port_systick.c"
"${AMAZON_FREERTOS_KERNEL_DIR}/portable/ThirdParty/GCC/Xtensa_ESP32/portasm.S"
"${AMAZON_FREERTOS_KERNEL_DIR}/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_context.S"
"${AMAZON_FREERTOS_KERNEL_DIR}/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_init.c"
"${AMAZON_FREERTOS_KERNEL_DIR}/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_intr.c"
"${AMAZON_FREERTOS_KERNEL_DIR}/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_intr_asm.S"
"${AMAZON_FREERTOS_KERNEL_DIR}/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_loadstore_handler.S"
"${AMAZON_FREERTOS_KERNEL_DIR}/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_overlay_os_hook.c"
"${AMAZON_FREERTOS_KERNEL_DIR}/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_vector_defaults.S"
Expand Down
Loading