Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor ESP32xx folder structure #58454

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Kconfig.zephyr
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ if BUILD_OUTPUT_UF2

config BUILD_OUTPUT_UF2_FAMILY_ID
string "UF2 device family ID"
default "0x1c5f21b0" if SOC_ESP32
default "0x1c5f21b0" if SOC_SERIES_ESP32
default "0x621e937a" if SOC_NRF52833_QIAA
default "0xada52840" if SOC_NRF52840_QIAA
default "0x4fb2d5bd" if SOC_SERIES_IMX_RT
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ config XTENSA_USE_CORE_CRT1
config XTENSA_ENABLE_BACKTRACE
bool "Backtrace on panic exception"
default y
depends on SOC_ESP32 || SOC_FAMILY_INTEL_ADSP
depends on SOC_SERIES_ESP32 || SOC_FAMILY_INTEL_ADSP
mniestroj marked this conversation as resolved.
Show resolved Hide resolved
help
Enable this config option to print backtrace on panic exception

Expand Down
8 changes: 4 additions & 4 deletions arch/xtensa/core/coredump.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ void arch_coredump_info_dump(const z_arch_esf_t *esf)

#if CONFIG_SOC_XTENSA_SAMPLE_CONTROLLER
arch_blk.soc = XTENSA_SOC_SAMPLE_CONTROLLER;
#elif CONFIG_SOC_ESP32
arch_blk.soc = XTENSA_SOC_ESP32;
#elif CONFIG_SOC_FAMILY_INTEL_ADSP
arch_blk.soc = XTENSA_SOC_INTEL_ADSP;
#elif CONFIG_SOC_ESP32S2
#elif CONFIG_SOC_SERIES_ESP32
arch_blk.soc = XTENSA_SOC_ESP32;
#elif CONFIG_SOC_SERIES_ESP32S2
arch_blk.soc = XTENSA_SOC_ESP32S2;
#elif CONFIG_SOC_ESP32S3
#elif CONFIG_SOC_SERIES_ESP32S3
arch_blk.soc = XTENSA_SOC_ESP32S3;
#else
arch_blk.soc = XTENSA_SOC_UNKNOWN;
Expand Down
6 changes: 3 additions & 3 deletions arch/xtensa/core/xtensa_backtrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "xtensa/corebits.h"
#include "xtensa_backtrace.h"
#include <zephyr/sys/printk.h>
#if defined(CONFIG_SOC_ESP32)
#if defined(CONFIG_SOC_SERIES_ESP32)
#include "soc/soc_memory_layout.h"
#elif defined(CONFIG_SOC_FAMILY_INTEL_ADSP)
#include "debug_helpers.h"
Expand All @@ -34,7 +34,7 @@ static inline uint32_t z_xtensa_cpu_process_stack_pc(uint32_t pc)

static inline bool z_xtensa_stack_ptr_is_sane(uint32_t sp)
{
#if defined(CONFIG_SOC_ESP32)
#if defined(CONFIG_SOC_SERIES_ESP32)
return esp_stack_ptr_is_sane(sp);
#elif defined(CONFIG_SOC_FAMILY_INTEL_ADSP)
return intel_adsp_ptr_is_sane(sp);
Expand All @@ -45,7 +45,7 @@ static inline bool z_xtensa_stack_ptr_is_sane(uint32_t sp)

static inline bool z_xtensa_ptr_executable(const void *p)
{
#if defined(CONFIG_SOC_ESP32)
#if defined(CONFIG_SOC_SERIES_ESP32)
return esp_ptr_executable(p);
#elif defined(CONFIG_SOC_FAMILY_INTEL_ADSP)
return intel_adsp_ptr_executable(p);
Expand Down
1 change: 1 addition & 0 deletions boards/deprecated.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ set(nrf9160_innblue21ns_DEPRECATED nrf9160_innblue21_ns)
set(nrf9160_innblue22ns_DEPRECATED nrf9160_innblue22_ns)
set(sparkfun_thing_plus_nrf9160ns_DEPRECATED sparkfun_thing_plus_nrf9160_ns)
set(thingy53_nrf5340_cpuappns_DEPRECATED thingy53_nrf5340_cpuapp_ns)
set(esp32_DEPRECATED esp32_devkitc_wrover)
6 changes: 5 additions & 1 deletion boards/riscv/esp32c3_devkitm/Kconfig.board
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@

config BOARD_ESP32C3_DEVKITM
bool "ESP32C3 Devkit-M Board"
depends on SOC_ESP32C3
depends on SOC_SERIES_ESP32C3
mniestroj marked this conversation as resolved.
Show resolved Hide resolved

choice SOC_PART_NUMBER
default SOC_ESP32C3_MINI_N4
endchoice
2 changes: 1 addition & 1 deletion boards/riscv/esp32c3_devkitm/esp32c3_devkitm.dts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/dts-v1/;

#include <espressif/esp32c3.dtsi>
#include <espressif/esp32c3/esp32c3_mini_n4.dtsi>
#include "esp32c3_devkitm-pinctrl.dtsi"

/ {
Expand Down
6 changes: 3 additions & 3 deletions boards/riscv/esp32c3_devkitm/esp32c3_devkitm_defconfig
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# SPDX-License-Identifier: Apache-2.0

CONFIG_BOARD_ESP32C3_DEVKITM=y
CONFIG_SOC_ESP32C3=y
CONFIG_SOC_SERIES_ESP32C3=y

CONFIG_MAIN_STACK_SIZE=2048
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000

CONFIG_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_CONSOLE=y
CONFIG_GPIO=y
CONFIG_CLOCK_CONTROL=y
2 changes: 1 addition & 1 deletion boards/riscv/icev_wireless/icev_wireless.dts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/dts-v1/;

#include <espressif/esp32c3.dtsi>
#include <espressif/esp32c3/esp32c3_fx4.dtsi>
#include "icev_wireless-pinctrl.dtsi"

/ {
Expand Down
6 changes: 3 additions & 3 deletions boards/riscv/icev_wireless/icev_wireless_defconfig
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# SPDX-License-Identifier: Apache-2.0

CONFIG_BOARD_ICEV_WIRELESS=y
CONFIG_SOC_ESP32C3=y
CONFIG_SOC_SERIES_ESP32C3=y

CONFIG_MAIN_STACK_SIZE=2048
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000

CONFIG_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_CONSOLE=y
CONFIG_GPIO=y
CONFIG_CLOCK_CONTROL=y
6 changes: 5 additions & 1 deletion boards/riscv/stamp_c3/Kconfig.board
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@

config BOARD_STAMP_C3
bool "M5Stack STAMP-C3 Board"
depends on SOC_ESP32C3
depends on SOC_SERIES_ESP32C3

choice SOC_PART_NUMBER
default SOC_ESP32C3_FX4
endchoice
2 changes: 1 addition & 1 deletion boards/riscv/stamp_c3/stamp_c3.dts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/dts-v1/;

#include <espressif/esp32c3.dtsi>
#include <espressif/esp32c3/esp32c3_fx4.dtsi>
#include "stamp_c3-pinctrl.dtsi"

/ {
Expand Down
7 changes: 4 additions & 3 deletions boards/riscv/stamp_c3/stamp_c3_defconfig
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# SPDX-License-Identifier: Apache-2.0

CONFIG_BOARD_STAMP_C3=y
CONFIG_SOC_ESP32C3=y
CONFIG_SOC_SERIES_ESP32C3=y

CONFIG_MAIN_STACK_SIZE=2048

CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=1000000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000

CONFIG_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_CONSOLE=y
CONFIG_GPIO=y
CONFIG_CLOCK_CONTROL=y
6 changes: 5 additions & 1 deletion boards/riscv/xiao_esp32c3/Kconfig.board
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@

config BOARD_XIAO_ESP32C3
bool "XIAO ESP32C3 Board"
depends on SOC_ESP32C3
depends on SOC_SERIES_ESP32C3

choice SOC_PART_NUMBER
default SOC_ESP32C3_FX4
endchoice
2 changes: 1 addition & 1 deletion boards/riscv/xiao_esp32c3/xiao_esp32c3.dts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/dts-v1/;

#include <espressif/esp32c3.dtsi>
#include <espressif/esp32c3/esp32c3_fx4.dtsi>
#include "xiao_esp32c3-pinctrl.dtsi"
#include "seeed_xiao_connector.dtsi"

Expand Down
6 changes: 3 additions & 3 deletions boards/riscv/xiao_esp32c3/xiao_esp32c3_defconfig
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# SPDX-License-Identifier: Apache-2.0

CONFIG_BOARD_XIAO_ESP32C3=y
CONFIG_SOC_ESP32C3=y
CONFIG_SOC_SERIES_ESP32C3=y

CONFIG_MAIN_STACK_SIZE=2048
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000

CONFIG_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_CONSOLE=y
CONFIG_GPIO=y
CONFIG_CLOCK_CONTROL=y
8 changes: 0 additions & 8 deletions boards/xtensa/esp32/Kconfig.board

This file was deleted.

21 changes: 0 additions & 21 deletions boards/xtensa/esp32/esp32_defconfig

This file was deleted.

10 changes: 10 additions & 0 deletions boards/xtensa/esp32_devkitc_wroom/Kconfig.board
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
# SPDX-License-Identifier: Apache-2.0

config BOARD_ESP32_DEVKITC_WROOM
bool "ESP32-DEVKITC-WROOM Development Board"
depends on SOC_SERIES_ESP32

choice SOC_PART_NUMBER
default SOC_ESP32_WROOM_32UE_N4
endchoice
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# SPDX-License-Identifier: Apache-2.0

config BOARD
default "esp32"
depends on BOARD_ESP32
default "esp32_devkitc_wroom"
depends on BOARD_ESP32_DEVKITC_WROOM

config ENTROPY_GENERATOR
default y
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
# SPDX-License-Identifier: Apache-2.0

if(NOT "${OPENOCD}" MATCHES "^${ESPRESSIF_TOOLCHAIN_PATH}/.*")
set(OPENOCD OPENOCD-NOTFOUND)
endif()

find_program(OPENOCD openocd PATHS ${ESPRESSIF_TOOLCHAIN_PATH}/openocd-esp32/bin NO_DEFAULT_PATH)

include(${ZEPHYR_BASE}/boards/common/esp32.board.cmake)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading