ESP32H2: Introduce new chip target esp32h2, hello_world example supported
This commit is contained in:
@@ -32,10 +32,6 @@ endif()
|
||||
if(NOT BOOTLOADER_BUILD)
|
||||
list(APPEND srcs
|
||||
"rtc_io_hal.c"
|
||||
"spi_hal.c"
|
||||
"spi_hal_iram.c"
|
||||
"spi_slave_hal.c"
|
||||
"spi_slave_hal_iram.c"
|
||||
"timer_hal.c"
|
||||
"timer_hal_iram.c"
|
||||
"gpio_hal.c"
|
||||
@@ -115,6 +111,19 @@ if(NOT BOOTLOADER_BUILD)
|
||||
list(APPEND srcs "${target}/modem_clock_hal.c")
|
||||
endif()
|
||||
|
||||
if(CONFIG_SOC_GPSPI_SUPPORTED)
|
||||
list(APPEND srcs
|
||||
"spi_hal.c"
|
||||
"spi_hal_iram.c"
|
||||
"spi_slave_hal.c"
|
||||
"spi_slave_hal_iram.c")
|
||||
endif()
|
||||
|
||||
if(CONFIG_SOC_SPI_SUPPORT_SLAVE_HD_VER2)
|
||||
list(APPEND srcs "spi_slave_hd_hal.c")
|
||||
endif()
|
||||
|
||||
|
||||
if(${target} STREQUAL "esp32")
|
||||
list(APPEND srcs
|
||||
"sdio_slave_hal.c"
|
||||
@@ -128,7 +137,6 @@ if(NOT BOOTLOADER_BUILD)
|
||||
if(${target} STREQUAL "esp32s2")
|
||||
list(APPEND srcs
|
||||
"spi_flash_hal_gpspi.c"
|
||||
"spi_slave_hd_hal.c"
|
||||
"touch_sensor_hal.c"
|
||||
"usb_hal.c"
|
||||
"usb_phy_hal.c"
|
||||
@@ -144,7 +152,6 @@ if(NOT BOOTLOADER_BUILD)
|
||||
list(APPEND srcs
|
||||
"ds_hal.c"
|
||||
"spi_flash_hal_gpspi.c"
|
||||
"spi_slave_hd_hal.c"
|
||||
"touch_sensor_hal.c"
|
||||
"usb_hal.c"
|
||||
"usb_phy_hal.c"
|
||||
@@ -161,7 +168,6 @@ if(NOT BOOTLOADER_BUILD)
|
||||
list(APPEND srcs
|
||||
"ds_hal.c"
|
||||
"spi_flash_hal_gpspi.c"
|
||||
"spi_slave_hd_hal.c"
|
||||
"xt_wdt_hal.c"
|
||||
"aes_hal.c"
|
||||
"esp32c3/brownout_hal.c"
|
||||
@@ -173,7 +179,6 @@ if(NOT BOOTLOADER_BUILD)
|
||||
list(APPEND srcs
|
||||
"ds_hal.c"
|
||||
"spi_flash_hal_gpspi.c"
|
||||
"spi_slave_hd_hal.c"
|
||||
"aes_hal.c"
|
||||
"esp32h4/brownout_hal.c"
|
||||
"hmac_hal.c"
|
||||
@@ -183,7 +188,6 @@ if(NOT BOOTLOADER_BUILD)
|
||||
if(${target} STREQUAL "esp32c2")
|
||||
list(APPEND srcs
|
||||
"spi_flash_hal_gpspi.c"
|
||||
"spi_slave_hd_hal.c"
|
||||
"esp32c2/brownout_hal.c"
|
||||
"esp32c2/rtc_cntl_hal.c")
|
||||
endif()
|
||||
@@ -191,7 +195,6 @@ if(NOT BOOTLOADER_BUILD)
|
||||
if(${target} STREQUAL "esp32c6")
|
||||
list(APPEND srcs
|
||||
"spi_flash_hal_gpspi.c"
|
||||
"spi_slave_hd_hal.c"
|
||||
"esp32c6/brownout_hal.c"
|
||||
"esp32c6/rtc_cntl_hal.c")
|
||||
|
||||
@@ -202,15 +205,9 @@ if(NOT BOOTLOADER_BUILD)
|
||||
"spi_flash_hal_gpspi.c"
|
||||
)
|
||||
|
||||
# TODO: IDF-5310
|
||||
list(REMOVE_ITEM srcs
|
||||
"adc_oneshot_hal.c"
|
||||
"adc_hal_common.c"
|
||||
"spi_slave_hd_hal.c"
|
||||
"spi_hal.c"
|
||||
"spi_hal_iram.c"
|
||||
"spi_slave_hal.c"
|
||||
"spi_slave_hal_iram.c"
|
||||
"adc_oneshot_hal.c" # TODO: IDF-6214
|
||||
"adc_hal_common.c" # TODO: IDF-6215
|
||||
"esp32h2/brownout_hal.c"
|
||||
"esp32h2/rtc_cntl_hal.c"
|
||||
"timer_hal.c"
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "soc/systimer_struct.h"
|
||||
#include "soc/clk_tree_defs.h"
|
||||
#include "soc/pcr_struct.h"
|
||||
#include "hal/assert.h"
|
||||
|
||||
#define SYSTIMER_LL_COUNTER_CLOCK (0) // Counter used for "wallclock" time
|
||||
@@ -29,6 +31,24 @@ __attribute__((always_inline)) static inline void systimer_ll_enable_clock(systi
|
||||
dev->conf.clk_en = en;
|
||||
}
|
||||
|
||||
// Set clock source: XTAL(default) or RC_FAST
|
||||
static inline void systimer_ll_set_clock_source(soc_periph_systimer_clk_src_t clk_src)
|
||||
{
|
||||
PCR.systimer_func_clk_conf.systimer_func_clk_sel = (clk_src == SYSTIMER_CLK_SRC_RC_FAST) ? 1 : 0;
|
||||
}
|
||||
|
||||
static inline soc_periph_systimer_clk_src_t systimer_ll_get_clock_source(void)
|
||||
{
|
||||
return (PCR.systimer_func_clk_conf.systimer_func_clk_sel == 1) ? SYSTIMER_CLK_SRC_RC_FAST : SYSTIMER_CLK_SRC_XTAL;
|
||||
}
|
||||
|
||||
/********************** ETM *****************************/
|
||||
|
||||
__attribute__((always_inline)) static inline void systimer_ll_enable_etm(systimer_dev_t *dev, bool en)
|
||||
{
|
||||
dev->conf.etm_en = en;
|
||||
}
|
||||
|
||||
/******************* Counter *************************/
|
||||
|
||||
__attribute__((always_inline)) static inline void systimer_ll_enable_counter(systimer_dev_t *dev, uint32_t counter_id, bool en)
|
||||
|
||||
@@ -4,8 +4,9 @@ entries:
|
||||
mmu_hal (noflash)
|
||||
if IDF_TARGET_ESP32 = n:
|
||||
cache_hal (noflash)
|
||||
spi_hal_iram (noflash)
|
||||
spi_slave_hal_iram (noflash)
|
||||
if SOC_GPSPI_SUPPORTED = y:
|
||||
spi_hal_iram (noflash)
|
||||
spi_slave_hal_iram (noflash)
|
||||
if UART_ISR_IN_IRAM = y || ESP_PANIC_HANDLER_IRAM = y:
|
||||
uart_hal_iram (noflash)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user