mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
esp32h2: add esp32h2 build target
Add esp32h2 support in the following components: * Kconfig * components/esptool_py * components/riscv * components/xtensa * tools
This commit is contained in:
parent
68f33b75de
commit
2b9e8fed71
9
Kconfig
9
Kconfig
@ -11,6 +11,7 @@ mainmenu "Espressif IoT Development Framework Configuration"
|
||||
config IDF_ENV_FPGA
|
||||
# This option is for internal use only
|
||||
bool
|
||||
default "y" if IDF_TARGET="esp32h2" # ESP32H2-TODO: IDF-3378
|
||||
option env="IDF_ENV_FPGA"
|
||||
|
||||
config IDF_TARGET_ARCH_RISCV
|
||||
@ -51,6 +52,12 @@ mainmenu "Espressif IoT Development Framework Configuration"
|
||||
select FREERTOS_UNICORE
|
||||
select IDF_TARGET_ARCH_RISCV
|
||||
|
||||
config IDF_TARGET_ESP32H2
|
||||
bool
|
||||
default "y" if IDF_TARGET="esp32h2"
|
||||
select FREERTOS_UNICORE
|
||||
select IDF_TARGET_ARCH_RISCV
|
||||
|
||||
config IDF_TARGET_LINUX
|
||||
bool
|
||||
default "y" if IDF_TARGET="linux"
|
||||
@ -61,6 +68,7 @@ mainmenu "Espressif IoT Development Framework Configuration"
|
||||
default 0x0002 if IDF_TARGET_ESP32S2
|
||||
default 0x0005 if IDF_TARGET_ESP32C3
|
||||
default 0x0009 if IDF_TARGET_ESP32S3
|
||||
default 0x000A if IDF_TARGET_ESP32H2
|
||||
default 0xFFFF
|
||||
|
||||
menu "SDK tool configuration"
|
||||
@ -70,6 +78,7 @@ mainmenu "Espressif IoT Development Framework Configuration"
|
||||
default "xtensa-esp32s2-elf-" if IDF_TARGET_ESP32S2
|
||||
default "xtensa-esp32s3-elf-" if IDF_TARGET_ESP32S3
|
||||
default "riscv32-esp-elf-" if IDF_TARGET_ESP32C3
|
||||
default "riscv32-esp-elf-" if IDF_TARGET_ESP32H2
|
||||
|
||||
help
|
||||
The prefix/path that is used to call the toolchain. The default setting assumes
|
||||
|
@ -56,6 +56,7 @@ menu "Serial flasher config"
|
||||
|
||||
config ESPTOOLPY_NO_STUB
|
||||
bool "Disable download stub"
|
||||
default "y" if IDF_TARGET_ESP32H2 # ESP32H2-TODO: IDF-3378
|
||||
default "n"
|
||||
help
|
||||
The flasher tool sends a precompiled download stub first by default. That stub allows things
|
||||
@ -117,7 +118,7 @@ menu "Serial flasher config"
|
||||
|
||||
choice ESPTOOLPY_FLASHFREQ
|
||||
prompt "Flash SPI speed"
|
||||
default ESPTOOLPY_FLASHFREQ_40M if IDF_TARGET_ESP32
|
||||
default ESPTOOLPY_FLASHFREQ_40M if IDF_TARGET_ESP32 || IDF_TARGET_ESP32H2
|
||||
default ESPTOOLPY_FLASHFREQ_80M
|
||||
help
|
||||
The SPI flash frequency to be used.
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 1c9fe7059738ecd8e2b77c66cf7e2be73e566c16
|
||||
Subproject commit 46ead46242c57a0b0b137976dc55550225faefec
|
@ -1,6 +1,6 @@
|
||||
idf_build_get_property(target IDF_TARGET)
|
||||
|
||||
if(NOT "${target}" STREQUAL "esp32c3")
|
||||
if(NOT "${target}" STREQUAL "esp32c3" AND NOT "${target}" STREQUAL "esp32h2" )
|
||||
return()
|
||||
endif()
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
idf_build_get_property(target IDF_TARGET)
|
||||
|
||||
if("${target}" STREQUAL "esp32c3")
|
||||
if("${target}" STREQUAL "esp32c3" OR "${target}" STREQUAL "esp32h2")
|
||||
return()
|
||||
endif()
|
||||
|
||||
|
@ -11,6 +11,8 @@ function(__add_dfu_targets)
|
||||
set(dfu_pid "6")
|
||||
elseif("${target}" STREQUAL "esp32c3")
|
||||
return()
|
||||
elseif("${target}" STREQUAL "esp32h2")
|
||||
return()
|
||||
elseif("${target}" STREQUAL "linux")
|
||||
return()
|
||||
else()
|
||||
|
9
tools/cmake/toolchain-esp32h2.cmake
Normal file
9
tools/cmake/toolchain-esp32h2.cmake
Normal file
@ -0,0 +1,9 @@
|
||||
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_C_FLAGS "-march=rv32imc" CACHE STRING "C Compiler Base Flags")
|
||||
set(CMAKE_CXX_FLAGS "-march=rv32imc" CACHE STRING "C++ Compiler Base Flags")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-nostartfiles -march=rv32imc --specs=nosys.specs" CACHE STRING "Linker Base Flags")
|
@ -10,6 +10,8 @@ function(__add_uf2_targets)
|
||||
set(uf2_family_id "0xd42ba06c")
|
||||
elseif("${target}" STREQUAL "esp32s3")
|
||||
set(uf2_family_id "0xc47e5767")
|
||||
elseif("${target}" STREQUAL "esp32h2")
|
||||
set(uf2_family_id "0xd42ba06c")
|
||||
elseif("${target}" STREQUAL "linux")
|
||||
return()
|
||||
else()
|
||||
|
@ -295,6 +295,7 @@ class BuildSystem:
|
||||
'ESP32-S2': 'esp32s2',
|
||||
'ESP32-S3': 'esp32s3',
|
||||
'ESP32-C3': 'esp32c3',
|
||||
'ESP32-H2': 'esp32h2',
|
||||
'Linux': 'linux',
|
||||
}
|
||||
|
||||
|
@ -36,6 +36,6 @@ GENERATORS = collections.OrderedDict([
|
||||
})
|
||||
])
|
||||
|
||||
SUPPORTED_TARGETS = ['esp32', 'esp32s2', 'esp32c3', 'esp32s3']
|
||||
SUPPORTED_TARGETS = ['esp32', 'esp32s2', 'esp32c3', 'esp32s3', 'esp32h2']
|
||||
|
||||
PREVIEW_TARGETS = ['linux']
|
||||
|
@ -139,6 +139,17 @@ class MemRegions(object):
|
||||
# Used by cache
|
||||
MemRegDef(0x4037C000, 0x4000, MemRegions.IRAM_ID, 0),
|
||||
])
|
||||
elif target == 'esp32h2':
|
||||
return sorted([
|
||||
MemRegDef(0x3FC80000, 0x60000, MemRegions.DIRAM_ID, 0x40380000),
|
||||
|
||||
# MemRegDef(0x3FC80000, 0x20000, MemRegions.DIRAM_ID, 0x40380000),
|
||||
# MemRegDef(0x3FCA0000, 0x20000, MemRegions.DIRAM_ID, 0x403A0000),
|
||||
# MemRegDef(0x3FCC0000, 0x20000, MemRegions.DIRAM_ID, 0x403C0000),
|
||||
|
||||
# Used by cache
|
||||
MemRegDef(0x4037C000, 0x4000, MemRegions.IRAM_ID, 0),
|
||||
])
|
||||
else:
|
||||
return None
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user