Commit Graph

17332 Commits

Author SHA1 Message Date
Chen Wang
98cb15a3ef doxygen: add howto for utest
After "utest: re-org utest framework (initial version)" (PR #10534)
was merged, adding a document to introduce how to add utest-cases
for your module.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-08-26 11:06:02 +08:00
Chen Wang
0fdeb4c077 utest: integrate config option for utest of audio driver
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-08-26 10:26:47 +08:00
Chen Wang
532da3482b utest: integrate config option for utest of klibc
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-08-26 10:26:47 +08:00
Chen Wang
06c5cc0846 utest: move entry from examples to utest
Change the entry of utest's Kconfig from
'examples/utest/testcases/Kconfig' to
'Kconfig.utestcases'.

Modified the build scripts where the path name
is "examples/utest/testcases/Kconfig" and changed
it to 'Kconfig.utestcases', otherwise build
operations such 'scons --dist' may fail.

In the future, the testcase source code of
utest will be placed in each module for
maintenance, but the entry of Kconfig will all
be placed in Kconfig.utestcases for unified
maintenance. In this way, when executing menuconfig,
people can enter and configure from one place,
avoiding searching for utest configuration switches
here and there in the menuconfig interface.

For each module, you can maintain unit-test
in a unified manner in the following way:
- Create a subdirectory named 'utest' in the
  directory where your module is located.
- Store the following files in the utest subdirectory:
  - Unit test case program source code files for this
    module.
  - Kconfig file, add configuration options for the
    unit test files of this module, the recommended
    option is named RT_UTEST_TC_USING_XXXX, XXXX is the
    global unique module name of this module.
  - SConscript file, note that when adding src files,
    in addition to relying on RT_UTEST_TC_USING_XXXX,
    you must also rely on RT_UTEST_USING_ALL_CASES, the
    two dependencies are in an "or" relationship. The
    role of RT_UTEST_USING_ALL_CASES is that once this
    option is turned on, all unit tests will be enabled
    to avoid selecting one by one.

After completing the above steps, add the path of the
Kconfig file of utest of this module to the
Kconfig.utestcases file.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-08-26 10:26:47 +08:00
GuEe-GUI
1892b27a45 [DM/THERMAL] Fixup the PWM-FAN remove handle data ptr
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-08-26 09:34:15 +08:00
GuEe-GUI
7101b22ffb [DM/THERMAL] Fixup the C99, 6.8.1 Labeled statements p4
Append a null statement for "Any statement may be preceded by a prefix that declares an identifier as a label name."

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-08-26 09:34:15 +08:00
GuEe-GUI
af2c8ae174 [DM/PCI] Add SoC PCI Kconfig import
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-08-25 11:12:02 +08:00
GuEe-GUI
7d96990eff [DM/PCI] Fixup the DWC PCI resource release
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-08-25 11:12:02 +08:00
GuEe-GUI
77e845e018 [DM/PCI] Fixup the bus-range probe
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-08-25 11:12:02 +08:00
GuEe-GUI
8731289055 [DM/PCI] Fixup the MSI info shuold free
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-08-25 11:12:02 +08:00
WangShun
12d00741e9 [bsp/gd32] add gd32h759i-eval bsp add fix drv_usart.c (#10623)
* [bsp/gd32] add gd32h759i-eval bsp

* [fix] Update gd32h759i-start config

* 添加BSP CI看护

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update bsp/gd32/arm/libraries/gd32_drivers/drv_usart.c

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update bsp/gd32/arm/libraries/gd32_drivers/drv_usart.c

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* add .gitignore

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-25 10:57:59 +08:00
Yuqiang Wang
a9f0d2368c bsp: all Renesas bsp support the nano one-click switch. (#10629)
* bsp: all Renesas bsp support the nano one-click switch.

* fix pr conflicts.
2025-08-25 10:33:41 +08:00
CYFS
88d0eb0080 [bsp][renesas]add EK-RA2A1 support #10610 2025-08-24 17:27:05 +08:00
Elian Dunmore
bac64cad82 [bsp/xuantie] xuantie系列bsp添加导出CDK工程功能 #10630
[bsp/xuantie] E902 BSP适配生成CDK工程
[bsp/xuantie] E907 BSP适配生成CDK工程
[bsp/xuantie] C906 BSP适配生成CDK工程
[bsp/xuantie] C907 BSP适配生成CDK工程
[bsp/xuantie] C908 BSP适配生成CDK工程
[bsp/xuantie] C910 BSP适配生成CDK工程
[bsp/xuantie] R908 BSP适配生成CDK工程
[bsp/xuantie] R910 BSP适配生成CDK工程
[bsp/xuantie] R920 BSP适配生成CDK工程
2025-08-23 11:27:59 +08:00
JamieTx
78cd7c47c7 [F472] Modify the README.md for system clock frequency. 2025-08-22 18:42:44 +08:00
JamieTx
5f4319a6ca Update bsp drivers for F334. 2025-08-22 18:42:44 +08:00
R b b666
0b14a54614 Update RT_VERSION to 5.2.2 (#10627)
Update RT_VERSION to 5.2.2.
2025-08-22 10:56:29 +08:00
BernardXiong
3b93a78434 [github] add copilot instructions 2025-08-21 18:51:15 +08:00
RyanCW
a1a8bc5422 [component][net][at] at_client增加deInit接口 (#10598)
* [component][net][at] at_client增加deInit接口

* [component][net][at] at_client优化serial_v2适配
2025-08-21 18:49:35 +08:00
杨熙
3fbd23bc63 nxp bsp support: frdm-mcxa346 (#10625)
* update nxp mcxa driver to support frdm-mcxa346

* update NXP bsp README

* update frdm-mcxa346 project
2025-08-21 11:06:06 +08:00
wanwandegit
0ef17c91cc [Fix][BSP][Serial_V2] add Serial V2 buffer configuration via Kconfig #10594#10602 2025-08-21 10:46:48 +08:00
Rbb666
882d1958dd [libcpu][cortex-m33]Added HardFault_Handler to save floating point registers 2025-08-20 18:17:19 +08:00
dannyray019
60b3ccb8ad bsp:k230:add support for temperature sensor driver
Added a temperature sensor driver and a test file test_ts.c.
The test uses temperature sensor to measure the chip temperature,
to check if the driver works correctly.

Signed-off-by: XU HU 1337858472@qq.com
2025-08-20 09:29:09 +08:00
Rbb666
990fc23628 [libcpu][cortex-m4]Added HardFault_Handler to save floating point registers. 2025-08-19 21:40:57 +08:00
R b b666
2f19ba6ce7 [libcpu ][cm3]The parameter passed to the unified rt_exception_hook is exception_stack. (#10619) 2025-08-19 21:15:47 +08:00
Yaochenger
f4e4188197 [xuantie/bsp] 修正生成玄铁CDK工程脚本并适配E906 BSP #10616 2025-08-19 09:41:30 +08:00
CYFS
7448763276 [github] 修改PR提示模板 (#10617) 2025-08-19 09:12:04 +08:00
Chen Wang
352b1f6a13 bsp: k230: Provide a unified interrupt header file
Originally, the interrupt definitions of various peripherals
were distributed in various peripheral drivers, resulting
in duplicate definitions. Now they are defined in one place.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-08-18 22:53:08 +08:00
Chen Wang
2bcb33bada bsp: k230: increase object name max length to 16
Fixes: 62f3fb4ce5: fix(kernel)/improve(utest):fix the legacy issue related to the length of the object name version #10537

After this patch, if length of object name exceeds (RT_NAME_MAX - 1),
RTT will assert and oops when runing, but not in period of building.
Though I don't think it's a good solution, but don't want to argue more
about this.

Old RT_NAME_MAX is 8 for k230, and some object names, such as
"hwtimer0", which name length is 8, breaking the new rule.

Just update configuration of k230 bsp and increase RT_NAME_MAX from
8 to 16, which should be long enough for k230.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-08-18 15:03:59 +08:00
eatvector
7db99433e5 bsp: k230: add pdma driver support
This commit introduces the PDMA (Peripheral DMA) driver for K230 SoC,
providing essential DMA capabilities for peripheral data transfers.

Key features implemented:
1. PDMA channel request/release management
2. Channel start/stop control
3. Interrupt callback registration
4. Data transfer between device ports and DDR memory

The driver includes:
- Core driver implementation (drv_pdma.c/h)
- Build system support (SConscript)
- Basic test cases (test_pdma.c)

Tested with:
- PDMA channel request/release
- DDR to UART TX FIFO transfers
- UART RX FIFO to DDR transfers

Signed-off-by: eatvector <2302147681@qq.com>
2025-08-18 14:11:44 +08:00
CYFS
c5f5fb4851 [ci]修改PR提示 (#10611) 2025-08-18 09:53:22 +08:00
Core0349
fbf4856ffa bsp/nrf5x: nrf52840添加spim驱动 (#10576)
* 添加了spim的底层驱动和设备驱动

* 添加了nrf52840 的spim底层驱动和设备驱动

* 添加了spim的底层驱动和设备驱动

* 添加了spim的底层驱动和设备驱动

* 代码规范

* 1. 在rt-thread\bsp\nrf5x\nrf52840\.ci\attachconfig\ci.attachconfig.yml中添加了spim的相关设置。
devices.spim:
    kconfig:
      - CONFIG_RT_USING_SPIM=y
      - CONFIG_BSP_USING_SPIM=y
2. nrfx_dpim.h 注释中纠正了错误的拼写
3. 多个文件中:nrfx_spim.c drv_spim.c drv_spim.h 删减了多余的宏定义:USING_SPI_DMA
4. nrfx_spim.c中删除了DMA_TRANS_MIN_LEN,该宏定义定义了spi+dma最小传输字节,直接定义20。
2025-08-17 08:05:47 +08:00
RyanCW
e0243e87c0 [component][drivers][serial_v2] 优化serial_v2 (#10603)
* [bsp][stm32][drv_usart_v2] uart_isr不再使用链式调用,RXNE内循环读空,一些细节优化

* [componnents][drivers][serial_v2] 增加获取config接口,使用rt_tick_get_delta替代内部的时间绕回判断,写满丢弃策略rx接收数据错乱修复,clang-tidy和cppcheck审查优化

* [utest][drivers][serial_v2] 测试例程进行优化

* [bsp][stm32][drv_usart_v2] 撤回DMAMUX1修改

* [componnents][drivers][serial_v2] read和write不再返回-RT_ETIMEOUT改为已发送或读取的字节数,细节优化

* [utest][drivers][serial_v2] 增加单独的timeout测试,减少测试中的硬延时

* [utest][drivers][serial_v2] 漏提交的posix下标志位

* [utest][drivers][serial_v2] 优化测试例程

* [bsp][stm32][drv_usart_v2] transmit返回错误值,RXNE增加超时逻辑

* [componnents][drivers][serial_v2] 增加transmit错误处理,增加超时退出机制显式的避免死循环

* [componnents][drivers][serial_v2] 适配serial_v2和posix非libc标准库下的console和shell
2025-08-16 11:51:57 +08:00
杨熙
329cffd77e inital commit for FRDM-MCXA346 support (#10604)
* inital commit for FRDM-MCXA346 support

* format file

* add frdm-mcxa456 into bsp comople ci

* add some file according to copliot commments
2025-08-15 18:59:03 +08:00
Huang YunKun
235bbef523 feat(gd32 driver) Add support for hardware i2c with gd32e230 2025-08-15 08:32:03 +08:00
Chen Wang
715334f357 doxygen: fix build error
fixed: b084503b6d "[kernel] add UP scheduler critical switch flag."

After this commit, doxygen build with warning:
include/rtthread.h:658: warning: argument 'lock' from the argument list of rt_spin_unlock has multiple @param documentation sections
include/rtthread.h:660: warning: argument 'lock' from the argument list of rt_spin_unlock_irqrestore has multiple @param documentation sections
include/rtthread.h:660: warning: argument 'level' from the argument list of rt_spin_unlock_irqrestore has multiple @param documentation sections

Rootcasue analysis:
src/cpu_up.c and src/cpu_mp.c define two identical functions.
Because the INPUT parameter in the documentation/Doxyfile currently
compiles all source files under ./src, i.e both of them, Doxygen
automatically merges the Doxygen comments for identically named
functions if it finds the content of doxygen comments different,
resulting in multiple @param.

Previously, the API comments in both files were identical, so there
was no problem. However, the b084503b6d change only modified the
comments in src/cpu_up.c but not in src/cpu_mp.c, causing problems.

Another drawback of the b084503b6d change is that Doxygen recommends
a single line for the @brief; multiple lines are not recommended.

Solution:
Given the requirement for a single line for the @brief, this issue
is relatively simple to resolve: simply list the extra content as @note.

Regarding the warning: A perfect solution has not yet been found.
One possible approach is to write a single Doxygen comment for a kernel
API with two implementations. This approach involves writing Doxygen
comments in only one file, such as src/cpu_up.c , while omitting them
in src/cpu_mp.c .

Another solution is to add API comments to include/rtthread.h , but the
RT-Thread include/rtthread.h file is already quite large, and adding
comments there would be even more cumbersome.

A temporary solution currently in use is to ensure that the Doxygen
comments for the same API are identical in both src/cpu_up.c and
src/cpu_mp.c . This ensures that Doxygen compilation does not
generate warnings, and the files are automatically merged into a
single file in the HTML document.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-08-12 09:14:46 +08:00
zhangyan
dce06ba907 [ADD][BSP]:Phytium开发板驱动适配 (#10533)
适配Phytium开发板
2025-08-11 10:50:30 +08:00
wdfk-prog
302370720e [driver][serial] V1]: fix correct data loss logic when RX ring buffer is full
In the serial ISR (`rt_hw_serial_isr`), the previous logic for handling a full RX FIFO was flawed. When the buffer was filled, it would increment `get_index` (`get_index += 1`).

This had two negative consequences:
1.  It effectively discarded the oldest byte of data prematurely.
2.  It reduced the usable capacity of a buffer of size N to N-1. For example, a 64-byte buffer could only ever hold 63 readable bytes after becoming full.

This patch corrects the behavior by implementing a standard overwriting ring buffer strategy. When the buffer is full, the logic is changed to `get_index = put_index`.

This ensures that:
- When new data arrives, it correctly overwrites the oldest data.
- The `get_index` is advanced along with the `put_index`, correctly marking the new start of the buffer.
- The full N-byte capacity of the buffer is utilized, always storing the N most recent bytes.

This change resolves the unexpected data loss and makes the buffer behavior correct and predictable.
2025-08-10 12:10:16 +08:00
ThearchyHelios
6bb524eb31 Fix Darwin detection and URL 2025-08-10 11:33:33 +08:00
sakumisu
38499668bf update(cherryusb): update to v1.5.2
Signed-off-by: sakumisu <1203593632@qq.com>
2025-08-08 14:50:52 +08:00
沈洁
1ce9fa619a [bsp][update]stm32f103 bluepill 引脚接线图 2025-08-07 16:03:46 +08:00
bernard
fbdab95299 [Feature][Tools] Add support for package.json, refactor BuildPackage function to handle new format. 2025-08-07 09:32:45 +08:00
bernard
5c568f0280 [Tools] Update images 2025-08-07 09:32:45 +08:00
bernard
a65efe648c [Tools] Add documents for tools script; Add NG for tools 2025-08-07 09:32:45 +08:00
hydevcode
5347500f33 [BSP] 添加raspberry-rp2350适配 2025-08-06 19:44:03 +08:00
Pillar
b084503b6d [kernel] add UP scheduler critical switch flag. 2025-08-06 15:53:18 +08:00
Pillar
95ea2fc726 [bsp][etherkit] fix bug and enable high optimization. 2025-08-06 15:53:18 +08:00
cmbjxxiao
37d902537c [arm_compiler_v4/v5] define rt_packed as __packed #10553 2025-08-06 15:16:18 +08:00
liuyucai
83909b239f [Fix] <bsp>:gd32_uart_gpio_init 过早开中断触发断言rx_fifo == NULL
Solution: gd32_uart_gpio_init 不开中断
等驱动框架初始化好fifo后通过 device_control 开中断
Signed-off-by: Yucai Liu <1486344514@qq.com>
2025-08-06 14:16:27 +08:00
liuyucai
236e830b65 [update] <components>:finsh/shell.c
添加以下功能(需要kconfig使能FINSH_USING_WORD_OPERATION)
1 ctrl+back 按单词删除
2 ctrl+左右箭头 按单词切换光标

Signed-off-by: Yucai Liu <1486344514@qq.com>
2025-08-06 11:26:55 +08:00