Skip to content

cpu/esp32: add support for ESP32-C3 SoC family#17844

Closed
gschorcht wants to merge 83 commits intoRIOT-OS:masterfrom
gschorcht:cpu/esp32/add_esp32c3_cpu
Closed

cpu/esp32: add support for ESP32-C3 SoC family#17844
gschorcht wants to merge 83 commits intoRIOT-OS:masterfrom
gschorcht:cpu/esp32/add_esp32c3_cpu

Conversation

@gschorcht
Copy link
Copy Markdown
Contributor

@gschorcht gschorcht commented Mar 22, 2022

Contribution description

This PR provides the support for the ESP32-C3 SoC family and the ESP32-C3-DevKit board.

For the moment, this PR includes PR #17601, PR #17841 and PR #17842 to be compilable. Once these PRs are merged this PR is rebased. The first additional commit of this PR is d0210be.

Testing procedure

Compilation in CI has to succeed. All peripheral and basis tests have to pass.

Issues/PRs references

Depends on PR #17601
Depends on PR #17841
Depends on PR #17842
Prerequisite for PR #18185

@github-actions github-actions bot added Area: boards Area: Board ports Area: build system Area: Build system Area: cpu Area: CPU/MCU ports Area: doc Area: Documentation Area: drivers Area: Device drivers Area: Kconfig Area: Kconfig integration Area: pkg Area: External package ports Area: sys Area: System Area: tools Area: Supplementary tools Platform: ESP Platform: This PR/issue effects ESP-based platforms labels Mar 22, 2022
@gschorcht gschorcht force-pushed the cpu/esp32/add_esp32c3_cpu branch from 7afb4fd to 34e2297 Compare March 23, 2022 09:31
@gschorcht gschorcht added Type: new feature The issue requests / The PR implemements a new feature for RIOT State: waiting for other PR State: The PR requires another PR to be merged first State: waiting for CI update State: The PR requires an Update to CI to be performed first and removed State: waiting for other PR State: The PR requires another PR to be merged first State: waiting for CI update State: The PR requires an Update to CI to be performed first labels Mar 23, 2022
@gschorcht
Copy link
Copy Markdown
Contributor Author

Let's hope this PR and the master don't diverge so much until these PRs can be merged. Any required rebase after other changes to cpu/esp* will cause extensive conflicts due to the fundamental changes regarding the basic structure of the implementation and how the ESP IDF is used now. Preferably, I wouldn't allow any other changes to cpu/esp* anymore until these PRs are merged.

@gschorcht gschorcht force-pushed the cpu/esp32/add_esp32c3_cpu branch 3 times, most recently from 583a1f5 to 8fd3a52 Compare April 6, 2022 13:47
@gschorcht gschorcht force-pushed the cpu/esp32/add_esp32c3_cpu branch from 8fd3a52 to ab29c6c Compare April 29, 2022 18:01
@gschorcht gschorcht requested a review from MrKevinWeiss as a code owner April 29, 2022 18:01
CPU_CORE = xtensa-lx6
else ifneq (,$(filter esp32c3,$(CPU_FAM)))
CPU_ARCH = riscv_esp32
CPU_CORE = riscv32
Copy link
Copy Markdown
Contributor

@kfessel kfessel Jul 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are allready some riscv32 MCU they use
CPU_CORE := rv32imac (eg.: cpu/gd32v/Makefile.features)
is there a reason to have this riscv32?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, we can't use cpu/riscv_common as is, please see section "Background" in PR #18260 (comment). In short

  • ESP-IDF's vector.S and portasm.S, which we use, use a different context frame structure
  • RISC-V based ESP32x SoCs use a special SoC register INTERRUPT_CORE0_CPU_INT_THRESH_REG to enable/disable interrupts.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok, now I got it. I must have read too superficially. You don't ask why not use cpu/esp_common, but why not use rv32 as CPU_CORE? To be honest, I have to check whether this makes a difference.

@gschorcht
Copy link
Copy Markdown
Contributor Author

All split-offs are merged now.

@gschorcht gschorcht closed this Aug 9, 2022
@gschorcht gschorcht deleted the cpu/esp32/add_esp32c3_cpu branch August 31, 2022 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: boards Area: Board ports Area: build system Area: Build system Area: CI Area: Continuous Integration of RIOT components Area: cpu Area: CPU/MCU ports Area: doc Area: Documentation Area: drivers Area: Device drivers Area: Kconfig Area: Kconfig integration Area: pkg Area: External package ports Area: tests Area: tests and testing framework Area: tools Area: Supplementary tools Platform: ESP Platform: This PR/issue effects ESP-based platforms State: waiting for other PR State: The PR requires another PR to be merged first Type: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants