Skip to content

Commit

Permalink
Merge branch 'espressif:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason2866 authored Jun 2, 2024
2 parents be2668c + c7bbfae commit 8d08d75
Show file tree
Hide file tree
Showing 212 changed files with 5,484 additions and 1,185 deletions.
4 changes: 3 additions & 1 deletion .gitlab/ci/host-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -394,5 +394,7 @@ test_idf_pytest_plugin:
reports:
junit: XUNIT_RESULT.xml
script:
- cd tools/ci/idf_pytest
- cd ${IDF_PATH}/tools/ci/dynamic_pipelines/tests/test_report_generator
- python -m unittest test_target_test_report_generator.py
- cd ${IDF_PATH}/tools/ci/idf_pytest
- pytest --junitxml=${CI_PROJECT_DIR}/XUNIT_RESULT.xml
1 change: 1 addition & 0 deletions .gitlab/ci/rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@

.patterns-idf-pytest-plugin: &patterns-idf-pytest-plugin
- "tools/ci/idf_pytest/**/*"
- "tools/ci/dynamic_pipelines/tests/**/*"

##############
# if anchors #
Expand Down
14 changes: 3 additions & 11 deletions components/bootloader/project_include.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ idf_build_get_property(project_dir PROJECT_DIR)
if(CONFIG_SECURE_SIGNED_APPS)
add_custom_target(gen_secure_boot_keys)

if(CONFIG_SECURE_SIGNED_APPS_ECDSA_SCHEME)
set(secure_apps_signing_version "1")
elseif(CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME OR CONFIG_SECURE_SIGNED_APPS_ECDSA_V2_SCHEME)
set(secure_apps_signing_version "2")
endif()

if(CONFIG_SECURE_BOOT_V1_ENABLED)
# Check that the configuration is sane
if((CONFIG_SECURE_BOOTLOADER_REFLASHABLE AND CONFIG_SECURE_BOOTLOADER_ONE_TIME_FLASH) OR
Expand Down Expand Up @@ -68,8 +62,7 @@ if(CONFIG_SECURE_SIGNED_APPS)
if(CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME)
fail_at_build_time(gen_secure_boot_signing_key
"Secure Boot Signing Key ${CONFIG_SECURE_BOOT_SIGNING_KEY} does not exist. Generate using:"
"\tespsecure.py generate_signing_key --version ${secure_apps_signing_version} \
${CONFIG_SECURE_BOOT_SIGNING_KEY}")
"\tidf.py secure-generate-signing-key ${CONFIG_SECURE_BOOT_SIGNING_KEY}")
else()
if(CONFIG_SECURE_BOOT_ECDSA_KEY_LEN_192_BITS)
set(scheme "ecdsa192")
Expand All @@ -78,8 +71,7 @@ if(CONFIG_SECURE_SIGNED_APPS)
endif()
fail_at_build_time(gen_secure_boot_signing_key
"Secure Boot Signing Key ${CONFIG_SECURE_BOOT_SIGNING_KEY} does not exist. Generate using:"
"\tespsecure.py generate_signing_key --version ${secure_apps_signing_version} \
--scheme ${scheme} ${CONFIG_SECURE_BOOT_SIGNING_KEY}")
"\tidf.py secure-generate-signing-key --scheme ${scheme} ${CONFIG_SECURE_BOOT_SIGNING_KEY}")
endif()
else()
add_custom_target(gen_secure_boot_signing_key)
Expand Down Expand Up @@ -124,7 +116,7 @@ idf_build_get_property(sdkconfig SDKCONFIG)
idf_build_get_property(python PYTHON)
idf_build_get_property(extra_cmake_args EXTRA_CMAKE_ARGS)

# We cannot pass lists are a parameter to the external project without modifying the ';' spearator
# We cannot pass lists are a parameter to the external project without modifying the ';' separator
string(REPLACE ";" "|" BOOTLOADER_IGNORE_EXTRA_COMPONENT "${BOOTLOADER_IGNORE_EXTRA_COMPONENT}")

externalproject_add(bootloader
Expand Down
2 changes: 2 additions & 0 deletions components/bootloader_support/src/bootloader_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ void bootloader_init_mem(void)
* So, at boot disabling these filters. They will enable as per the
* use case by TEE initialization code.
*/
#ifdef SOC_APM_CTRL_FILTER_SUPPORTED
apm_hal_apm_ctrl_filter_enable_all(false);
#endif
#endif

#if CONFIG_IDF_TARGET_ESP32C5 // TODO: IDF-8615 Remove the workaround when APM supported on C5!
// disable apm filter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ esp_err_t esp_ble_mesh_deinit(esp_ble_mesh_deinit_param_t *param)
}

/* Take the Semaphore, wait BLE Mesh de-initialization to finish. */
xSemaphoreTake(semaphore, portMAX_DELAY);
__ASSERT(xSemaphoreTake(semaphore, 3000 / portTICK_PERIOD_MS) == pdTRUE, "BLE Mesh deinit take semaphore failed");
/* Don't forget to delete the semaphore at the end. */
vSemaphoreDelete(semaphore);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2017-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2017-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -33,7 +33,10 @@ esp_err_t esp_ble_mesh_init(esp_ble_mesh_prov_t *prov, esp_ble_mesh_comp_t *comp
/**
* @brief De-initialize BLE Mesh module.
*
* @note This function shall be invoked after esp_ble_mesh_client_model_deinit().
* @note
* 1. This function shall be invoked after esp_ble_mesh_client_model_deinit().
* 2. This function is strictly forbidden to run in any BTC Task Context
* (e.g. registered Mesh Event Callback).
*
* @param[in] param: Pointer to the structure of BLE Mesh deinit parameters.
*
Expand Down
31 changes: 28 additions & 3 deletions components/bt/esp_ble_mesh/btc/btc_ble_mesh_prov.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2017-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2017-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -71,6 +71,29 @@
#include "esp_ble_mesh_provisioning_api.h"
#include "esp_ble_mesh_networking_api.h"

#if CONFIG_BLE_MESH_DEINIT
static SemaphoreHandle_t deinit_comp_semaphore;
#endif

static inline void btc_ble_mesh_prov_cb_to_app_reprocess(esp_ble_mesh_prov_cb_event_t event,
esp_ble_mesh_prov_cb_param_t *param)
{
switch (event) {
#if CONFIG_BLE_MESH_DEINIT
case ESP_BLE_MESH_DEINIT_MESH_COMP_EVT:
assert(deinit_comp_semaphore);
/* Give the semaphore when BLE Mesh de-initialization is finished.
* @note: At nimble host, once this lock is released, it will cause
* the btc task to be deleted.
*/
xSemaphoreGive(deinit_comp_semaphore);
break;
#endif
default:
break;
}
}

static inline void btc_ble_mesh_prov_cb_to_app(esp_ble_mesh_prov_cb_event_t event,
esp_ble_mesh_prov_cb_param_t *param)
{
Expand All @@ -79,6 +102,8 @@ static inline void btc_ble_mesh_prov_cb_to_app(esp_ble_mesh_prov_cb_event_t even
if (btc_ble_mesh_cb) {
btc_ble_mesh_cb(event, param);
}

btc_ble_mesh_prov_cb_to_app_reprocess(event, param);
}

static inline void btc_ble_mesh_model_cb_to_app(esp_ble_mesh_model_cb_event_t event,
Expand Down Expand Up @@ -2825,8 +2850,8 @@ void btc_ble_mesh_prov_call_handler(btc_msg_t *msg)
case BTC_BLE_MESH_ACT_DEINIT_MESH:
act = ESP_BLE_MESH_DEINIT_MESH_COMP_EVT;
param.deinit_mesh_comp.err_code = bt_mesh_deinit((struct bt_mesh_deinit_param *)&arg->mesh_deinit.param);
/* Give the semaphore when BLE Mesh de-initialization is finished. */
xSemaphoreGive(arg->mesh_deinit.semaphore);
/* Temporarily save the deinit semaphore and release it after the mesh deinit complete event is handled in the app layer */
deinit_comp_semaphore = arg->mesh_deinit.semaphore;
break;
#endif /* CONFIG_BLE_MESH_DEINIT */
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,6 @@ void btc_l2cap_cb_handler(btc_msg_t *msg)
fixed_queue_enqueue(slot->rx.queue, p_data_buf, FIXED_QUEUE_MAX_TIMEOUT);
} else {
osi_free(p_data_buf);
break;
}
}
osi_mutex_unlock(&l2cap_local_param.l2cap_slot_mutex);
Expand Down Expand Up @@ -945,12 +944,11 @@ void btc_l2cap_cb_handler(btc_msg_t *msg)
break; // to do disconnect
}
memset(p_data_buf, 0, count + sizeof(BT_HDR));
p_data_buf->len = BTA_JvL2capRead(p_data->data_ind.handle, slot->id, p_data_buf->data, count);
p_data_buf->len = BTA_JvL2capRead(p_data->l2c_read.handle, slot->id, p_data_buf->data, count);
if (p_data_buf->len > 0) {
fixed_queue_enqueue(slot->rx.queue, p_data_buf, FIXED_QUEUE_MAX_TIMEOUT);
} else {
osi_free(p_data_buf);
break;
}
}
osi_mutex_unlock(&l2cap_local_param.l2cap_slot_mutex);
Expand Down Expand Up @@ -1060,7 +1058,7 @@ static ssize_t l2cap_vfs_write(int fd, const void * data, size_t size)
if (!enqueue_status) {
BTC_TRACE_DEBUG("%s tx_len:%d, fd:%d\n", __func__, fixed_queue_length(slot->tx.queue), fd);
osi_mutex_unlock(&l2cap_local_param.l2cap_slot_mutex);
//block untill under water level, be closed or time out
//block until under water level, be closed or time out
tx_event_group_val =
xEventGroupWaitBits(l2cap_local_param.tx_event_group, SLOT_WRITE_BIT(serial) | SLOT_CLOSE_BIT(serial), pdTRUE,
pdFALSE, VFS_WRITE_TIMEOUT / portTICK_PERIOD_MS);
Expand Down
2 changes: 1 addition & 1 deletion components/bt/host/nimble/nimble
4 changes: 3 additions & 1 deletion components/console/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ set(srcs "commands.c"

if(${target} STREQUAL "linux")
list(APPEND srcs "esp_console_repl_linux.c")
set(requires "")
else()
list(APPEND srcs "esp_console_repl_chip.c")
set(requires vfs esp_vfs_console)
endif()

set(argtable_srcs argtable3/arg_cmd.c
Expand All @@ -31,7 +33,7 @@ idf_component_register(SRCS ${srcs}
${argtable_srcs}
INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}
PRIV_INCLUDE_DIRS private_include
REQUIRES vfs esp_vfs_console
REQUIRES "${requires}"
PRIV_REQUIRES esp_driver_uart
esp_driver_usb_serial_jtag
)
7 changes: 6 additions & 1 deletion components/efuse/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,13 @@ if(BOOTLOADER_BUILD)
PRIV_INCLUDE_DIRS "${private_include}")
else()
list(APPEND srcs "src/esp_efuse_startup.c")
if(${target} STREQUAL "linux")
set(priv_requires soc spi_flash esp_system esp_partition)
else()
set(priv_requires bootloader_support soc spi_flash esp_system esp_partition esp_app_format)
endif()
idf_component_register(SRCS "${srcs}"
PRIV_REQUIRES bootloader_support soc spi_flash esp_system esp_partition esp_app_format
PRIV_REQUIRES "${priv_requires}"
INCLUDE_DIRS "${include_dirs}"
PRIV_INCLUDE_DIRS "${private_include}")
if(NOT ${target} STREQUAL "linux")
Expand Down
2 changes: 1 addition & 1 deletion components/efuse/test_apps/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ set(src_dirs "." "${dir}")

idf_component_register(SRC_DIRS "${src_dirs}"
PRIV_INCLUDE_DIRS "." "${dir}/include" "../../private_include" "../../${target}/private_include"
PRIV_REQUIRES cmock efuse bootloader_support esp_timer
PRIV_REQUIRES cmock efuse esp_timer
WHOLE_ARCHIVE)
4 changes: 2 additions & 2 deletions components/esp_common/src/esp_err_to_name.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ static const esp_err_msg_t esp_err_msg_table[] = {
ERR_TBL_IT(ESP_ERR_DPP_INVALID_ATTR), /* 12441 0x3099 Encountered invalid DPP Attribute */
# endif
# ifdef ESP_ERR_DPP_AUTH_TIMEOUT
ERR_TBL_IT(ESP_ERR_DPP_AUTH_TIMEOUT), /* 12442 0x309a DPP Auth response was not recieved in time */
ERR_TBL_IT(ESP_ERR_DPP_AUTH_TIMEOUT), /* 12442 0x309a DPP Auth response was not received in time */
# endif
// components/esp_common/include/esp_err.h
# ifdef ESP_ERR_MESH_BASE
Expand Down Expand Up @@ -781,7 +781,7 @@ static const esp_err_msg_t esp_err_msg_table[] = {
ERR_TBL_IT(ESP_ERR_HTTPD_RESP_HDR), /* 45061 0xb005 Response header field larger than supported */
# endif
# ifdef ESP_ERR_HTTPD_RESP_SEND
ERR_TBL_IT(ESP_ERR_HTTPD_RESP_SEND), /* 45062 0xb006 Error occured while sending response packet */
ERR_TBL_IT(ESP_ERR_HTTPD_RESP_SEND), /* 45062 0xb006 Error occurred while sending response packet */
# endif
# ifdef ESP_ERR_HTTPD_ALLOC_MEM
ERR_TBL_IT(ESP_ERR_HTTPD_ALLOC_MEM), /* 45063 0xb007 Failed to dynamically allocate memory
Expand Down
10 changes: 9 additions & 1 deletion components/esp_driver_ana_cmpr/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
idf_build_get_property(target IDF_TARGET)

set(srcs)

# Analog comparator related source files
Expand All @@ -8,8 +10,14 @@ if(CONFIG_SOC_ANA_CMPR_SUPPORTED)
endif()
endif()

if(${target} STREQUAL "linux")
set(priv_requires "")
else()
set(priv_requires esp_pm esp_driver_gpio)
endif()

idf_component_register(SRCS ${srcs}
INCLUDE_DIRS "include"
PRIV_REQUIRES esp_pm esp_driver_gpio
PRIV_REQUIRES "${priv_requires}"
LDFRAGMENTS "linker.lf"
)
26 changes: 21 additions & 5 deletions components/esp_driver_cam/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
set(srcs "esp_cam_ctlr.c")
idf_build_get_property(target IDF_TARGET)

set(include "include" "interface")
set(srcs "esp_cam_ctlr.c" "dvp_share_ctrl.c")

set(includes "include" "interface")

set(requires "esp_driver_isp")

set(priv_requires "esp_driver_gpio")

if(CONFIG_SOC_MIPI_CSI_SUPPORTED)
list(APPEND srcs "csi/src/esp_cam_ctlr_csi.c")
list(APPEND include "csi/include")
list(APPEND includes "csi/include")
endif()

if(CONFIG_SOC_ISP_DVP_SUPPORTED)
list(APPEND srcs "isp_dvp/src/esp_cam_ctlr_isp_dvp.c")
list(APPEND includes "isp_dvp/include")
endif()

if(NOT ${target} STREQUAL "linux")
list(APPEND requires esp_mm)
endif()

idf_component_register(SRCS ${srcs}
INCLUDE_DIRS ${include}
PRIV_REQUIRES esp_mm
INCLUDE_DIRS ${includes}
REQUIRES ${requires}
PRIV_REQUIRES ${priv_requires}
)
20 changes: 18 additions & 2 deletions components/esp_driver_cam/Kconfig
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
menu "ESP Camera Controller Configurations"
menu "ESP-Driver:Camera Controller Configurations"

depends on SOC_MIPI_CSI_SUPPORTED

config MIPI_CSI_ISR_IRAM_SAFE
config CAM_CTLR_MIPI_CSI_ISR_IRAM_SAFE
bool "CSI ISR IRAM-Safe"
default n
select DW_GDMA_ISR_IRAM_SAFE
select DW_GDMA_CTRL_FUNC_IN_IRAM
select DW_GDMA_SETTER_FUNC_IN_IRAM
select DW_GDMA_GETTER_FUNC_IN_IRAM
help
Ensure the CSI driver ISR is IRAM-Safe. When enabled, the ISR handler
will be available when the cache is disabled.

config CAM_CTLR_ISP_DVP_ISR_IRAM_SAFE
bool "ISP_DVP ISR IRAM-Safe"
default n
select DW_GDMA_ISR_IRAM_SAFE
select DW_GDMA_CTRL_FUNC_IN_IRAM
select DW_GDMA_SETTER_FUNC_IN_IRAM
select DW_GDMA_GETTER_FUNC_IN_IRAM
help
Ensure the ISP_DVP driver ISR is IRAM-Safe. When enabled, the ISR handler
will be available when the cache is disabled.

endmenu # ESP Camera Controller Configurations
9 changes: 2 additions & 7 deletions components/esp_driver_cam/csi/include/esp_cam_ctlr_csi.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
extern "C" {
#endif

/**
* @brief ESP CAM controller max timeout value
*/
#define ESP_CAM_CTLR_MAX_DELAY UINT32_MAX

/**
* @brief ESP CAM CSI controller configurations
*/
Expand All @@ -30,8 +25,8 @@ typedef struct {
uint32_t v_res; ///< Input vertical resolution, i.e. the number of lines in a frame
uint8_t data_lane_num; ///< Data lane num
int lane_bit_rate_mbps; ///< Lane bit rate in Mbps
mipi_csi_color_t input_data_color_type; ///< Input color type
mipi_csi_color_t output_data_color_type; ///< Output color type
cam_ctlr_color_t input_data_color_type; ///< Input color type
cam_ctlr_color_t output_data_color_type; ///< Output color type
int queue_items; ///< Queue items
struct {
uint32_t byte_swap_en : 1; ///< Enable byte swap
Expand Down
Loading

0 comments on commit 8d08d75

Please sign in to comment.