4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-02-25 19:47:05 +08:00

16894 Commits

Author SHA1 Message Date
Chen Wang
5b6944f7fa
doxygen: More strict checks on build results (#10007)
Github CI doc_doxygen is very strict in checking the
build results, and will output failure even if there
are warnings.

In order to match CI's checks, local build scripts
are also checked more strictly to detect potential
errors and even warnings as early as possible.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-02-19 21:21:04 +08:00
Chen Wang
14cfc72fb8
doxygen: finsh: Normalize macro definitions (#10006)
Regular macro definitions according to [1].

Note: for variadic macros such as MSH_CMD_EXPORT, we can
not use normal @param command, otherwise doxygen will
report "@param is not found in the argument list of ...".
So I just write the parameters by manual.

Link: https://rt-thread.github.io/rt-thread/page_howto_macro.html [1]

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-02-19 21:06:45 +08:00
Yilin Sun
6a0909ac1a ports: nxp/mcx/mcxa/frdm-mcxa156: Fix GNU toolchain builds.
This patch modifies the original linker script provided by NXP by
adding RT-Thread related constant tables to flash.

Signed-off-by: Yilin Sun <imi415@imi.moe>
2025-02-19 15:18:02 +08:00
kurisaw
96772832f8 [drivers][bsp][reness] Add Etherkit bsp and RZ series driver compatibility adaptation 2025-02-19 13:07:20 +08:00
wumingzi
600e4ab517
Add recommanded script and extension for writing doxygen comments on … (#10001)
Add recommanded script and extension for writing doxygen comments on vscode

Signed-off-by: 1078249029 <1078249029@qq.com>
2025-02-19 09:06:15 +08:00
Kai
3251a126c1
[bsp][wch] move ch32v307 sdk to package (#9983)
* [bsp][wch] move ch32v307 sdk to package

* [bsp][wch] move ch32v307 sdk to package

* [bsp][wch] use a fixed version

* [bsp][wch]fix: ch32v307v-r1 build

* [bsp][wch] add yd board to ci

* [bsp][wch] revert toolchain path
2025-02-19 09:02:42 +08:00
Guorui Li
6a792c9df2
[lwp]add comments for lwp system calls. (#9934) 2025-02-18 19:51:10 +08:00
heyuanjie87
4b25b5ed9a
[lwp]检查killpg的signo参数的有效性 (#9981)
* [lwp]对检查killpg的signo参数的有效性
2025-02-18 14:33:56 +08:00
Rbb666
91beec4239 [ulog]Fix the problem of file_buf being released incorrectly 2025-02-18 14:31:03 +08:00
蒙蒙plus
a313d12ea0
[tools/iar] iar.py fix scons --target=iar --dist (#9997)
#9996
2025-02-18 09:16:18 +08:00
Supper Thomas
5b3320624d
[src/ktime] fix the bug when use keil AC6 and open RT_USING_HOOKLIST … (#9993)
* [src/ktime] fix the bug when use keil AC6 and open RT_USING_HOOKLIST and RT_USING_KTIME
2025-02-16 22:02:42 +08:00
Chen Wang
c40b79037c
doxygen: add prefix for groups (#9991)
* doxygen: add prefix for groups

Add "group_" prefix to doxygen group names. This makes
it easier to grep with group name later.

This patch only modifies the groups defined in the pathes
of INPUT of documentation/Doxyfile:

INPUT = . \
        ../src \
        ../include \
        ../components/finsh \
        ../components/drivers/include/drivers \
        ../components/drivers/clk \
        ../components/dfs/dfs_v2/src \
        ../components/dfs/dfs_v2/include

Other groups are not touched.

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

* ci: fixed error report when run file_check.py

Such as:
- "please delete extra space at the end of this line."
- "the RT-Thread error code should return negative value. e.g. return
  -RT_ERROR"

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

---------

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-02-15 12:15:19 +08:00
Chen Wang
f6f7d91a61
doxygen: add prefix for page name (#9989)
Add prefix "page_" to the name of pages.

Add this as a rule in guide of writing doxygen documents.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-02-13 23:28:19 +08:00
Chasel
d8079e3843
[bsp][mm32f526x] 1.fix adc device; (#9978) 2025-02-12 14:26:35 +08:00
cxs
70982aea87 [bsp][stm32f103c8t6 bule pill] fix the problem that is The linked list obtained by calling rt_object_get_information is empty, so the system cannot get up. 2025-02-11 18:59:46 -05:00
Li-Dongze
3a9a24fabf
ci: add qemua9 yml file (#9986) 2025-02-11 19:51:54 +08:00
Chen Wang
761bb89f27 doxygen: add documentation for doxygen
Documentation is provided to clarify how to write
doxygen documentation for RT-Thread. This document
is also integrated as part of RT-Thread doxygen
documentation.

An example is also provided.

The original README.md is removed and integrated into
this document.

Updated github actions for doxygen too.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-02-11 17:09:44 +08:00
GuEe-GUI
74f43edd6c [DM/THERMAL] Remove unused code in update poll
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-02-11 14:58:18 +08:00
GuEe-GUI
aaf18e497c [DM/LED] Rename LED register/unregister
rt_hw_* is use for DM and not DM, but LED only use in DM.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-02-11 14:58:18 +08:00
GuEe-GUI
f506076281 [DM] Replace spinlock static init by RT_DEFINE_SPINLOCK
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-02-11 14:58:18 +08:00
GuEe-GUI
f20e8973be [DFS/ISO9660] Remove warning for ops
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-02-11 14:58:18 +08:00
GuEe-GUI
5a455cb615 [DM/PIN] Reset the value of PIN_NONE
PIN_NONE is '-1', is similar to '-RT_ERROR',
'-RT_EEMPTY' is better.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-02-11 14:58:18 +08:00
GuEe-GUI
578cfc0b2a [DM/CORE] Add IDA init in runtime
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-02-11 14:58:18 +08:00
GuEe-GUI
d41a0351db [AARCH64] Update kernel's boot link for ARM64
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-02-11 14:58:18 +08:00
GUI
1564735b5c
[DM/SPI] Make CS pin config fixed in system (#9977)
Make a max CS pin value (16) for SPI, that will not
alloc `*cs_pins` by malloc, because drivers call
`rt_device_unregister` may not free item.

Fixup the QSPI init configure member in DM mode.

Make SoC Kconfig import easy.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-02-11 14:54:59 +08:00
Rbb666
f820c1948a
[drivers/spi]修复spi configure会执行两次的问题 (#9972)
* [drivers/spi]修复spi configure会执行两次的问题
2025-02-11 13:04:31 +08:00
Supper Thomas
21ea7c675c 更新 bsp_buildings.yml 2025-02-11 10:59:41 +08:00
Chen Wang
4edfa4895c ci: remove spell_check
We often get wrong report when documentation related are
changed, such as:

```
Getting action download info
Error: This request has been automatically failed because
it uses a deprecated version of `actions/download-artifact: v3`.
Learn more: https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/.
This request has been automatically failed because it uses
a deprecated version of `actions/upload-artifact: v3`.
Learn more: https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/
```

Just remove this action till now.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-02-10 18:12:12 +08:00
GuEe-GUI
12fded19f5 [DM/FDT] Fixup earlycon loss old messages.
The `rt_fdt_scan_chosen_stdout` will init fdt_earlycon data
without `msg` only, the `msg_idx` should not clean, too.
Because we check if have old messages by `msg_idx`

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-02-10 15:55:54 +08:00
heyuanjie87
d3d33ff983
[dfs]mmap的文件在关闭后释放file指针 (#9917)
* [dfs]mmap的文件在关闭后释放file指针
2025-02-09 15:55:30 +08:00
Rbb666
d83d71cc05 [drivers/spi]统一软件SPI配置 2025-02-09 15:48:49 +08:00
heyuanjie87
6e3c9acd39 [lwp]修正kill(pid < -1)时的返回值错误 2025-02-08 14:32:20 +08:00
Rbb666
a63b97e316
[bsp][nxp]support FRDM-MCXA156 (#9971)
support FRDM-MCXA156

Co-authored-by: shannon <xxlong1999@163.com>
2025-02-07 09:45:56 +08:00
Rbb666
8629c9572a
[action]add online packages checking in rt-spark. (#9969) 2025-02-05 00:07:13 +08:00
Chen Wang
a77a86d6b2 bsp: cvitek: fix build error for aarch64
This patch fixed the error "bash: mksdimg.sh: No such file
or directory" when building cv18xx_aarch64.

The issue is introduced by commit "bsp: cvitek: removed
useless files after using rttpkgtool".

In addition, in order to unify the logic with riscv as much
as possible, the name of the "milkv-duo256m" directory under
cv18xx_aarch64 is uniformly changed to "duo256m".

This patch also improve the README, adding instructions to
install xz-utils.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-02-03 21:54:57 -05:00
Chasel
94952b18fc
[bsp][mm32f526x] 1.add mm32f526x bsp; (#9940)
[bsp][mm32f526x] 1.add a bsp for mm32f526x;
2025-02-03 23:29:27 +08:00
Kai
562e15b118
[bsp][stm32]Add an STM32H730 Board (#9962)
* Add an STM32H730 bsp
2025-02-03 21:04:49 +08:00
Kai
2fdb9381bb
ci: fix dep miss (#9965) 2025-02-03 16:42:49 +08:00
Supper Thomas
0cc4dc4a3d
[action] add ci menuconfig check (#9961) 2025-02-01 12:39:22 +08:00
qilian
ffe25c58b9
Update README.md (#9959)
Fixed the issue where the absence of the u-boot-tools package caused rttpkgtools to fail to compile normally.
2025-01-30 20:15:18 +08:00
BernardXiong
cfb44d1f7f [tools] Add requirements.txt for python packages
Add requirements.txt for python packages installation.
2025-01-29 20:56:23 -05:00
Chen Wang
c66374705a libcpu: riscv: rv64: fixed warnings
When building bsp/cvitek/c906_little, compiler reports:

```
.../rt-thread/libcpu/risc-v/rv64/trap.c:
In function 'handle_trap':
.../rt-thread/libcpu/risc-v/rv64/trap.c:106:13:
warning: implicit declaration of function 'rt_hw_tick_isr';
did you mean 'rt_hw_stack_init'? [-Wimplicit-function-declaration]
  106 |             rt_hw_tick_isr();
      |             ^~~~~~~~~~~~~~
      |             rt_hw_stack_init
.../rt-thread/libcpu/risc-v/rv64/trap.c:110:13:
warning: implicit declaration of function 'rt_hw_irq_isr';
did you mean 'rt_hw_soft_irq_isr'? [-Wimplicit-function-declaration]
  110 |             rt_hw_irq_isr();
      |             ^~~~~~~~~~~~~
      |             rt_hw_soft_irq_isr
```

rt_hw_tick_isr()/rt_hw_irq_isr() are implemented by bsp, but
libcpu/risc-v/rv64 doesn't declare them, so compiler warns.

There are three BSPs using 'rv64' (libcpu/risc-v/rv64):
- `bsp/cvitek/c906_little/rtconfig.py`
- `bsp/juicevm/rtconfig.py`
- `bsp/k210/rtconfig.py`

`handle_trap` in `libcpu/risc-v/rv64` is defined as weak.
BSP can use this function directly or define and overload
it by itself.
If bsp use this function directly, bsp need to pay
attention to the fact that three functions will be called
in this function:

- `rt_hw_soft_irq_isr`
- `rt_hw_tick_isr`
- `rt_hw_irq_isr`

In `libcpu/risc-v/rv64`, `rt_hw_soft_irq_isr` has a weak
definition, while the other two do not. This means that
if the bsp does not overload `handle_trap`, bsp must
define `rt_hw_tick_isr` and `rt_hw_irq_isr` itself.
This is also the practice of `bsp/cvitek/c906_little`.
There is also a similar bsp `bsp/k210`, and the form of
`bsp/juicevm` implements `handle_trap` by itself.

It seems that `rt_hw_tick_isr` and `rt_hw_irq_isr` are
not required to be implemented by all BSPs using
`libcpu/risc-v/rv64`. The premise for BSP to implement
them is that it does not overload `handle_trap`. So
declaring `rt_hw_tick_isr` and `rt_hw_irq_isr` with
extern in `libcpu/risc-v/rv64` is not proper.

In addition, the `rt_hw_tick_isr/rt_hw_irq_isr` are only
used by `libcpu/risc-v/rv64`, so it is not worth putting
the declaration in `./include/rthw.h`.

Sum up, the best solution is to add weak definition to
`rt_hw_tick_isr/rt_hw_irq_isr` as existing `rt_hw_soft_irq_isr`.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-01-29 20:28:38 -05:00
Chen Wang
2dfbae2853 libcpu: riscv: common: fixed build warnings
When building bsp/cvitek/c906_little, compiler warns:

```
.../rt-thread/libcpu/risc-v/common/trap_common.c:
In function 'rt_hw_interrupt_install':
.../rt-thread/libcpu/risc-v/common/trap_common.c:50:11:
warning: unused variable 'user_param' [-Wunused-variable]
   50 |     void *user_param = param;
      |           ^~~~~~~~~~
.../rt-thread/libcpu/risc-v/common/trap_common.c:
In function 'rt_rv32_system_irq_handler':
.../rt-thread/libcpu/risc-v/common/trap_common.c:77:25:
warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   77 |         s_stack_frame = (rt_hw_stack_frame_t *)mscratch;
      |                         ^
```

Fixed these warnings as per indication from gcc.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-01-29 20:28:38 -05:00
Chen Wang
3383352cdc bsp: cvitek: c906_littel: fixed build warnings for board.c
When building bsp/cvitek/c906_little, compiler warns:

```
board/board.c: In function 'rt_hw_board_init':
board/board.c:26:5: warning: implicit declaration of
function 'rt_hw_tick_init'; did you mean 'rt_hw_stack_init'?
[-Wimplicit-function-declaration]
   26 |     rt_hw_tick_init();
      |     ^~~~~~~~~~~~~~~
      |     rt_hw_stack_init
board/board.c:29:5: warning: implicit declaration of
function 'rt_hw_uart_init'; did you mean 'rt_hw_board_init'?
[-Wimplicit-function-declaration]
   29 |     rt_hw_uart_init();
      |     ^~~~~~~~~~~~~~~
      |     rt_hw_board_init
```

To remove these build warnings, include header files
which declare these functions.

Plus, remove the decalartion of `tick_isr()`, this
function does not exist.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-01-29 20:28:38 -05:00
kaidegit
d0fcb08611 [bsp][doc]use the default mpu conf of cubemx 2025-01-29 20:28:08 -05:00
yekai
b3bf4c6c3b [bsp][doc] add PeriphCommonClock_Config and MPU_Config 2025-01-29 20:28:08 -05:00
wumingzi
6481633ec6
[doxygen] add doxygen comment for clk.c and clk.h (#9950)
Accroding to #9947 and #9424, adding doxygen comment for function in .c files and data structure, macro in .h file is a solution.For this pr, I encountered problem following situations.
    - rt_clk_unprepare function return value type is different from rt_clk_ops so I change type of rt_clk_unprepare and its dependencies.
    - clk_get function may be similar as rt_clk_unprepare but I'm not sure so not modify.
    - clk_release implements may be incomplete, so I just marked in comment.

Signed-off-by: 1078249029 <1078249029@qq.com>
2025-01-27 15:54:13 +08:00
CYFS
599cefe834
[components][drivers]:fix spi bug and add software spi (#9944)
* fix:spi bus issue

* [components][drivers]add software SPI bus support
2025-01-27 08:35:11 +08:00
Supper Thomas
9be28dbc67 [tools/mdk5] 如果本地设置了UV4.exe 命令,则进行MDK编译 2025-01-26 11:34:50 -05:00
Chen Wang
40f3b6a569
doxygen: create framework to unify markdown and source code part (#9946)
* doxygen: adjust documentation directory structure

- Rename documentation/doxygen to documentation/0.doxygen and cleanup
  some unused files.

- Add/rename folders for each sub sections, such as
  1.introduction/...... Each sub section will be created as a subpage.

- Generate initial Doxyfile, this Doxyfile will be used to unify
  doxygen generated API documents and those markdown files under
  documentation folder. This patch just add the default Doxyfile
  generated by running "doxygen -g". It is used as baseline to add
  more features/configurations.

- Rename documentation/README.md to documentation/INDEX.md, and
  use it as mainpage.

- Move 0.doxygen/readme.md to documentation/README.md.

* doxygen: update configurations

These configurations are from old documentation/doxygen/Doxyfile.
Try best to compatible exixting design.

* doxygen: add run script

Add a script to automatic some operations.

Updated the README.md.

---------

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Co-authored-by: Supper Thomas <78900636@qq.com>
2025-01-26 11:44:39 +08:00