Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
4 changes: 2 additions & 2 deletions .github/workflows/bsp_buildings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ jobs:
- name: Install riscv32-esp-elf ToolChains
if: ${{ matrix.legs.RTT_TOOL_CHAIN == 'sourcery-riscv32-esp32' && success() }}
run: |
wget -q https://github.com/espressif/crosstool-NG/releases/download/esp-2022r1-RC1/riscv32-esp-elf-gcc11_2_0-esp-2022r1-RC1-linux-amd64.tar.xz
sudo tar xf riscv32-esp-elf-gcc11_2_0-esp-2022r1-RC1-linux-amd64.tar.xz -C /opt
wget -q https://github.com/espressif/crosstool-NG/releases/download/esp-15.2.0_20251204/riscv32-esp-elf-15.2.0_20251204-x86_64-linux-gnu.tar.xz
sudo tar xf riscv32-esp-elf-15.2.0_20251204-x86_64-linux-gnu.tar.xz -C /opt
/opt/riscv32-esp-elf/bin/riscv32-esp-elf-gcc --version
pip3 install esptool
echo "RTT_EXEC_PATH=/opt/riscv32-esp-elf/bin" >> $GITHUB_ENV
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/manual_bsp_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ jobs:
- name: Install riscv32-esp-elf ToolChains
if: ${{ github.event.inputs.bsp_tool_chain == 'sourcery-riscv32-esp32' && success() }}
run: |
wget -q https://github.com/espressif/crosstool-NG/releases/download/esp-2022r1-RC1/riscv32-esp-elf-gcc11_2_0-esp-2022r1-RC1-linux-amd64.tar.xz
sudo tar xf riscv32-esp-elf-gcc11_2_0-esp-2022r1-RC1-linux-amd64.tar.xz -C /opt
wget -q https://github.com/espressif/crosstool-NG/releases/download/esp-15.2.0_20251204/riscv32-esp-elf-15.2.0_20251204-x86_64-linux-gnu.tar.xz
sudo tar xf riscv32-esp-elf-15.2.0_20251204-x86_64-linux-gnu.tar.xz -C /opt
/opt/riscv32-esp-elf/bin/riscv32-esp-elf-gcc --version
pip3 install esptool
echo "RTT_EXEC_PATH=/opt/riscv32-esp-elf/bin" >> $GITHUB_ENV
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/manual_trigger_scons_except_STM32_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,8 @@ jobs:
- name: Install riscv32-esp-elf ToolChains
if: ${{ matrix.legs.RTT_TOOL_CHAIN == 'sourcery-riscv32-esp32' && success() }}
run: |
wget -q https://github.com/espressif/crosstool-NG/releases/download/esp-2022r1-RC1/riscv32-esp-elf-gcc11_2_0-esp-2022r1-RC1-linux-amd64.tar.xz
sudo tar xf riscv32-esp-elf-gcc11_2_0-esp-2022r1-RC1-linux-amd64.tar.xz -C /opt
wget -q https://github.com/espressif/crosstool-NG/releases/download/esp-15.2.0_20251204/riscv32-esp-elf-15.2.0_20251204-x86_64-linux-gnu.tar.xz
sudo tar xf riscv32-esp-elf-15.2.0_20251204-x86_64-linux-gnu.tar.xz -C /opt
/opt/riscv32-esp-elf/bin/riscv32-esp-elf-gcc --version
pip3 install esptool
echo "RTT_EXEC_PATH=/opt/riscv32-esp-elf/bin" >> $GITHUB_ENV
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/manual_trigger_update_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ jobs:
- name: Install riscv32-esp-elf ToolChains
if: ${{ github.event.inputs.bsp_tool_chain == 'sourcery-riscv32-esp32' && success() }}
run: |
wget -q https://github.com/espressif/crosstool-NG/releases/download/esp-2022r1-RC1/riscv32-esp-elf-gcc11_2_0-esp-2022r1-RC1-linux-amd64.tar.xz
sudo tar xf riscv32-esp-elf-gcc11_2_0-esp-2022r1-RC1-linux-amd64.tar.xz -C /opt
wget -q https://github.com/espressif/crosstool-NG/releases/download/esp-15.2.0_20251204/riscv32-esp-elf-15.2.0_20251204-x86_64-linux-gnu.tar.xz
sudo tar xf riscv32-esp-elf-15.2.0_20251204-x86_64-linux-gnu.tar.xz -C /opt
/opt/riscv32-esp-elf/bin/riscv32-esp-elf-gcc --version
pip3 install esptool
echo "RTT_EXEC_PATH=/opt/riscv32-esp-elf/bin" >> $GITHUB_ENV
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/membrowse-onboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ jobs:
echo "TOOLCHAIN_PATH=/opt/Xuantie-900-gcc-elf-newlib-x86_64-V3.2.0/bin" >> $GITHUB_ENV
;;
riscv32-esp-elf)
wget -q https://github.com/espressif/crosstool-NG/releases/download/esp-2022r1-RC1/riscv32-esp-elf-gcc11_2_0-esp-2022r1-RC1-linux-amd64.tar.xz
sudo tar xf riscv32-esp-elf-gcc11_2_0-esp-2022r1-RC1-linux-amd64.tar.xz -C /opt
wget -q https://github.com/espressif/crosstool-NG/releases/download/esp-15.2.0_20251204/riscv32-esp-elf-15.2.0_20251204-x86_64-linux-gnu.tar.xz
sudo tar xf riscv32-esp-elf-15.2.0_20251204-x86_64-linux-gnu.tar.xz -C /opt
pip3 install --user esptool
echo "TOOLCHAIN_PATH=/opt/riscv32-esp-elf/bin" >> $GITHUB_ENV
;;
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/membrowse-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ jobs:
echo "TOOLCHAIN_PATH=/opt/Xuantie-900-gcc-elf-newlib-x86_64-V3.2.0/bin" >> $GITHUB_ENV
;;
riscv32-esp-elf)
wget -q https://github.com/espressif/crosstool-NG/releases/download/esp-2022r1-RC1/riscv32-esp-elf-gcc11_2_0-esp-2022r1-RC1-linux-amd64.tar.xz
sudo tar xf riscv32-esp-elf-gcc11_2_0-esp-2022r1-RC1-linux-amd64.tar.xz -C /opt
wget -q https://github.com/espressif/crosstool-NG/releases/download/esp-15.2.0_20251204/riscv32-esp-elf-15.2.0_20251204-x86_64-linux-gnu.tar.xz
sudo tar xf riscv32-esp-elf-15.2.0_20251204-x86_64-linux-gnu.tar.xz -C /opt
echo "TOOLCHAIN_PATH=/opt/riscv32-esp-elf/bin" >> $GITHUB_ENV
;;
riscv64-linux-musl-k230)
Expand Down
8 changes: 8 additions & 0 deletions bsp/ESP/.clang-format-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# clang-format ignore file
/ESP32_C3/idf_port/include/freertos/portmacro.h
/ESP32_C3/idf_port/src/port.c
/ESP32_C6/idf_port/include/freertos/portmacro.h
/ESP32_C6/libraries/drivers/sdkconfig.h
/ESP32_C6/libraries/drivers/sdkconfig_c6.h
/libraries/drivers/sdkconfig.h
/libraries/drivers/sdkconfig_c6.h
6 changes: 3 additions & 3 deletions bsp/ESP/ESP32_C3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ int main(void) {
```sh
wcx@tim  ~/rt-thread/bsp/ESP32_C3   esp32 ±  sudo riscv32-esp-elf-gdb # Enter gdb debugging
GNU gdb (crosstool-NG esp-2022r1-RC1) 9.2.90.20200913-git
GNU gdb (esp-gdb) 17.1_20260402
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
Expand Down Expand Up @@ -138,8 +138,8 @@ If you want to lightly experiment with the ESP32-C3, it is recommended to quickl
1. Download the RISC-V toolchain:
```sh
wget https://github.com/espressif/crosstool-NG/releases/download/esp-2022r1-RC1/riscv32-esp-elf-gcc11_2_0-esp-2022r1-RC1-linux-amd64.tar.xz
tar xf riscv32-esp-elf-gcc11_2_0-esp-2022r1-RC1-linux-amd64.tar.xz
wget https://github.com/espressif/crosstool-NG/releases/download/esp-15.2.0_20251204/riscv32-esp-elf-15.2.0_20251204-x86_64-linux-gnu.tar.xz
tar xf riscv32-esp-elf-15.2.0_20251204-x86_64-linux-gnu.tar.xz
```
2. Configure the path of the toolchain:
Expand Down
6 changes: 3 additions & 3 deletions bsp/ESP/ESP32_C3/README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ int main(void) {
```sh
wcx@tim  ~/rt-thread/bsp/ESP32_C3   esp32 ±  sudo riscv32-esp-elf-gdb # 进入gdb调试
GNU gdb (crosstool-NG esp-2022r1-RC1) 9.2.90.20200913-git
GNU gdb (esp-gdb) 17.1_20260402
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
Expand Down Expand Up @@ -147,8 +147,8 @@ Type "apropos word" to search for commands related to "word".
1. 下载 RISC-V 工具链:

```sh
wget https://github.com/espressif/crosstool-NG/releases/download/esp-2022r1-RC1/riscv32-esp-elf-gcc11_2_0-esp-2022r1-RC1-linux-amd64.tar.xz
tar xf riscv32-esp-elf-gcc11_2_0-esp-2022r1-RC1-linux-amd64.tar.xz
wget https://github.com/espressif/crosstool-NG/releases/download/esp-15.2.0_20251204/riscv32-esp-elf-15.2.0_20251204-x86_64-linux-gnu.tar.xz
tar xf riscv32-esp-elf-15.2.0_20251204-x86_64-linux-gnu.tar.xz
```

2. 配置工具链的路径:
Expand Down
4 changes: 2 additions & 2 deletions bsp/ESP/ESP32_C3/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ USER dev
WORKDIR /home/dev

# 3. Install esp-idf toolchains
RUN wget -q https://github.com/espressif/crosstool-NG/releases/download/esp-2022r1-RC1/riscv32-esp-elf-gcc11_2_0-esp-2022r1-RC1-linux-amd64.tar.xz && \
sudo tar -xf riscv32-esp-elf-gcc11_2_0-esp-2022r1-RC1-linux-amd64.tar.xz -C /opt
RUN wget -q https://github.com/espressif/crosstool-NG/releases/download/esp-15.2.0_20251204/riscv32-esp-elf-15.2.0_20251204-x86_64-linux-gnu.tar.xz && \
sudo tar -xf riscv32-esp-elf-15.2.0_20251204-x86_64-linux-gnu.tar.xz -C /opt

# 4. Clone RT-Thread and switch master
RUN git clone https://github.com/RT-Thread/rt-thread.git && \
Expand Down
61 changes: 60 additions & 1 deletion bsp/ESP/ESP32_C3/idf_port/include/freertos/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,39 @@ typedef rt_ubase_t UBaseType_t;
typedef rt_tick_t TickType_t;
#define portMAX_DELAY (TickType_t) RT_TICK_MAX

/*
* FreeRTOS V11 definitions that ESP-IDF v6.1 headers expect but the
* FreeRTOS-Wrapper kernel (FreeRTOS V10.4.6) does not provide.
*/
/* RISC-V has no privilege levels, so the annotation expands to nothing. */
#ifndef PRIVILEGED_FUNCTION
#define PRIVILEGED_FUNCTION
#endif
/* FreeRTOS V11 renamed nothing here: `StaticList_t` is just an alias of
`struct xLIST`. Used by components/esp_ringbuf/include/freertos/ringbuf.h. */
#ifndef RT_FREERTOS_WRAPPER_STATIC_LIST_T
#define RT_FREERTOS_WRAPPER_STATIC_LIST_T
#include "freertos/list.h"
typedef List_t StaticList_t;
#endif

/*
* ESP-IDF v6.1's components/esp_ringbuf blocks on the FreeRTOS task event
* lists, which FreeRTOS V11 provides and FreeRTOS-Wrapper does not.
* components/rtthread/scons/event_list.c implements the two functions below on
* top of the wrapper's list implementation; the declarations have to be visible
* here because esp_ringbuf calls them after a plain <freertos/FreeRTOS.h>.
* vTaskInternalSetTimeOutState() already exists in the wrapper's tasks.c but is
* not declared in its task.h.
*/
void vTaskPlaceOnEventList(List_t *const pxEventList, TickType_t xTicksToWait);
BaseType_t xTaskRemoveFromEventList(List_t *const pxEventList);
/* The wrapper's tasks.c defines this with TimeOut_t, which is a typedef of
`struct xTIME_OUT` in its freertos/task.h. Spell the tag out, because
task.h is not included here and a different tag would be a different type. */
struct xTIME_OUT;
void vTaskInternalSetTimeOutState(struct xTIME_OUT *const pxTimeOut);

struct rt_semaphore_wrapper
{
struct rt_semaphore sem;
Expand Down Expand Up @@ -245,6 +278,32 @@ FORCE_INLINE_ATTR BaseType_t xPortGetCoreID(void)
return (BaseType_t) esp_cpu_get_core_id();
}

/*
* The ESP-IDF v6.1 <freertos/stream_buffer.h> refers to StaticStreamBuffer_t,
* which FreeRTOS V11 defines in its FreeRTOS.h. The FreeRTOS-Wrapper kernel
* is V10.4.6 and provides no stream buffers, so nothing in the RT-Thread
* scons build can allocate one; the type only has to exist for the headers
* to parse. Same layout as ESP-IDF's components/freertos/FreeRTOS-Kernel.
*/
#ifndef RT_FREERTOS_WRAPPER_STATIC_STREAM_BUFFER_T
#define RT_FREERTOS_WRAPPER_STATIC_STREAM_BUFFER_T
typedef struct xSTATIC_STREAM_BUFFER
{
size_t uxDummy1[4];
void * pvDummy2[3];
uint8_t ucDummy3;
#if ( configUSE_TRACE_FACILITY == 1 )
UBaseType_t uxDummy4;
#endif
#if ( configUSE_SB_COMPLETED_CALLBACK == 1 )
void * pvDummy5[2];
#endif
portMUX_TYPE xDummyStreamBufferLock;
} StaticStreamBuffer_t;
/* Message buffers are built on stream buffers. */
typedef StaticStreamBuffer_t StaticMessageBuffer_t;
#endif



/* ------------------------------------------- FreeRTOS Porting Interface ----------------------------------------------
Expand Down Expand Up @@ -290,7 +349,7 @@ FORCE_INLINE_ATTR BaseType_t xPortGetCoreID(void)
portEXIT_CRITICAL(mux); \
} \
})
#define portTRY_ENTER_CRITICAL_SAFE(mux, timeout) portENTER_CRITICAL_SAFE(mux, timeout)
#define portTRY_ENTER_CRITICAL_SAFE(mux, timeout) portTRY_ENTER_CRITICAL(mux, timeout)

// ---------------------- Yielding -------------------------

Expand Down
20 changes: 20 additions & 0 deletions bsp/ESP/ESP32_C3/idf_port/ld/sections.ld
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ SECTIONS
* RTC fast memory holds RTC wake stub code,
* including from any source file named rtc_wake_stub*.c
*/
.rtc_reserved (NOLOAD):
{
. = ALIGN(4);
_rtc_reserved_start = ABSOLUTE(.);
KEEP(*(.rtc_reserved*))
_rtc_reserved_end = ABSOLUTE(.);
} > rtc_iram_seg

.rtc.text :
{
. = ALIGN(4);
Expand Down Expand Up @@ -134,6 +142,8 @@ SECTIONS
_iram_start = ABSOLUTE(.);
/* Vectors go to start of IRAM */
ASSERT(ABSOLUTE(.) % 0x100 == 0, "vector address must be 256 byte aligned");
_vector_table_start = ABSOLUTE(.);
KEEP(*(.exception_vectors_table.text));
KEEP(*(.exception_vectors.text));
. = ALIGN(4);

Expand Down Expand Up @@ -201,6 +211,8 @@ SECTIONS
*libpp.a:(.wifiorslpiram .wifiorslpiram.*)
*libpp.a:(.wifirxiram .wifirxiram.*)
*libpp.a:(.wifislprxiram .wifislprxiram.*)
*libpp.a:(.wifiextrairam .wifiextrairam.*)
*libnet80211.a:(.wifiextrairam .wifiextrairam.*)
*riscv?interrupt.*(.literal .literal.* .text .text.*)
*riscv?vectors.*(.literal .literal.* .text .text.*)
*librtc.a:(.literal .literal.* .text .text.*)
Expand Down Expand Up @@ -519,8 +531,16 @@ SECTIONS
soc_reserved_memory_region_end = ABSOLUTE(.);
/* System init functions registered via ESP_SYSTEM_INIT_FN */
_esp_system_init_fn_array_start = ABSOLUTE(.);
_esp_sys_init_fn_start = ABSOLUTE(.);
KEEP (*(SORT_BY_INIT_PRIORITY(.esp_system_init_fn.*)))
KEEP (*(SORT_BY_INIT_PRIORITY(.esp_sys_init_fn.*)))
_esp_system_init_fn_array_end = ABSOLUTE(.);
_esp_sys_init_fn_end = ABSOLUTE(.);

. = ALIGN(4);
_esp_libc_clock_array_start = ABSOLUTE(.);
KEEP (*(.esp_libc_clock_desc))
_esp_libc_clock_array_end = ABSOLUTE(.);
/* section information for initial. */
. = ALIGN(4);
__rt_init_start = .;
Expand Down
1 change: 0 additions & 1 deletion bsp/ESP/ESP32_C3/idf_port/src/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
#include "hal/systimer_hal.h"
#include "hal/systimer_ll.h"
#include "riscv/rvruntime-frames.h"
#include "riscv/riscv_interrupts.h"
#include "riscv/interrupt.h"
#include "esp_private/crosscore_int.h"
#include "esp_attr.h"
Expand Down
6 changes: 4 additions & 2 deletions bsp/ESP/ESP32_C3/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
/* esp_timer_init() is called under BSP_USING_BLE; ESP-IDF v6.1's header
* chain no longer declares it implicitly. */
#include "esp_timer.h"

#ifdef BSP_USING_BLE
void app_main()
{
while(1)
while (1)
{

}
}
#endif /* BSP_USING_BLE */
Expand Down
14 changes: 11 additions & 3 deletions bsp/ESP/ESP32_C3/rtconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

if CROSS_TOOL == 'gcc':
PLATFORM = 'gcc'
EXEC_PATH = r'~/.espressif/tools/riscv32-esp-elf/esp-2022r1-11.2.0/riscv32-esp-elf/bin'
EXEC_PATH = r'~/.espressif/tools/riscv32-esp-elf/esp-15.2.0_20251204/riscv32-esp-elf/bin'
else:
print('Please make sure your toolchains is GNU GCC!')
exit(0)
Expand All @@ -41,8 +41,16 @@
OBJCPY = PREFIX + 'objcopy'
STRIP = PREFIX + 'strip'

DEVICE = ' -nostartfiles -march=rv32imc --specs=nosys.specs -fasynchronous-unwind-tables '
CFLAGS = DEVICE + '-include ../../components/libc/compilers/common/include/sys/ioctl.h -gdwarf-4 -ggdb -Og '
# ESP-IDF v6.1 / binutils >= 2.41 no longer imply the Zicsr/Zifencei
# extensions in `-march=rv32imc`, so spell them out.
DEVICE = ' -nostartfiles -march=rv32imc_zicsr_zifencei --specs=nosys.specs -fasynchronous-unwind-tables '
# RT-Thread's rt_uint32_t/rt_tick_t are layout compatible with the
# toolchain's uint32_t but not the same type (`unsigned int` vs
# `long unsigned int` on riscv32 with GCC 15). ESP-IDF v6.1 sources
# mix both, and GCC >= 14 promotes incompatible-pointer-types and
# int-conversion from warnings to errors.
CFLAGS = DEVICE + '-Wno-error=incompatible-pointer-types -Wno-error=int-conversion '
CFLAGS += '-include ../../components/libc/compilers/common/include/sys/ioctl.h -gdwarf-4 -ggdb -Og '
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp'
idf_path = find_package_path(BSP_ROOT, 'ESP-IDF-latest', relative_to=BSP_ROOT, pathsep='/')
LFLAGS = DEVICE + ' -Wl,--cref -Wl,--defsym=IDF_TARGET_ESP32C3=0 -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,_start -T idf_port/ld/memory.ld -T idf_port/ld/sections.ld -T ' + idf_path + '/components/esp_rom/esp32c3/ld/esp32c3.rom.ld -T ' + idf_path + '/components/esp_rom/esp32c3/ld/esp32c3.rom.api.ld -T ' + idf_path + '/components/esp_rom/esp32c3/ld/esp32c3.rom.libgcc.ld -T ' + idf_path + '/components/esp_rom/esp32c3/ld/esp32c3.rom.newlib.ld -T ' + idf_path + '/components/esp_rom/esp32c3/ld/esp32c3.rom.version.ld -T ' + idf_path + '/components/esp_rom/esp32c3/ld/esp32c3.rom.eco3.ld -T ' + idf_path + '/components/soc/esp32c3/ld/esp32c3.peripherals.ld -Wl,--wrap=_Unwind_SetEnableExceptionFdeSorting -Wl,--wrap=__register_frame_info_bases -Wl,--wrap=__register_frame_info -Wl,--wrap=__register_frame -Wl,--wrap=__register_frame_info_table_bases -Wl,--wrap=__register_frame_info_table -Wl,--wrap=__register_frame_table -Wl,--wrap=__deregister_frame_info_bases -Wl,--wrap=__deregister_frame_info -Wl,--wrap=_Unwind_Find_FDE -Wl,--wrap=_Unwind_GetGR -Wl,--wrap=_Unwind_GetCFA -Wl,--wrap=_Unwind_GetIP -Wl,--wrap=_Unwind_GetIPInfo -Wl,--wrap=_Unwind_GetRegionStart -Wl,--wrap=_Unwind_GetDataRelBase -Wl,--wrap=_Unwind_GetTextRelBase -Wl,--wrap=_Unwind_SetIP -Wl,--wrap=_Unwind_SetGR -Wl,--wrap=_Unwind_GetLanguageSpecificData -Wl,--wrap=_Unwind_FindEnclosingFunction -Wl,--wrap=_Unwind_Resume -Wl,--wrap=_Unwind_RaiseException -Wl,--wrap=_Unwind_DeleteException -Wl,--wrap=_Unwind_ForcedUnwind -Wl,--wrap=_Unwind_Resume_or_Rethrow -Wl,--wrap=_Unwind_Backtrace -Wl,--wrap=__cxa_call_unexpected -Wl,--eh-frame-hdr -Wl,--wrap=__gxx_personality_v0 -Wl,--cref -Wl,--defsym=IDF_TARGET_ESP32C3=0'
Expand Down
6 changes: 6 additions & 0 deletions bsp/ESP/ESP32_C6/.ci/attachconfig/ci.attachconfig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@ devices.uart:
- CONFIG_RT_USING_SERIAL=y
- CONFIG_RT_USING_SERIAL_V1=y
- CONFIG_BSP_USING_UART=y
devices.spi:
<<: *scons
kconfig:
- CONFIG_RT_USING_SPI=y
- CONFIG_BSP_USING_SPI=y
- CONFIG_BSP_USING_SPI2=y
4 changes: 2 additions & 2 deletions bsp/ESP/ESP32_C6/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ ESP32-C6-DevKitC-1 是乐鑫推出的一款基于 RISC-V 内核的开发板,

| IDE/编译器 | 已测试版本 |
| ---------- | ---------- |
| GCC | Espressif riscv32-esp-elf GCC 11.2.0 |
| GCC | Espressif riscv32-esp-elf GCC 15.2.0 |

## 3 使用说明

> 本章节是为刚接触 RT-Thread 的新手准备的使用说明,遵循简单的步骤即可将 RT-Thread 操作系统运行在该开发板上,看到实验效果。
### 3.1 使用 Env 编译 BSP

1. 下载 [riscv32-esp-elf GCC 11.2.0](https://github.com/espressif/crosstool-NG/releases/download/esp-2022r1-RC1/riscv32-esp-elf-gcc11_2_0-esp-2022r1-RC1-win64.zip)(Windows)。Linux 用同版本的 `linux-amd64` 包。
1. 下载 [riscv32-esp-elf GCC 15.2.0](https://github.com/espressif/crosstool-NG/releases/download/esp-15.2.0_20251204/riscv32-esp-elf-15.2.0_20251204-x86_64-w64-mingw32.zip)(Windows)。Linux 用同版本的 `linux-amd64` 包。
2. 下载 Env 工具 [最新版本](https://github.com/RT-Thread/env-windows/releases)
3. 将 [esp-idf 提交 `4fa003074a73774369d38123749fe64b7b4acbd3`](https://github.com/cms19859230182-lang/esp-idf/commit/4fa003074a73774369d38123749fe64b7b4acbd3)(`bsp/esp32c6-scons`)放到 `packages/ESP-IDF-latest`。官方 `RT-Thread-packages/esp-idf` 里还没有这些 C6 源码,`pkgs --update` 下到的包编不过。SConstruct 发现包里没有 C6 时,拉取的也是这一次提交,不跟分支尖走。
4. 在当前 BSP 目录下执行 `scons --exec-path=工具链的bin目录`
Expand Down
4 changes: 2 additions & 2 deletions bsp/ESP/ESP32_C6/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ def _match_idf_spi_lock_stub_to_spi_config():
if spi_selected:
marker = b'skip_name = ('
if marker not in text:
raise RuntimeError('%s has no %s to skip spi_lock_stub.c in'
% (sc, marker.decode()))
# In ESP-IDF v6.1+, spi_lock_stub is no longer present; spi_common.c is built directly.
return
text = text.replace(marker, marker + entry, 1)
else:
text = text.replace(entry, b'', 1)
Expand Down
6 changes: 3 additions & 3 deletions bsp/ESP/ESP32_C6/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ RUN apt update && \
USER dev
WORKDIR /home/dev

RUN wget -q https://github.com/espressif/crosstool-NG/releases/download/esp-2022r1-RC1/riscv32-esp-elf-gcc11_2_0-esp-2022r1-RC1-linux-amd64.tar.xz && \
sudo tar -xf riscv32-esp-elf-gcc11_2_0-esp-2022r1-RC1-linux-amd64.tar.xz -C /opt && \
rm riscv32-esp-elf-gcc11_2_0-esp-2022r1-RC1-linux-amd64.tar.xz
RUN wget -q https://github.com/espressif/crosstool-NG/releases/download/esp-15.2.0_20251204/riscv32-esp-elf-15.2.0_20251204-x86_64-linux-gnu.tar.xz && \
sudo tar -xf riscv32-esp-elf-15.2.0_20251204-x86_64-linux-gnu.tar.xz -C /opt && \
rm riscv32-esp-elf-15.2.0_20251204-x86_64-linux-gnu.tar.xz

ENV PATH="/opt/riscv32-esp-elf/bin:${PATH}"

Expand Down
Loading
Loading