cpu/esp32: add support for ESP32-S3 SoC family#18185
cpu/esp32: add support for ESP32-S3 SoC family#18185gschorcht wants to merge 100 commits intoRIOT-OS:masterfrom
Conversation
Bootloader makefile that can be used for different ESP32x variants
Updates `cpu/esp_common/periph/flash` for ESP-IDF 4.4. `spi_flash_*` functions for ESP32 are removed since these functions are now used from ESP-IDF. DEBUG output are changed to be platform independent.
The MCU_* conditionals are inverted so that they can be tested for ESP8266. In all other cases the MCU is any ESP32x SoC
Implements an interface for ESP-IDF types and functions that are required by RIOT-OS but cannot be included directly due to name conflicts.
periph/spi implementation can be used for ESP8266 only from now. An implementation using the ESP-IDF spi HAL interface is required for ESP32x SoCs.
The MCU_* conditionals are inverted so that they can be tested for ESP8266. In all other cases the MCU is any ESP32x SoC
d658008 to
c6b890c
Compare
|
@leandrolanzieri Again a question about Kconfig: This PR adds the ESP32-S3-DevKit board for which 10 different versions are available. All have exactly the same peripheral configuration and differ only by the ESP32-S3 module version used, which in turn differs only by the size of the flash and the availability and size of the SPI RAM. However, this only affects whether the IMHO, it makes no sense to define a separate board for each of these board versions and unnecessarily blow up the number of boards that need to be compiled into CI. Therefore, I tried a another approach by defining variable RIOT/boards/esp32s3-devkit/Makefile.features Lines 1 to 28 in c6b890c I tried the same in Kconfig RIOT/boards/esp32s3-devkit/Kconfig Lines 8 to 56 in c6b890c BOARD_VERSION variable in boards/esp32s3-devkit/Makefile.features is set to default if not defined at command line before Kconfig is used.
Do you have any idea how to realize it? |
c6b890c to
2cb9db2
Compare
@gschorcht I'm not sure I understand, what is exactly not working with the approach? |
|
|
||
| choice | ||
| bool "ESP32-S3-DevKit board version" | ||
| depends on TEST_KCONFIG |
There was a problem hiding this comment.
Why does this have to depend on TEST_KCONFIG? When TEST_KCONFIG=n there is no CPU selected, right?
There was a problem hiding this comment.
Because it should only be visible if other ESP32 configurations are visible. Otherwise you would see the board version selection as the only ESP stuff which seems a little bit strange.
There was a problem hiding this comment.
Because it should only be visible if other ESP32 configurations are visible. Otherwise you would see the board version selection as the only ESP stuff which seems a little bit strange.
But TEST_KCONFIG is meant to be a switch to indicate that dependency resolution is handled with Kconfig, thus reserved for MODULE_ Kconfig symbols.
There was a problem hiding this comment.
I see, I didn't know that.
There was a problem hiding this comment.
But
TEST_KCONFIGis meant to be a switch to indicate that dependency resolution is handled with Kconfig
One more question about TEST_KCONFIG that I don't know if I modeled something wrong or if it's intentional:
When I start the graphical interface with
TEST_KCONFIG=1 BOARD=esp32s3-devkit make -C tests/kconfig_features menuconfig
and change the board version from the default BOARD_VERSION_ESP32S3_DEVKITC_1_N8 to BOARD_VERSION_ESP32S3_DEVKITC_1_N8R2, the correct configuration is stored in tests/shell/bin/esp32s3-devkit/generated/out.config when I save it:
CONFIG_BOARD="esp32s3-devkit"
CONFIG_BOARD_VERSION="esp32s3-devkitc-1-n8r2"
CONFIG_CPU="esp32"
CONFIG_CPU_FAM="esp32s3"
CONFIG_CPU_MODEL="esp32s3_wroom_1x_n8r2"
But when I leave the graphical interface, tests/shell/bin/esp32s3-devkit/generated/out.config is overwritten with the defaults:
CONFIG_BOARD="esp32s3-devkit"
CONFIG_BOARD_VERSION="esp32s3-devkitc-1-n8"
CONFIG_CPU="esp32"
CONFIG_CPU_FAM="esp32s3"
CONFIG_CPU_MODEL="esp32s3_wroom_1x_n8"
So I can't compile it with the configuration defined in graphical Kconfig. Is this intentional or am I doing something wrong?
There was a problem hiding this comment.
Hmm I was able to reproduce the behavior. It seems something is up when menuconfig is used with TEST_KCONFIG=1 I will look into it and see if it on master.
There was a problem hiding this comment.
Just to note this behaviour seems to exist only in the esp boards with variants (though testing was not extensive).
We get more than 2 === [ATTENTION] Testing Kconfig dependency modelling === warning which means that there is there are multiple calls, probably due to this, the kconfig settings are being overwritten with defaults.
Further investigation required.
There was a problem hiding this comment.
FYI, this problem exists elsewhere.
There was a problem hiding this comment.
Yup turns out that one must clean before toggling the TEST_KCONFIG... Please try to reproduce the issue after cleaning.
The variable |
Kconfig does not require the features from |
If it is OK to check for |
Hm, when I use ifneq (1,$(TEST_KCONFIG))
# default board version if not defined
ifeq (,$(BOARD_VERSION))
BOARD_VERSION = esp32s3-devkitc-1-n8
endif
ifeq (esp32s3-devkitc-1-n8,$(BOARD_VERSION))
CPU_MODEL = esp32s3_wroom_1x_n8
else ifeq (esp32s3-devkitc-1-n8r2,$(BOARD_VERSION))
CPU_MODEL = esp32s3_wroom_1x_n8r2
else ifeq (esp32s3-devkitc-1-n8r8,$(BOARD_VERSION))
CPU_MODEL = esp32s3_wroom_1x_n8r8
else ifeq (esp32s3-devkitc-1-n16r8v,$(BOARD_VERSION))
CPU_MODEL = esp32s3_wroom_2_n16r8v
else ifeq (esp32s3-devkitc-1-n32r8v,$(BOARD_VERSION))
CPU_MODEL = esp32s3_wroom_2_n32r8v
else ifeq (esp32s3-devkitc-1u-n8,$(BOARD_VERSION))
CPU_MODEL = esp32s3_wroom_1x_n8
else ifeq (esp32s3-devkitc-1u-n8r2,$(BOARD_VERSION))
CPU_MODEL = esp32s3_wroom_1x_n8r2
else ifeq (esp32s3-devkitc-1u-n8r8,$(BOARD_VERSION))
CPU_MODEL = esp32s3_wroom_1x_n8r8
else ifeq (esp32s3-devkitm-1-n8,$(BOARD_VERSION))
CPU_MODEL = esp32s3_mini_1x_n8
else ifeq (esp32s3-devkitm-1u-n8,$(BOARD_VERSION))
CPU_MODEL = esp32s3_mini_1x_n8
else
$(error BOARD_VERSION is unknown)
endif
endif
|
200: riotbuild: add ESP32-S3 toolchain r=benpicco a=gschorcht Now that the 2022.07 release branch is created, it is a good time to go the next migration step and to add Espressif's vendor toolchain for ESP32-S3 to be able to compile RIOT-OS/RIOT#18185 in CI. The toolchain has a size of 292 MByte. Co-authored-by: Gunar Schorcht <[email protected]>
|
Now that all the split-offs have been merged, we can close this PR. |
Contribution description
This PR provides the support for the ESP32-S3 SoC family and the ESP32-S3-DevKit board series.
For the moment, this PR includes PR #17841, PR #17842 and PR #17844 to be compilable. Once these PRs are merged this PR is rebased. The first additional commit of this PR is 904d5c3.
Testing procedure
Compilation in CI has to succeed. All peripheral and basic tests have to pass.
Issues/PRs references
Depends on PR #17841
Depends on PR #17842
Depends on PR #17844
Prerequisite for PR #18235