Skip to content

Commit c9f6d18

Browse files
sylvioalvescarlescufi
authored andcommitted
soc: esp32: add Espressif HAL config
Current Espressif porting requires standard include as part of hal implementation. compiler_flags.cmake checks for variant name to keep those stdinc in build. Instead of using variant name as check, use this new CONFIG to make it clear and to allow having toolchain integrated in zephyr-sdk package. stdinc dependency in hal_espressif will be worked out and removed soon. Signed-off-by: Sylvio Alves <[email protected]>
1 parent a53e3c1 commit c9f6d18

File tree

6 files changed

+11
-1
lines changed

6 files changed

+11
-1
lines changed

cmake/compiler/gcc/compiler_flags.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ set_compiler_property(PROPERTY cstd -std=)
106106

107107
if (NOT CONFIG_NEWLIB_LIBC AND
108108
NOT COMPILER STREQUAL "xcc" AND
109-
NOT ZEPHYR_TOOLCHAIN_VARIANT STREQUAL "espressif" AND
109+
NOT CONFIG_HAS_ESPRESSIF_HAL AND
110110
NOT CONFIG_NATIVE_APPLICATION)
111111
set_compiler_property(PROPERTY nostdinc -nostdinc)
112112
set_compiler_property(APPEND PROPERTY nostdinc_include ${NOSTDINC})

modules/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ source "modules/Kconfig.civetweb"
1313
source "modules/Kconfig.cmsis"
1414
source "modules/Kconfig.cypress"
1515
source "modules/Kconfig.eos_s3"
16+
source "modules/Kconfig.esp32"
1617
source "modules/Kconfig.imx"
1718
source "modules/Kconfig.infineon"
1819
source "modules/Kconfig.libmetal"

modules/Kconfig.esp32

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright (c) 2022 Espressif Systems (Shanghai) Co., Ltd.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config HAS_ESPRESSIF_HAL
5+
bool
6+
depends on SOC_ESP32 || SOC_ESP32S2 || SOC_ESP32C3

soc/riscv/esp32c3/Kconfig.soc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ config SOC_ESP32C3
1010
select CLOCK_CONTROL_ESP32
1111
select PINCTRL
1212
select XIP
13+
select HAS_ESPRESSIF_HAL
1314

1415
if SOC_ESP32C3
1516

soc/xtensa/esp32/Kconfig.soc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ config SOC_ESP32
1111
select ARCH_SUPPORTS_COREDUMP
1212
select PINCTRL
1313
select XIP
14+
select HAS_ESPRESSIF_HAL
1415

1516
if SOC_ESP32
1617

soc/xtensa/esp32s2/Kconfig.soc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ config SOC_ESP32S2
1010
select CLOCK_CONTROL_ESP32
1111
select PINCTRL
1212
select XIP
13+
select HAS_ESPRESSIF_HAL
1314

1415
if SOC_ESP32S2
1516

0 commit comments

Comments
 (0)