From 9c834f57d630663ba686f576eb4fd1e67d627fc2 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Mon, 1 Aug 2022 17:51:43 +0200 Subject: [PATCH] cpu/esp32/bootloader: add ESP32-S3 support --- cpu/esp32/bootloader/Makefile | 1 - cpu/esp32/bootloader/sdkconfig.h | 2 + .../bootloader/sdkconfig_default_esp32s3.h | 46 +++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 cpu/esp32/bootloader/sdkconfig_default_esp32s3.h diff --git a/cpu/esp32/bootloader/Makefile b/cpu/esp32/bootloader/Makefile index e45c87c439..ae579e1902 100644 --- a/cpu/esp32/bootloader/Makefile +++ b/cpu/esp32/bootloader/Makefile @@ -228,7 +228,6 @@ LINKFLAGS += \ -Wno-frame-address \ -o $(ESP_SDK_BOOTLOADER_DIR)/bootloader.elf \ -Wl,--cref \ - -Wl,--defsym=IDF_TARGET_ESP32=0 \ -Wl,--gc-sections \ -fno-lto \ -fno-rtti \ diff --git a/cpu/esp32/bootloader/sdkconfig.h b/cpu/esp32/bootloader/sdkconfig.h index f4b35a1805..329f6c6a5a 100644 --- a/cpu/esp32/bootloader/sdkconfig.h +++ b/cpu/esp32/bootloader/sdkconfig.h @@ -35,6 +35,8 @@ #include "sdkconfig_default_esp32.h" #elif defined(CPU_FAM_ESP32C3) #include "sdkconfig_default_esp32c3.h" +#elif defined(CPU_FAM_ESP32S3) +#include "sdkconfig_default_esp32s3.h" #else #error "ESP32x family implementation missing" #endif diff --git a/cpu/esp32/bootloader/sdkconfig_default_esp32s3.h b/cpu/esp32/bootloader/sdkconfig_default_esp32s3.h new file mode 100644 index 0000000000..0d28f02651 --- /dev/null +++ b/cpu/esp32/bootloader/sdkconfig_default_esp32s3.h @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2022 Gunar Schorcht + * + * This file is subject to the terms and conditions of the GNU Lesser + * General Public License v2.1. See the file LICENSE in the top level + * directory for more details. + */ + +/** + * @ingroup cpu_esp32 + * @{ + * + * @file + * @brief Default SDK configuration for the ESP32-S3 SoC bootloader + * + * @author Gunar Schorcht + */ + +#ifndef SDKCONFIG_DEFAULT_ESP32S3_H +#define SDKCONFIG_DEFAULT_ESP32S3_H + +#ifndef DOXYGEN + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ +#define CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ 160 +#endif + +#define CONFIG_ESP32S3_DEBUG_OCDAWARE 1 + +#define CONFIG_BOOTLOADER_OFFSET_IN_FLASH 0x0 +#define CONFIG_EFUSE_MAX_BLK_LEN 256 +#define CONFIG_IDF_FIRMWARE_CHIP_ID 0x0009 + +#define CONFIG_ESP_CONSOLE_SECONDARY_USB_SERIAL_JTAG 1 + +#ifdef __cplusplus +} +#endif + +#endif /* DOXYGEN */ +#endif /* SDKCONFIG_DEFAULT_ESP32S3_H */ +/** @} */