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>
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>
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>
* 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>
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>
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>
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>
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>
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>
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>
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>
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>
* 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>