Commit Graph

17304 Commits

Author SHA1 Message Date
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
ligr
32e93ade4d [components/dfs]add doxygen comments for dfs sequence file in dfs_v2. 2025-08-04 09:55:01 +08:00
ligr
6015e149e7 [components/dfs]add doxygen comments for dfs_file.c in dfs_v2. 2025-08-04 09:49:45 +08:00
ligr
e143866eb8 [components/dfs]add doxygen comments for dfs_file_mmap.c in dfs_v2. 2025-08-04 09:48:12 +08:00
ligr
18c8c8b2f7 [components/dfs]add and optimize doxygen comments for dfs.c in dfs_v2. 2025-08-04 09:46:00 +08:00
Guorui Li
6a2dcd6a0b [components/dfs]add doxygen comments for dfs_fs.c in dfs_v2. #10538 2025-08-04 09:44:56 +08:00
ligr
8e18f354c5 [components/dfs]add doxygen comments for dfs pcache file in dfs_v2. 2025-08-03 10:53:26 +08:00
rcitach
ae50e406da 【SMART】【BSP】【allwinner】Fix smart serial_v2 bypass compile error issue (#10524)
* Modify the reference path of the header file in the middle section

* format

* Fix smart serial_v2 bypass compile error issue

* add allwinner/d1s ci
2025-08-01 20:59:08 +08:00
Guorui Li
d82dd71aef [bugfix][component/dfs] fix bugs for function _get_parent_path(). (#10539)
* [bugfix][component/dfs]1.Skip the trailing slash character failed. 2. Scenario that parent path is root is not considered.

* replace strdup() by rt_strdup().

* free memory after strdup().

* fix issue of not appending '\0' at end when parent path is root.
2025-07-31 17:36:28 +08:00
Huang YunKun
c55cbc5cf2 [BSP] 添加GD32E230开发板适配 (#10557) 2025-07-31 17:27:18 +08:00
Guorui Li
9f66b35874 [components/dfs]add doxygen comments for dfs_dentry.c in dfs_v2. (#10561) 2025-07-30 21:05:34 +08:00
Guorui Li
1662125a37 [components/dfs]add doxygen comments for dfs_vnode.c in dfs_v2. (#10563) 2025-07-30 21:03:42 +08:00
LeenixP
648e627696 [bsp][rockchip][rk3500]: update readme (#10565)
* rk3566 bsp:

* Add RK3566 Code (Forked from rt-thread/tree/master/bsp/rockchip/rk3500).
* Added to the original RK3566 documentation, more detailed usage instructions.

Signed-off-by: lipeng <lipeng.git@qq.com>
2025-07-30 19:39:03 +08:00
Yuqiang Wang
62f3fb4ce5 fix(kernel)/improve(utest):fix the legacy issue related to the length of the object name version #10537 2025-07-30 10:58:49 +08:00
ligr
dc89417229 [components/dfs]add doxygen comments for dfs_mnt.c in dfs_v2. 2025-07-30 09:43:52 +08:00
liuyucai
a1c642aa3a [Fix] <components>:drivers/can/dev_can.c 修复CAN底层无法工作时导致调用 _can_int_tx 的线程一直挂起的问题
Solution: 使用 can->status.sndchange 的bit位来表示某个发送邮箱超时
如果超时 底层驱动再通知tx_done或者tx_fail事件时不予处理

Signed-off-by: Yucai Liu <1486344514@qq.com>
2025-07-29 20:18:14 +08:00
dannyray019
c209173061 bsp: k230: add support for PWM driver
Added a PWM driver and a test file test_pwm.c.
The test uses PWM to control the LED brightness,
to check if the driver works correctly.

Signed-off-by: XU HU <1337858472@qq.com>
2025-07-29 15:48:08 +08:00
CYFS
95bd6854db fix gd32 dist bug 2025-07-28 10:12:57 +08:00
ChenRuiwei
f9564d4ee0 [pthreads] Fix pthread_cond_timedwait lacks timeout wakeup 2025-07-25 15:35:39 +08:00
ryancw
d23006ea4f [drivers][serial_v2] 修复dma下rx_flush的bug 2025-07-24 09:37:54 +08:00
Codeman-1999
7c0fed5d68 [components/libc] add comments for some pthread functions. #10423 2025-07-24 09:36:31 +08:00
Yulong Wang
ee1fe2024e [lwp][rv64] riscv: fix potential signal handler infinite loop 2025-07-23 09:39:17 +08:00
Yulong Wang
e7a40ae6ec [lwp][rv64] restore tp register in arch_thread_signal_enter to fix user-mode memory access 2025-07-23 09:38:35 +08:00
Chen Wang
3c046646cb doxygen: promote object management to a separate page
For "RT-Thread User Guide":
Take the "RT-Thread Kernel Object Model" sub-section out of
the "Kernel Basics" section and rename it to "Object Management".

Correspondingly, rename the "Kernel Object Management" section
in the "RT-Thread API Guide" to "Object Management".

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-07-22 18:07:17 +08:00
Chen Wang
895b272b69 doxygen: fix duplicated defgroup for clock
Problen:
Duplicated definition of group_clk in clk.c and clk.h.

Solution:
Delete the definition in clk.c and keep only the definition
in clk.h.

Also change the name of group_clk to group_driver_clock to
conform to the naming convention of other driver groups.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-07-22 16:00:33 +08:00
Chen Wang
2aebe694d9 doxygen: group name all in lowcase (part 2) (#10530)
* doxygen: fs: unify groupname to lowercase

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>

* doxygen: drivers: unify groupname to lowercase

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>

* doxygen: signal: unify groupname to lowercase

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>

---------

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-07-22 13:59:25 +08:00
CYFS
0441065193 [bsp][wch]:适配WCH RISC-V系列uart_v2驱动 (#10514)
[bsp][wch]:adapt wch risc serial_v2
2025-07-21 12:51:10 +08:00
rcitach
381d69ae54 Improvements serial_v2 2025-07-21 10:34:54 +08:00
RyanCW
cb2ec36fd0 [bsp][stm32][usart_v2] 优化usart_2驱动兼容性 (#10496) 2025-07-20 22:02:04 +08:00