18221 Commits
Author SHA1 Message Date
seteiroandseteiro dc8aaa73f2 [bsp][esp32-c6] add ESP32-C6-DevKitC-1 support (#11836)
* [bsp][esp32-c6] add ESP32-C6-DevKitC-1 support

Add bsp/ESP/ESP32_C6. Default image is GPIO, UART0 and ADC. The C6 IDF sources are not in RT-Thread-packages/esp-idf yet.

* [bsp][esp32-c6] fix CI format, C6 package and CH32V203 D6 build

clang-format the files the format check rejected. Fetch the C6 scons
branch when the downloaded ESP-IDF package has no C6 target. Patch the
CH32V20x SDK under libraries so a D6 build no longer calls Exit().

* [bsp][esp32-c6] fetch mbedtls and stop pkgs from pulling the C6 branch

* [bsp][esp32-c6] rebuild CI against the package branch tip

* [bsp][esp32-c6] rebuild CI against the strict-mode package tip

* [bsp][esp32-c6] fix the reviewed ADC, math and package pin bugs

Keep the IDF tree on the reviewed commit, and stop the ADC and critical-section paths from reporting success when they did not.

* [bsp][esp32-c6] reserve stuck interrupt lines and lock ADC

CPU lines 3 and 4 never latch an enable, so copying the handler left the non-IRAM mask on the old line. Reserve those lines and let the allocator write the mask and the route together. The C6 oneshot registers are shared, so one mutex covers enable and convert.

* [bsp][esp32-c6] list the peripherals this board actually runs

GPIO, UART0 and ADC1 have been read on the DevKitC-1. Radios and the untested buses stay marked unsupported.

* [bsp][esp32-c6] keep SPI unsupported after the loopback mismatch

GPIO7 shorted to GPIO2 returned 0xA5000000 for a sent 0xA5, so the table does not mark SPI supported.

---------

Co-authored-by: seteiro <276597748+cms19859230182-lang@users.noreply.github.com>
2026-09-28 22:22:30 +08:00
seteiro 6f99d7bf97 [bsp][ch32v003] add CH32V003F4P6-EVT support #11838 2026-09-28 22:20:40 +08:00
蒙蒙plus a71f87ecec [bsp][iar] Use $PROJ_DIR$ relative paths for link.icf in template.ewp
IlinkIcfFile in 5 BSP template.ewp files pointed to absolute paths on other developers' machines, which scons --target=iar copies into the generated project.ewp and breaks builds elsewhere.

Affected: asm9260t, mm32f3270-100ask-pitaya, stm32f103-100ask-mini, stm32f103-100ask-pro and imxrt1180-nxp-evk/cm7 (3 configurations).
2026-09-28 22:19:15 +08:00
蒙蒙plus 05badce954 [drivers][ipc] 移除 SConscript 中冗余的 __RT_IPC_SOURCE__ 宏定义 2026-09-27 12:18:44 +08:00
Copilot b40aeb146b [gd32][build] skip package precheck during gd32vw553h clean- #11837 #11837 2026-09-26 19:58:26 +08:00
seteiro 386b877ba3 [bsp][ch32v203] add CH32V203C8T6-EVT-R0 support #11827 2026-09-24 16:21:11 +08:00
CYFS da5098b0af [ci][format] Stop skipping CI for clang-format commits 2026-09-23 16:34:50 +08:00
萌新源 005d291492 [bsp/Infineon] Fix PWM macro mismatches left by the CHx_PORTy rename (#11802)
* [bsp/Infineon] Fix PWM macro mismatches left by the CHx_PORTy rename

Commit e5382cb733 renamed the PWM table guards in drv_pwm.c to the
CHx_PORTy convention but only adapted the psoc6-evk Kconfig, leaving
several mismatches behind:

- The psoc6-evaluationkit-062S2 slider sample still tested the old
  flat name BSP_USING_PWM0_PORT0 while the board Kconfig defines
  BSP_USING_PWM0_CH0_PORT0, so the PWM init was compiled out.
- The PORT13 entry was renamed to BSP_USING_PWM0_CH7_PORT13, a macro
  that no Kconfig defines, and the channel is wrong anyway:
  PWM0_CH3_PORT13_CONFIG carries .channel = 3, PORT13 sits under the
  PWM0 CH3 menu, and the slider demo selects CH3 + PORT13.
- The PSOC62 template and five psoc6 boards (cy8ckit-062-BLE,
  cy8ckit-062-WIFI-BT, cy8ckit-062S2-43012, cy8ckit-062s4,
  cy8cproto-062S3-4343W) still define the old flat names.

Fix all of them by migrating the evaluationkit sample to
BSP_USING_PWM0_CH0_PORT0 and renaming the PORT13 group to
BSP_USING_PWM0_CH3_PORT13 across drv_pwm.c, the PSOC62 template and
the five boards' Kconfigs/slider samples, so Kconfig, driver table
and samples match again.

Note: the sibling guards BSP_USING_PWM0_CH7_PORT2/5/7/9/10/12 are
still not generated by these boards' Kconfigs; left untouched for a
separate discussion.

* style: format code with clang-format [skip ci]
2026-09-21 15:44:01 +08:00
Onlyou_tzZ 0edbc15ea9 [cherryusb][fsdev] add N32H4x USBFS device support #11764 2026-09-21 15:43:37 +08:00
wyf-777 3eff2d5c7e [net][at] Reject overlong numeric hostnames
Numeric hostnames were copied into a fixed stack buffer without a length bound.

Cache the length, reject values that cannot fit, and terminate the copy explicitly.

Fixes #11332

Assisted-by: OpenAI Codex:GPT-5
2026-09-21 10:18:56 +08:00
zhangyuyang 5d1aee9b32 [components][sdio] Fix CIS tuple memory leak 2026-09-21 10:12:51 +08:00
Cheng Li f0b40514f8 [docs] do not tell users to delete /usr/bin/python3
Section 3.2.1 of the QEMU (Ubuntu) quick start instructs the reader to
run "sudo rm -rf /usr/bin/python3" and re-create the symlink by hand.
On Debian and Ubuntu, apt and much of the system tooling are Python
programs resolved through that path, so following the guide leaves the
machine unable to install packages at all - including the packages
needed to undo it. The hardcoded 3.9 version in the example also goes
stale with every release.

Replace it with python-is-python3, which is what provides the python
command on these distributions, and add a warning against the manual
approach. Drop the now unreferenced screenshot.
2026-09-21 09:52:58 +08:00
Cheng Li 2613055c4a [docs] point QEMU Linux quick start at qemu-nographic.sh
The quick start only ever mentions ./qemu.sh, and its file table omits
the qemu-nographic scripts entirely. qemu.sh passes -serial stdio
without -nographic, so QEMU opens a GTK window for the emulated CLCD.
On a headless machine or over SSH it stops at "gtk initialization
failed", with nothing in the guide explaining what to do next, even
though the BSP already ships qemu-nographic.sh for exactly this case.

Add both nographic scripts to the file table and document them where
the project is first run.
2026-09-21 09:52:06 +08:00
CYFS b80e928f3d [bsp][gd32] Fix USART TX and RX GPIO initialization
Configure TX as alternate-function push-pull and RX as pull-up input on GD32E50x/F10x/F20x/F30x. Remove the GPIO API alias that incorrectly configured both pins as general-purpose push-pull outputs.
2026-09-21 09:38:05 +08:00
wdfk-prog 3ede09e45b feat[bsp][stm32][h7]: add UART4 RX DMA configuration
Add the missing UART4 RX DMA definitions for STM32H7.

UART4 RX DMA uses DMA1 Stream0 with the UART4 RX DMA request.
The configuration is enabled when BSP_UART4_RX_USING_DMA is selected.
2026-09-21 09:36:49 +08:00
zhangyuyang c2f5a28321 [components][sdio] fix possible memory leak of sdio driver unregistration 2026-09-21 09:34:06 +08:00
kingingwang 678473c3ba [rust][tools] Fix Cortex-M33 hard-float target selection
detect_rust_target() 的 Cortex-M33 分支固定返回 thumbv8m.main-none-eabi,
没有使用同函数已计算的 hard_float,而 M4/M7 分支是判断的。

硬浮点 M33 板卡因此拿到软浮点 ABI 的 Rust 库,链接时报
"uses VFP register arguments" 并终止构建。

按 hard_float 选择 eabihf/eabi,与 M4/M7 分支保持一致。
2026-09-21 09:29:19 +08:00
wdfk-prog f6e74cee17 feat[drivers][block]: fix printf format type mismatches
Fix format specifier mismatches in blk_partition.c by using the
appropriate integer formats and explicit casts.

This removes -Wformat warnings on platforms where rt_uint32_t and
rt_size_t are represented as unsigned long.
2026-09-21 09:28:56 +08:00
luchenxu ed686ba95b [ci] fix missing libtinfo5 dependency for LLVM ARM workflow 2026-09-17 22:29:35 +08:00
luchenxu f33265d90b [bsp][stm32]fix stm32 ld flash oversize #11124 2026-09-17 09:31:36 +08:00
Leeto bbc45da16c [HC32][BSP] Delete PM_TICKLESS_TIMER_ENABLE_MASK in pm_config.h, modify 'NAME_MAX' to 24 #11798 2026-09-16 17:54:41 +08:00
wdfk-prog 69451d1a8e fix(drv_dma): 修复stm32_dma_type_name函数链接问题
将函数声明从static改为extern,解决跨文件调用时的链接错误,
确保DMA、BDMA和GPDMA类型的日志标签能够正确生成。
2026-09-16 10:19:06 +08:00
OnlyoutzZ 51be4c4589 [bsp][n32] n32hxxx: fix H7xx hard I2C abort and add the missing SDK header
The N32H7xx branch of drv_hard_i2c.c had never been compiled. The file takes
its peripheral declarations from board.h, and only n32h497zgl7-evb includes
n32h49x_i2c.h, so on H7xx every I2C symbol was undefined and the option could
not build at all. Include the peripheral header from the driver itself, the way
drv_sdram.c already does.

I2C_ABORT_ON_TIMEOUT also degraded to a bare `state = I2C_READY` on H7xx, at the
four rt_completion_wait() timeouts in n32_i2c_master_xfer(). The H49x
implementation is written against the older IP - I2C_ClrIntPendingBit,
I2C_STS2_BUSY, I2C_CTRL1_STOPGEN - none of which exist in the H7xx SDK, so give
H7xx its own teardown. It disables the interrupt and DMA request sources,
disables the DMA channel that would otherwise stay armed against the caller's
buffer, releases the bus and clears the status residue.

Only flags with a matching INTCLR bit may be passed to I2C_ClrFlag(), which is a
plain "INTCLR |= flag" write; TFC (0x40) and BUSY (0x8000) have none.

I2C_Configuration() was called from n32_i2c_init() but defined nowhere in the
tree. It is a board hook for pin mux, which is not the driver's job - the H49x
path configures no pins either - so drop the call.

Verified by building n32h760zil7-stb with BSP_USING_HARD_I2C1 and its TX/RX DMA
enabled, which now compiles and links with no warnings, and n32h497zgl7-evb with
I2C1/I2C2 DMA enabled, whose image size is unchanged. Neither board routes I2C
pins yet, so this is build-verified only, not hardware-verified.
2026-09-16 09:06:34 +08:00
OnlyoutzZ bd501fa9e3 [bsp][n32] n32h497zgl7-evb: add SDRAM port and correct Kconfig defaults
drv_sdram.c includes <sdram_port.h> unconditionally under BSP_USING_SDRAM,
and n32h497zgl7-evb had no such header, so the option could not build at
all. Add one for the M12L64164A fitted on this board: 4 banks x 1M x 16
bits = 8 MB, 12 row address bits, 8 column address bits, SDRAM1 mapped at
0x98000000. The timing values are the ones validated on this board in
hardware.

Three of the Kconfig defaults described a different part:

  BSP_SDRAM_DATA_WIDTH_SEL   default 32 -> 16
  BSP_SDRAM_COLUMN_BITS_SEL  default 9  -> 8
  BSP_SDRAM_SIZE             default 32 -> 8

BANK1, ROW_BIT_12 and CAS_LATENCY_3 already matched and are unchanged.

Verified by building n32h497zgl7-evb with BSP_PERIPH_PIN_CFG_READY and
BSP_USING_SDRAM enabled: drv_sdram.c and the SDK's n32h49x_sdram.c compile
and link with no warnings.
2026-09-16 09:06:34 +08:00
OnlyoutzZ ed59aaebf6 [bsp][n32] n32hxxx: bound the XSPI waits and fix I2C/SPI/NAND edge cases
- qspi: both XSPI variants poll the status flags with no bound, so an
  unresponsive bus hangs the caller and silently defeats the timeout it
  passed in. Route every wait through the timeout-carrying helpers,
  return -RT_ETIMEOUT and disable the controller on failure, and replace
  the "poll then send" loops with one bounded wait per element.
- hard_i2c: the interrupt receive path programs the BYTENUM window once
  and never reloads it, so a longer message was truncated and still
  reported as success; refuse it with -RT_EINVAL (enable RX DMA for
  longer reads) instead of capping XferSize. Stop capping the transmit
  byte count at the window size as well: BYTENUM counts received bytes
  only, and the cap stopped feeding DAT after byte 255 while TXDATE
  stayed asserted. Reject RT_I2C_NO_START/RT_I2C_NO_STOP on the series
  without frame chaining, where they would silently become a fresh START
  and a STOP, and tear the DMA channel down when the address phase times
  out instead of leaving it armed against a buffer about to unwind.
- spi: the H7xx LLI chain advanced the memory side by SPI_DMA_BLOCK_MAX
  bytes although BlkTfrSize counts elements, so a 16-bit transfer walked
  half a word early per node; advance by elements and scale both the
  chunk offset and the staging buffer by the data width. Propagate the
  DMA arm failure that was ignored.
- nand: an odd data length has no halfword-only encoding on the 16-bit
  bus and padding would program a byte the caller never asked for, so
  refuse it before the command phase; issue the empty-page dummy store
  as a halfword there too, where 8-bit AHB writes are unsupported.
- Kconfig: gate the Ethernet/SDRAM/LCD/QSPI/NAND options behind
  BSP_PERIPH_PIN_CFG_READY on all three boards. The peripheral clock and
  IO are not configured for these boards yet, so selecting one of them
  builds a driver whose pins stay in the reset function.
2026-09-16 09:06:34 +08:00
OnlyoutzZ 97634bffe8 [bsp][n32] n32hxxx: extend H47x_48x/H49x/H7xx driver support
- libraries/N32_Drivers: add ADC/DAC/I2C/SPI config headers for the
  h47x_48x, h49x and h7xx series, and extend the shared drivers
  (adc, dac, eth, gpio, hard_i2c, nand, qspi, sdram, spi, usart, wdt).
- n32h487zgl7-evb / n32h497zgl7-evb: add board ports (femc_timing,
  phy_reset, usb_config) and update Kconfig, SConscript, rtconfig and
  the IAR/Keil project files.
- n32h760zil7-stb: update Kconfig and rtconfig.
- CI: register the three n32hxxx boards.
2026-09-16 09:06:34 +08:00
yans6666 1d2152ceee [bsp][stm32] Add stm32n657-st-nucleo BSP (#11799)
* [bsp][stm32] Add stm32n657-st-nucleo BSP

* style: format STM32 HAL drivers and STM32N657 BSP with clang-format
2026-09-16 09:05:27 +08:00
CYFS f165a0f804 [BSP][STM32] Adapt Ethernet driver to new HAL API 2026-09-15 22:59:08 +08:00
guanxi.cgh e81494f881 [libcpu][risc-v]Feat: Add OpenSBI SMP support to t-head c908 2026-09-15 22:57:55 +08:00
guanxi.cgh 5b19c18f47 [bsp][xuantie]Feat: Add xiaohui C908 supports rt-smart and mmu. 2026-09-15 22:57:55 +08:00
guanxi.cgh a5d9dc884b [libcpu][risc-v]Feat: Add mmu SV48/SV57 mode support and add mmu_demo for C908. 2026-09-15 22:57:55 +08:00
moment-NEW dc3da6d87f style: format code with clang-format [skip ci] 2026-09-14 09:59:27 +08:00
moment-NEW ca73422bd6 [bsp][stm32] Add SPI BDMA support and unify DMA/BDMA/GPDMA config
- Unify DMA/BDMA/GPDMA descriptors in drv_dma (common fields + per-type union)
- Support BDMA in SPI driver with h7 dma/spi config header updates
- Add SPI6 TX/RX BDMA Kconfig options for H7
2026-09-14 09:59:27 +08:00
Cheng Li e538ad76e4 [docs] fix outdated GNU GCC toolchain link in qemu-vexpress-a9 README
The link points to launchpad.net, which shut down its gcc-arm-embedded
downloads years ago (the URL now returns 503), and the tarball it names
is a 2016 Q3 build (gcc 5.4).

- Point to Arm GNU Toolchain Downloads, matching the link already used
  in bsp/nxp/imx/imx91/README.md. The old gnu-rm page covers the
  GNU Arm Embedded Toolchain, which Arm has superseded.
- Mention installing the toolchain from the distribution package
  manager, with Debian/Ubuntu as an example, since rtconfig.py already
  defaults EXEC_PATH to /usr/bin. libstdc++-arm-none-eabi-newlib is
  listed because LFLAGS links with -lsupc++.
2026-09-11 13:26:28 +08:00
Cheng Li 4f95e33270 [docs] fix outdated and missing apt packages in QEMU Linux quick start
The dependency list in the QEMU (Ubuntu) quick start no longer works on
current Debian/Ubuntu releases:

- gdb-arm-none-eabi no longer exists (dropped since Debian 11 /
  Ubuntu 22.04); gdb-multiarch replaces it
- the qemu meta-package has been split up and can no longer be installed
- libncurses5-dev has been removed; libncurses-dev replaces it
- libstdc++-arm-none-eabi-newlib was missing, so linking fails with
  "cannot find -lsupc++", which does not point at the missing package
- kconfiglib was not mentioned at all, although scons --menuconfig needs
  it; python3-kconfiglib is packaged, and pip install kconfiglib is
  rejected by PEP 668 on recent releases

Merge the eleven single-package commands into one, add a table mapping
the old package names to the current ones, and note the kconfiglib
requirement where menuconfig is first used.

Verified with apt-get -s install on Debian 13.
2026-09-11 13:23:29 +08:00
CYFS 2bb31e568a [kernel] Bump version to v5.3.1 2026-09-10 17:44:05 +08:00
CYFS c137973985 [docs] Add v5.3.0 changelog 2026-09-10 17:44:05 +08:00
CYFS3 5b8e188af2 style: format code with clang-format [skip ci] 2026-09-10 16:23:49 +08:00
CYFS 8f8eb45014 [bsp/renesas][drivers] Fix SCI SPI runtime configuration and transfer errors
修复 SCI SPI 分频参数和运行时配置生命周期,保持位宽单位一致,应用模式及片选配置,并在收发超时或错误后停止传输、清理状态。
2026-09-10 16:23:49 +08:00
CYFS fe966755e9 [libcpu] Fix RZ/N2L interrupt dispatch 2026-09-10 10:09:17 +08:00
CYFS 5899db2a52 [rust][build] Avoid toml dependency during clean 2026-09-09 13:31:44 +08:00
CYFS d7ea2bce99 [bsp/renesas][drivers] Read PWM settings from GPT registers 2026-09-09 10:33:04 +08:00
CYFS 6664825546 [tools][keil] Preserve include path order 2026-09-08 17:03:21 +08:00
yandld a9ce0ccbb2 [bsp][nxp] Add FRDM-MCXC162 BSP support 2026-09-08 16:15:20 +08:00
zhangyuyang 7fa651bd29 [components][sal] Fix SIOCGIFCONF buffer overflow 2026-09-07 14:53:09 +08:00
CYFS 280bcfeec3 [device][mmcsd] Fix Arm Compiler 5 build compatibility #11690 2026-09-07 11:18:41 +08:00
wdfk-prog 163d178e29 [tools][eclipse] Sync assembler include paths 2026-09-07 10:36:47 +08:00
hanzhijian 2c98902543 [mprotect][kconfig] Add safe defaults for MPU region count options
NUM_MEM_REGIONS / NUM_CONFIGURABLE_REGIONS / NUM_EXCLUSIVE_REGIONS had no
Kconfig defaults. Enabling RT_USING_HW_STACK_GUARD without explicitly
setting them generated empty macros in rtconfig.h (e.g.
'#define NUM_CONFIGURABLE_REGIONS'), which expanded into invalid C
expressions like '(2 + )' and 'for (i = 0U; i < ; i++)', breaking
compilation for cortex-m4/m7/m33 MPU code.

Add safe defaults: NUM_MEM_REGIONS=8, NUM_CONFIGURABLE_REGIONS=0,
NUM_EXCLUSIVE_REGIONS=0. Also document the MemManage_Handler strong-symbol
conflict with CubeMX-generated stm32f4xx_it.c and how to resolve it.

Reported-by: wdfk-prog
2026-09-07 10:31:49 +08:00
kaidegit 3d3648ce2c [bsp][hpmicro] wire CXX/CXXFLAGS from rtconfig into scons Environment
Without CXX = rtconfig.CXX the scons Environment falls back to the
default host 'g++', and CXXFLAGS stays an empty CLVar, so the C++
group flags appended by DefineGroup end up as a single unquoted
argument and the build fails as soon as RT_USING_CPLUSPLUS is on:

  g++: error:  -fno-exceptions -fno-rtti ... -Wl,--gc-sections:
  linker input file not found: No such file or directory

Found by the CI C++ ctor (.init_array) check.
2026-09-07 10:19:22 +08:00
TTLLDD 54e5164064 [components][lwp] Remove terminal/ from global CPPPATH
The terminal subsystem's own headers (terminal.h, tty_config.h, ...) are
resolved by the compiler's quoted-include directory lookup for sources
inside components/lwp/terminal; nothing else depends on the path.
Stop polluting the global CPPPATH with this internal directory,
following the convention discussed in #10980.
2026-09-03 09:20:30 +08:00