| Age | Commit message (Collapse) | Author |
|
|
|
(#10033)
* 修复Kconfig中由RTT_DIR路径错误引起的无法编译问题
* 添加k230的ci检查
* revert Update bsp_buildings.yml
---------
Co-authored-by: Supper Thomas <[email protected]>
|
|
* [bsp][wch]to clear the serial of ch32v20x
* [bsp][wch] move ch32v20x sdk to pkg
* [ci] add ch32v208 bsp
* [bsp][wch] update readme
|
|
Signed-off-by: Shell <[email protected]>
|
|
This commit introduces a page poison debugging mechanism and additional
assertions for memory management, improving system maintainability and
debugging capabilities. The changes aim to detect illegal memory usage
early and provide better clarity in managing page allocations.
Changes:
- Added `RT_DEBUGGING_PAGE_POISON` option to enable memory usage tracing.
- Introduced a page poisoner for detecting illegal memory usage.
- Implemented region-based memory tracking using bitmaps.
- Enhanced spinlock protection for memory management operations.
- Fixed several assertion checks for memory safety.
- Renamed macros for consistency (`FLOOR` to `CEIL`).
- Refined memory allocation and deallocation logic to include poisoning.
- Updated Kconfig to add configurable `RT_PAGE_MAX_ORDER` and poison debugging.
- Improved debugging outputs for page regions and memory operations.
Signed-off-by: Shell <[email protected]>
|
|
This patch refactors the `rt_page_install` function by delegating specific
operations to new helper functions. Besides, the contiguous page regions
are now separated to segments of fixed size. The goal is to improve the
overall code readability, enhance modularity, and ensure better handling
of page installation logic through clearer separation of concerns.
Changes:
- Introduced `_get_mpr_ready_n_install` to encapsulate memory preparation
and page installation logic.
- Added `_update_region_list` for updating the installed page registry.
- Defined `_PAGE_STRIPE` for optimized region processing.
- Modified `rt_page_install` to handle regions in smaller chunks using
helper functions for better maintainability.
- Improved locking mechanisms with `rt_spin_lock` for thread safety.
- Reduced code duplication and clarified shadow region calculations.
Signed-off-by: Shell <[email protected]>
|
|
This patch introduces a tagged pages allocator to address the existing problems
of page aliasing on specific platforms and the requirement of page coloring.
It implements an affinity-id aware page manager by separating the runtime page
list into two types: a normal single linked-list and a multi-dimensional affinity-list.
Changes:
- Introduced tagged pages allocator and managing algorithm for affinity pages list
- Modified components to support affinity-id list management
- Updated page allocation and freeing functions to handle tagged pages
- Added configuration options for page affinity block size and debugging
- Modified mmap and elf loading to respect affinity settings
- Enhanced page list management to support multi-dimensional affinity-list
Signed-off-by: Shell <[email protected]>
|
|
优化SPI写外部FLASH慢的问题 (#10009)
* 1. 优化中断中打印日志问题;2 优化SPI写外部FLASH慢的问题
* 2. 在spi驱动中有在中断中打印调试信息的问题,增加ISR log判断进行
* 3. spi+DMA 写外部flash,由于spi速度很快,不进行delay就可以;同时,仿照Linux的驱动框架进行优化,数据小不使用DMA
|
|
* [lwp/riscv]修正用户态参数空间占用堆空间的问题
|
|
因为板载调试器为cmsisdap
|
|
fix:frdm-mcxa156 scons --dist err
|
|
|
|
description: Using the vector instruction set to trigger
an illegal instruction exception when ARCH_SISCV_VECTOR=y.
analysis: When initializing the thread stack,
the rt_cw_stack_init function did not enable VS for SSTATUS.
Solution: When ARCH_SISCV_VECTOR=y,
increment the initial value of sstatus by 0x600(SSTATUS_VS).
Signed-off-by: Liu Gui <[email protected]>
|
|
|
|
[Problem Description]
1. When enabling RT_USING_MODULE=y, compilation warnings occur:
dlelf.c:386:27: warning: cast from pointer to integer of different size
dlelf.c:398:25: warning: cast from pointer to integer of different size
dlelf.c:408:24: warning: cast from pointer to integer of different size
2. On RV64 architectures (e.g. Sophgo SG2042 with RISC-V Sv39 and 40-bit physical addressing),
dlsym may fail when accessing addresses beyond 32-bit range.
[Root Cause]
In dlmodule_load_relocated_object() and dlmodule_symbol_find(),
pointer is cast to rt_uint32_t which truncates:
| rt_ubase_t rodata_addr = (rt_uint32_t)ptr;
This causes:
- Warnings on 64-bit systems (pointer width > 32-bit)
- Actual address truncation on RV64 when physical address exceeds 32-bit
[Solution]
Replace rt_uint32_t with architecture-adaptive rt_ubase_t:
| rt_ubase_t rodata_addr = (rt_ubase_t)ptr;
The rt_ubase_t is defined in include/rttypes.h as:
| #ifdef ARCH_CPU_64BIT
| typedef rt_uint64_t rt_ubase_t;
| #else
| typedef rt_uint32_t rt_ubase_t;
| #endif
This ensures correct width casting for both 32/64-bit architectures.
Signed-off-by: Liu Gui <[email protected]>
|
|
This patch:
* Enables SPI support
* Adds RW001 driver example
* Increases heap size to 32kB.
Signed-off-by: Yilin Sun <[email protected]>
|
|
- added tools and dist_handle function
Signed-off-by: Fan YANG <[email protected]>
|
|
[Problem Description]
When assigning name to rt_object, strncpy() uses size equal to RT_NAME_MAX,
which causes missing null-terminator and overflows into adjacent 'type' field.
This corruption leads to unexpected system behavior.
[Problem Analysis]
The rt_object structure defines:
| char name[RT_NAME_MAX] | -> buffer
| rt_uint8_t type | -> adjacent field
Original code calculates size as:
size = end - first + 1;
if (size > RT_NAME_MAX) size = RT_NAME_MAX;
When size equals RT_NAME_MAX, strncpy() will copy exactly RT_NAME_MAX bytes
without adding terminating '\0', causing two issues:
1. name buffer is not null-terminated
2. The implicit null-byte writes beyond name[] into type field
[Solution]
Change boundary check from:
if (size > RT_NAME_MAX) size = RT_NAME_MAX;
to:
if (size >= RT_NAME_MAX) size = RT_NAME_MAX - 1;
This ensures:
1. Always leaves space for null-terminator
2. Prevents overflow into type field
3. Maintains maximum valid name length (RT_NAME_MAX-1 + '\0')
Signed-off-by: Liu Gui <[email protected]>
|
|
MCXA153 does not support CMSE (Secure Extension). Remove it from Kconfig.
Minor: Fixed a typo in Kconfig which makes Kconfig fail on
case-sensitive operating system.
Minor: Fixed a Kconfig defined incorrect SOC name
(SOC_MCXN947 -> SOC_MCXA156)
Signed-off-by: Yilin Sun <[email protected]>
|
|
MCXA156 does not support CMSE (Secure Extension). Remove it from Kconfig.
Minor: Fixed a typo in Kconfig which makes Kconfig fail on
case-sensitive operating system.
Signed-off-by: Yilin Sun <[email protected]>
|
|
MCXA156 series supports FPU and DSP, adding corresponding compiler
flags.
Signed-off-by: Yilin Sun <[email protected]>
|
|
|
|
Add LED blinking demo to align with other BSPs.
Signed-off-by: Yilin Sun <[email protected]>
|
|
Enable PORT and GPIO peripheral clocks and release resets for all
ports.
Signed-off-by: Yilin Sun <[email protected]>
|
|
This patch modifies the original linker script provided by NXP by
adding RT-Thread related constant tables to flash.
Signed-off-by: Yilin Sun <[email protected]>
|
|
adaptation
|
|
* [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
|
|
|
|
* [lwp]对检查killpg的signo参数的有效性
|
|
|
|
#9996
|
|
fix: 修复星火一号看门狗驱动使能失败问题
|
|
* [src/ktime] fix the bug when use keil AC6 and open RT_USING_HOOKLIST and RT_USING_KTIME
|
|
* 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 <[email protected]>
* 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 <[email protected]>
---------
Signed-off-by: Chen Wang <[email protected]>
|
|
Add prefix "page_" to the name of pages.
Add this as a rule in guide of writing doxygen documents.
Signed-off-by: Chen Wang <[email protected]>
|
|
|
|
obtained by calling rt_object_get_information is empty, so the system cannot get up.
|
|
|
|
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 <[email protected]>
|
|
Signed-off-by: GuEe-GUI <[email protected]>
|
|
rt_hw_* is use for DM and not DM, but LED only use in DM.
Signed-off-by: GuEe-GUI <[email protected]>
|
|
Signed-off-by: GuEe-GUI <[email protected]>
|
|
Signed-off-by: GuEe-GUI <[email protected]>
|
|
PIN_NONE is '-1', is similar to '-RT_ERROR',
'-RT_EEMPTY' is better.
Signed-off-by: GuEe-GUI <[email protected]>
|
|
Signed-off-by: GuEe-GUI <[email protected]>
|
|
Signed-off-by: GuEe-GUI <[email protected]>
|
|
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 <[email protected]>
|
|
* [drivers/spi]修复spi configure会执行两次的问题
|
|
|
|
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 <[email protected]>
|