Skip to content
Draft
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

635 changes: 635 additions & 0 deletions Documentation/platforms/risc-v/esp32c2/index.rst

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions arch/risc-v/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,40 @@ config ARCH_CHIP_ESP32C3_LEGACY
---help---
Espressif ESP32-C3 (RV32IMC). Legacy implementation.

config ARCH_CHIP_ESP32C2
bool "ESP32-C2"
select ARCH_RV32
select ARCH_RV_ISA_M
select ARCH_RV_ISA_C
select ARCH_VECNOTIRQ
select ARCH_HAVE_BOOTLOADER if !ESPRESSIF_SIMPLE_BOOT
select ARCH_HAVE_I2CRESET
select ARCH_HAVE_MPU
select ARCH_HAVE_RESET
select ARCH_HAVE_RNG
select ARCH_HAVE_TICKLESS
select LIBC_ARCH_MEMCPY
select LIBC_ARCH_MEMCHR
select LIBC_ARCH_MEMCMP
select LIBC_ARCH_MEMMOVE
select LIBC_ARCH_MEMSET
select LIBC_ARCH_STRCHR
select LIBC_ARCH_STRCMP
select LIBC_ARCH_STRCPY
select LIBC_ARCH_STRLCPY
select LIBC_ARCH_STRNCPY
select LIBC_ARCH_STRLEN
select LIBC_ARCH_STRNLEN
select ESPRESSIF_SOC_RTC_MEM_SUPPORTED
select ARCH_HAVE_DEBUG
select ARCH_HAVE_RAMFUNCS
select ONESHOT_COUNT if ONESHOT
select ONESHOT_FAST_DIVISION if ONESHOT
select ARCH_MINIMAL_VECTORTABLE
select LIBC_ATOMIC_IRQ
---help---
ESP32-C2 chip (ESP8684) with a single RISC-V IMC core @ 120 MHz

config ARCH_CHIP_ESP32C3
bool "ESP32-C3"
select ARCH_RV32
Expand Down Expand Up @@ -667,6 +701,7 @@ config ARCH_CHIP
default "gd32vw55x" if ARCH_CHIP_GD32VW55X
default "bl602" if ARCH_CHIP_BL602
default "esp32c3-legacy" if ARCH_CHIP_ESP32C3_LEGACY
default "esp32c2" if ARCH_CHIP_ESP32C2
default "esp32c3" if ARCH_CHIP_ESP32C3
default "esp32c6" if ARCH_CHIP_ESP32C6
default "esp32h2" if ARCH_CHIP_ESP32H2
Expand Down Expand Up @@ -915,6 +950,9 @@ endif
if ARCH_CHIP_ESP32C3_LEGACY
source "arch/risc-v/src/esp32c3-legacy/Kconfig"
endif
if ARCH_CHIP_ESP32C2
source "arch/risc-v/src/esp32c2/Kconfig"
endif
if ARCH_CHIP_ESP32C3
source "arch/risc-v/src/esp32c3/Kconfig"
endif
Expand Down
2 changes: 2 additions & 0 deletions arch/risc-v/include/esp32c2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/gpio_sig_map.h
/irq.h
34 changes: 34 additions & 0 deletions arch/risc-v/include/esp32c2/chip.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/****************************************************************************
* arch/risc-v/include/esp32c2/chip.h
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/

#ifndef __ARCH_RISCV_INCLUDE_ESP32C2_CHIP_H
#define __ARCH_RISCV_INCLUDE_ESP32C2_CHIP_H

/****************************************************************************
* Included Files
****************************************************************************/

/****************************************************************************
* Pre-processor Definitions
****************************************************************************/

#endif /* __ARCH_RISCV_INCLUDE_ESP32C2_CHIP_H */
2 changes: 1 addition & 1 deletion arch/risc-v/src/common/espressif/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ if(DEFINED ENV{ESP_HAL_3RDPARTY_VERSION})
CACHE STRING "ESP HAL 3rdparty version")
else()
set(ESP_HAL_3RDPARTY_VERSION
8d0a898910084206721a0892ab093021bca1496a
772738e470cbf64b7c0e481fe17b03c922cc6fb5
CACHE STRING "ESP HAL 3rdparty version")
endif()

Expand Down
Loading
Loading