The original method of packaging and burning kernel
depends on installing the K230 RTOS SDK. It is quite
cumbersome. Now the relevant logic is extracted and
a small tool rttpkgtool is created to package the
rtthread.bin.
Considering that rttpkgtool still needs to compile
opensbi when packaging k230, which means that a
separate cross-toolchain needs to be installed.
Therefore, in order not to affect the CI operation,
the current packaging logic is not integrated into
POST_ACTION in rtconfig.py, but requires kernel
developers to run the build script separately for
packaging.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
The original code used immediate values directly when it
came to memory layout, which was not a good programming
habit.
Now we use macros and try to be compatible with SDK
configuration values in the SDK compilation environment.
The main changes are to clean up board.h, and extract
some memory layout constants to define a new header
file mem_layout.h.
Also update KERNEL_VADDR_START to the default value for
Smart, so we can use it as base to calculate other mapping
address.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
For linker script, use constant macro defined from
rtconfig.h, not immediate value.
Also cleanup the link_statksize.lds, it is also not
needed when using new mechanism.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Some changes to support canmv board, such as:
- Address constant, some may need be set as configuration later.
- link script
- build script
Signed-off-by: Wang Chen <unicorn_wang@outlook.com>
Regarding link script, some memory offsets and sizes are different
between the standard version and the smart version (such as
"__STACKSIZE__", kernel start address, kernel memory size, etc.).
Original solution is replacing link scripts and use INCLUDE,
which is relatively complicated.
This improvement uses macros to replace constants in the link
script. The preprocessing mechanism provided by gcc is used
to dynamically replace constant values during the build process.
In addition, the kernel load address (the corresponding
KERNEL_VADDR_START for smart) was originally configured as
0xFFFFFFC000200000, which is default value of riscv with
kernelmap enabled (0xffffffc000000000) plus offset to skip over
bootloader (0x200000). This caused a trouble: due to
default bsp configuration is for smart, if we switched to the
standard version and build, and then switched back to the smart
version, the value of KERNEL_VADDR_START will be default back to
0xffffffc000000000, which is different from the original configuration
value, resulting in the need to manually reconfigure it, which
is easy to forget and cause problems.
The current solution is to use the default value
0xffffffc000000000 in the configuration. Add offset to the code
and link script when using it.
This patch update the default .config and rtconfig.h for cv18xx_riscv.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
include :rtdef.h : [ Refine the annotation of RT_ALIGN and RT_ALIGN_DOWN ]
This macro is vulnerable to non-2-byte alignments,
but I assume that the macro definition was designed with an explicit use case of 2-byte alignments in mind.
Therefore, I only modify the comment to remind the user.
Solution:
RT_ALIGN(size, align) ((size) + (align) - 1) / (align) * (align)
RT_ALIGN_DOWN(size, align) (size) / (align) * (align)
Here's what deepseek recommends more.
Signed-off-by: Yucai Liu <1486344514@qq.com>
Match the organization of modules (groups) with
that of user guide.
Preliminary arrangement. This patch is just a
framework arrangement. Details need to be continued.
P.S., in this patch, adding numerical prefixes to
the files in documentation/0.doxygen is to meet the
need of displaying sorting in HTML pages.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Fix garble caused by empty implementation of earlycon series
function in driver.If driver doesn't offer earlycon_id or rt_f
dt_earlycon_id.setup function but open option, the checking
of best_earlycon_id will failed.
Signed-off-by: 1078249029 <1078249029@qq.com>
This patch contains two small changes, mainly to
prepare for the next step of organizing the modules
framework.
The first change: move the files related to doxygen
examples to `documentation/0.doxygen/example/`
The second change: delete `documentation/0.doxygen/mainpage.h`,
which is the mainpage of the old page. Now the new mainpage
is `documentation/INDEX.md`, so the duplicate can be
deleted.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>