forked from espressif/esp-idf
Merge branch 'feature/add_target_esp32h2' into 'master'
ESP32-H2: Introduce new target for ESP32H2 See merge request espressif/esp-idf!21190
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
@@ -0,0 +1,5 @@
|
|||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
0
components/bt/controller/esp32h2/Kconfig.in
Normal file
0
components/bt/controller/esp32h2/Kconfig.in
Normal file
@@ -1,3 +1,8 @@
|
|||||||
|
if(IDF_TARGET STREQUAL "esp32h2")
|
||||||
|
# TODO : IDF-6214
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
idf_build_get_property(target IDF_TARGET)
|
idf_build_get_property(target IDF_TARGET)
|
||||||
|
|
||||||
set(includes "include" "interface" "${target}/include" "deprecated/include")
|
set(includes "include" "interface" "${target}/include" "deprecated/include")
|
||||||
|
0
components/esp_hw_support/port/esp32h2/Kconfig.mac
Normal file
0
components/esp_hw_support/port/esp32h2/Kconfig.mac
Normal file
@@ -1,7 +1,8 @@
|
|||||||
idf_build_get_property(idf_target IDF_TARGET)
|
idf_build_get_property(idf_target IDF_TARGET)
|
||||||
|
|
||||||
if(IDF_TARGET STREQUAL "esp32c6")
|
if(IDF_TARGET STREQUAL "esp32c6" OR IDF_TARGET STREQUAL "esp32h2")
|
||||||
# TODO : IDF-5680
|
# TODO : IDF-5680
|
||||||
|
# TODO : IDF-6337
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
0
components/esp_rom/esp32h2/.gitkeep
Normal file
0
components/esp_rom/esp32h2/.gitkeep
Normal file
0
components/esp_rom/include/esp32h2/.gitkeep
Normal file
0
components/esp_rom/include/esp32h2/.gitkeep
Normal file
5
components/esp_system/ld/esp32h2/memory.ld.in
Normal file
5
components/esp_system/ld/esp32h2/memory.ld.in
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
5
components/esp_system/ld/esp32h2/sections.ld.in
Normal file
5
components/esp_system/ld/esp32h2/sections.ld.in
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
13
components/esp_system/port/soc/esp32h2/CMakeLists.txt
Normal file
13
components/esp_system/port/soc/esp32h2/CMakeLists.txt
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
set(srcs
|
||||||
|
"clk.c"
|
||||||
|
"reset_reason.c"
|
||||||
|
"system_internal.c"
|
||||||
|
"cache_err_int.c"
|
||||||
|
"../../arch/riscv/expression_with_stack.c"
|
||||||
|
"../../arch/riscv/expression_with_stack_asm.S"
|
||||||
|
"../../arch/riscv/panic_arch.c"
|
||||||
|
"../../arch/riscv/debug_stubs.c")
|
||||||
|
|
||||||
|
add_prefix(srcs "${CMAKE_CURRENT_LIST_DIR}/" ${srcs})
|
||||||
|
|
||||||
|
target_sources(${COMPONENT_LIB} PRIVATE ${srcs})
|
27
components/esp_system/port/soc/esp32h2/Kconfig.cpu
Normal file
27
components/esp_system/port/soc/esp32h2/Kconfig.cpu
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
choice ESP_DEFAULT_CPU_FREQ_MHZ
|
||||||
|
prompt "CPU frequency"
|
||||||
|
default ESP_DEFAULT_CPU_FREQ_MHZ_64 if IDF_ENV_FPGA
|
||||||
|
default ESP_DEFAULT_CPU_FREQ_MHZ_96
|
||||||
|
help
|
||||||
|
CPU frequency to be set on application startup.
|
||||||
|
|
||||||
|
config ESP_DEFAULT_CPU_FREQ_MHZ_16
|
||||||
|
bool "16 MHz"
|
||||||
|
depends on IDF_ENV_FPGA #ESP32H2-TODO: IDF-3786
|
||||||
|
config ESP_DEFAULT_CPU_FREQ_MHZ_32
|
||||||
|
bool "32 MHz"
|
||||||
|
depends on IDF_ENV_FPGA #ESP32H2-TODO: IDF-3786
|
||||||
|
config ESP_DEFAULT_CPU_FREQ_MHZ_64
|
||||||
|
bool "64 MHz"
|
||||||
|
depends on IDF_ENV_FPGA #ESP32H2-TODO: IDF-3786
|
||||||
|
config ESP_DEFAULT_CPU_FREQ_MHZ_96
|
||||||
|
bool "96 MHz"
|
||||||
|
depends on !IDF_ENV_FPGA
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
config ESP_DEFAULT_CPU_FREQ_MHZ
|
||||||
|
int
|
||||||
|
default 16 if ESP_DEFAULT_CPU_FREQ_MHZ_16
|
||||||
|
default 32 if ESP_DEFAULT_CPU_FREQ_MHZ_32
|
||||||
|
default 64 if ESP_DEFAULT_CPU_FREQ_MHZ_64
|
||||||
|
default 96 if ESP_DEFAULT_CPU_FREQ_MHZ_96
|
5
components/esp_system/port/soc/esp32h2/cache_err_int.c
Normal file
5
components/esp_system/port/soc/esp32h2/cache_err_int.c
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
5
components/esp_system/port/soc/esp32h2/clk.c
Normal file
5
components/esp_system/port/soc/esp32h2/clk.c
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
5
components/esp_system/port/soc/esp32h2/reset_reason.c
Normal file
5
components/esp_system/port/soc/esp32h2/reset_reason.c
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
5
components/esp_system/port/soc/esp32h2/system_internal.c
Normal file
5
components/esp_system/port/soc/esp32h2/system_internal.c
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
5
components/hal/esp32h2/efuse_hal.c
Normal file
5
components/hal/esp32h2/efuse_hal.c
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
0
components/hal/esp32h2/include/.gitkeep
Normal file
0
components/hal/esp32h2/include/.gitkeep
Normal file
5
components/heap/port/esp32h2/memory_layout.c
Normal file
5
components/heap/port/esp32h2/memory_layout.c
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
0
components/idf_test/include/esp32h2/.gitkeep
Normal file
0
components/idf_test/include/esp32h2/.gitkeep
Normal file
0
components/soc/esp32h2/CMakeLists.txt
Normal file
0
components/soc/esp32h2/CMakeLists.txt
Normal file
5
components/spi_flash/esp32h2/flash_ops_esp32h2.c
Normal file
5
components/spi_flash/esp32h2/flash_ops_esp32h2.c
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
@@ -17,6 +17,8 @@ function(__add_dfu_targets)
|
|||||||
return()
|
return()
|
||||||
elseif("${target}" STREQUAL "esp32c6")
|
elseif("${target}" STREQUAL "esp32c6")
|
||||||
return()
|
return()
|
||||||
|
elseif("${target}" STREQUAL "esp32h2")
|
||||||
|
return()
|
||||||
elseif("${target}" STREQUAL "linux")
|
elseif("${target}" STREQUAL "linux")
|
||||||
return()
|
return()
|
||||||
else()
|
else()
|
||||||
|
18
tools/cmake/toolchain-esp32h2.cmake
Normal file
18
tools/cmake/toolchain-esp32h2.cmake
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
include($ENV{IDF_PATH}/tools/cmake/utilities.cmake)
|
||||||
|
|
||||||
|
set(CMAKE_SYSTEM_NAME Generic)
|
||||||
|
|
||||||
|
set(CMAKE_C_COMPILER riscv32-esp-elf-gcc)
|
||||||
|
set(CMAKE_CXX_COMPILER riscv32-esp-elf-g++)
|
||||||
|
set(CMAKE_ASM_COMPILER riscv32-esp-elf-gcc)
|
||||||
|
set(_CMAKE_TOOLCHAIN_PREFIX riscv32-esp-elf-)
|
||||||
|
|
||||||
|
remove_duplicated_flags("-march=rv32imc ${CMAKE_C_FLAGS}" UNIQ_CMAKE_C_FLAGS)
|
||||||
|
set(CMAKE_C_FLAGS "${UNIQ_CMAKE_C_FLAGS}" CACHE STRING "C Compiler Base Flags" FORCE)
|
||||||
|
remove_duplicated_flags("-march=rv32imc ${CMAKE_CXX_FLAGS}" UNIQ_CMAKE_CXX_FLAGS)
|
||||||
|
set(CMAKE_CXX_FLAGS "${UNIQ_CMAKE_CXX_FLAGS}" CACHE STRING "C++ Compiler Base Flags" FORCE)
|
||||||
|
|
||||||
|
remove_duplicated_flags("-nostartfiles -march=rv32imc --specs=nosys.specs \
|
||||||
|
${CMAKE_EXE_LINKER_FLAGS}"
|
||||||
|
UNIQ_CMAKE_SAFE_EXE_LINKER_FLAGS)
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "${UNIQ_CMAKE_SAFE_EXE_LINKER_FLAGS}" CACHE STRING "Linker Base Flags" FORCE)
|
@@ -33,7 +33,7 @@ if os.name != 'nt':
|
|||||||
URL_TO_DOC = 'https://docs.espressif.com/projects/esp-idf'
|
URL_TO_DOC = 'https://docs.espressif.com/projects/esp-idf'
|
||||||
|
|
||||||
SUPPORTED_TARGETS = ['esp32', 'esp32s2', 'esp32c3', 'esp32s3', 'esp32c2']
|
SUPPORTED_TARGETS = ['esp32', 'esp32s2', 'esp32c3', 'esp32s3', 'esp32c2']
|
||||||
PREVIEW_TARGETS = ['linux', 'esp32h4', 'esp32c6']
|
PREVIEW_TARGETS = ['linux', 'esp32h4', 'esp32c6', 'esp32h2']
|
||||||
|
|
||||||
OPENOCD_TAGET_CONFIG_DEFAULT = '-f interface/ftdi/esp32_devkitj_v1.cfg -f target/{target}.cfg'
|
OPENOCD_TAGET_CONFIG_DEFAULT = '-f interface/ftdi/esp32_devkitj_v1.cfg -f target/{target}.cfg'
|
||||||
OPENOCD_TAGET_CONFIG: Dict[str, str] = {
|
OPENOCD_TAGET_CONFIG: Dict[str, str] = {
|
||||||
|
Reference in New Issue
Block a user