feat(esp32c5): add esp32c5 mp target

This commit is contained in:
laokaiyao 2024-02-20 14:57:30 +08:00
parent 293f529cd7
commit 1b91e84544
4 changed files with 25 additions and 5 deletions

View File

@ -119,6 +119,7 @@ mainmenu "Espressif IoT Development Framework Configuration"
select FREERTOS_UNICORE
select IDF_TARGET_ARCH_RISCV
# TODO: IDF-9197
choice IDF_TARGET_ESP32C5_VERSION
prompt "ESP32-C5 version"
depends on IDF_TARGET_ESP32C5
@ -132,6 +133,11 @@ mainmenu "Espressif IoT Development Framework Configuration"
bool
prompt "ESP32-C5 beta3"
select ESPTOOLPY_NO_STUB
config IDF_TARGET_ESP32C5_MP_VERSION
bool
prompt "ESP32-C5 MP"
select ESPTOOLPY_NO_STUB
endchoice
config IDF_TARGET_ESP32P4
@ -159,7 +165,8 @@ mainmenu "Espressif IoT Development Framework Configuration"
default 0x000D if IDF_TARGET_ESP32C6
default 0x0010 if IDF_TARGET_ESP32H2
default 0x0012 if IDF_TARGET_ESP32P4
default 0x0011 if IDF_TARGET_ESP32C5
default 0x0011 if IDF_TARGET_ESP32C5 && IDF_TARGET_ESP32C5_BETA3_VERSION # TODO: IDF-9197
default 0x0017 if IDF_TARGET_ESP32C5 && IDF_TARGET_ESP32C5_MP_VERSION # TODO: IDF-9197
default 0xFFFF

View File

@ -8,6 +8,9 @@
#include <inttypes.h>
#include "esp_assert.h"
// TODO: IDF-9197
#include "sdkconfig.h"
/**
* @brief ESP chip ID
*
@ -21,7 +24,11 @@ typedef enum {
ESP_CHIP_ID_ESP32C6 = 0x000D, /*!< chip ID: ESP32-C6 */
ESP_CHIP_ID_ESP32H2 = 0x0010, /*!< chip ID: ESP32-H2 */
ESP_CHIP_ID_ESP32P4 = 0x0012, /*!< chip ID: ESP32-P4 */
ESP_CHIP_ID_ESP32C5 = 0x0011, /*!< chip ID: ESP32-C5 */
#if CONFIG_IDF_TARGET_ESP32C5_BETA3_VERSION // TODO: IDF-9197
ESP_CHIP_ID_ESP32C5 = 0x0011, /*!< chip ID: ESP32-C5 beta3 (MPW)*/
#elif CONFIG_IDF_TARGET_ESP32C5_MP_VERSION
ESP_CHIP_ID_ESP32C5 = 0x0017, /*!< chip ID: ESP32-C5 MP */
#endif
ESP_CHIP_ID_INVALID = 0xFFFF /*!< Invalid chip ID (we defined it to make sure the esp_chip_id_t is 2 bytes size) */
} __attribute__((packed)) esp_chip_id_t;

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -27,7 +27,11 @@ typedef enum {
CHIP_ESP32C2 = 12, //!< ESP32-C2
CHIP_ESP32C6 = 13, //!< ESP32-C6
CHIP_ESP32H2 = 16, //!< ESP32-H2
CHIP_ESP32C5 = 17, //!< ESP32-C5 beta3 TODO: [ESP32-C5] update when MP supported
#if CONFIG_IDF_TARGET_ESP32C5_BETA3_VERSION // TODO: IDF-9197
CHIP_ESP32C5 = 17, //!< ESP32-C5 beta3 (MPW)
#elif CONFIG_IDF_TARGET_ESP32C5_MP_VERSION
CHIP_ESP32C5 = 23, //!< ESP32-C5 MP
#endif
CHIP_ESP32P4 = 18, //!< ESP32-P4
CHIP_POSIX_LINUX = 999, //!< The code is running on POSIX/Linux simulator
} esp_chip_model_t;

View File

@ -8,10 +8,12 @@ idf_build_get_property(idf_path IDF_PATH)
set(chip_model ${target})
# TODO: [ESP32C5] remove this 'if' block when esp32C5 beta3 is no longer supported
# TODO: [ESP32C5] IDF-9197 remove this 'if' block when esp32C5 beta3 is no longer supported
if(target STREQUAL "esp32c5")
if(CONFIG_IDF_TARGET_ESP32C5_BETA3_VERSION)
set(chip_model esp32c5beta3)
elseif(CONFIG_IDF_TARGET_ESP32C5_MP_VERSION)
set(chip_model esp32c5)
endif()
endif()