If thread 1 is executing kasan_unpoison but a scheduling occurs and the block is trampled upon, the displayed backtracking may still be from the previously allocated backtracking
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
vhost/vhost-rng.c:154:9: error: too few arguments to function 'virtio_create_virtqueues'
154 | ret = vhost_create_virtqueues(hdev, 0, 1, vqnames, callback);
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
vhost/vhost.c: In function 'vhost_status_driver_ok':
vhost/vhost.c:86:20: error: too few arguments to function 'virtio_get_status'
86 | uint8_t status = vhost_get_status(hdev);
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
This generates gnu-elf.ld via preprocessing of gnu-elf.ld.in so
that to reduce board specific app linker scripts in kernel mode
when BINFMT_ELF_EXECUTABLE is enabled.
Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
This allows the header file to be useful from non-C sources such as
assembly code or linker scripts.
Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
Added support for using timers with ADCs. Updated Kconfig to support TRGO2, although driver support for TRGO and TRGO2 not developed yet. Updated hardware/stm32_tim.h with missing CCER bits needed for compilation.
The zlib compression functions are used in network utilities
for compression/decompression. These functions need to be added to
the nxstyle white list to prevent style checking errors since they
follow the zlib naming convention rather than NuttX's style guide.
Specifically, these functions are used in:
- apps/netutils/telnetc/telnetc.c for compressed data handling
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Changed the LLVM architecture type from thumbv7 to thumbv7a in
Toolchain.defs to better match the ARMv7-A architecture specification.
This change ensures proper code generation and optimization for
Cortex-A series processors when using the Thumb instruction set.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Make sure that the cdcacm is disconnected before the usbdev gets unregistered.
Also, check if the device is connected or not in cdcuart_txempty (uart_txempty). Otherwise there may be a crash during uart_tcdrain, called in tty close path, if the usbdev unregistration happens during the loop.
This issue can be triggered by monitoring the cable connection status in one thread, sending BOARDIOC_USBDEV_DISCONNECT if the usb cable is detached. In another thread close the ttyACM.
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
Added LLVM-specific configuration variables to ARM architecture CMake files:
- LLVM_ARCHTYPE for architecture variant (thumbv6m, thumbv7a, etc)
- LLVM_CPUTYPE for CPU target (cortex-m0, cortex-a5, etc)
- LLVM_ABITYPE for ABI (eabi/eabihf)
These changes enable LLVM/Clang toolchain support while maintaining
compatibility with existing GCC configurations. The LLVM variables
are set based on the same architecture/CPU/FPU configurations used
for GCC flags.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Reformatted the FPU options table to use a clearer markdown-style table format
with proper alignment and column headers. Added visual separators (~~~) to make
the table stand out from surrounding code. Improved consistency in column widths
and fixed line wrapping for better readability.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Used the STM32H7 as a reference.
Removed APB enabling from stm32h5xx_rcc.c. This is done in timer initialization, like STM32H7.
Also removed LPTIM. Will add later.
tim_lowerhalf: Timers 9, 10, and 11 removed. Timers 15,16, and 17 added.
Removed low-power timers from Kconfig. Not implemented yet.
Style Updates
Added stm32_tim_enable and stm32_tim_disable to Timer operations.
The method is the same as the method of saving the current DAIF state of the thread
It will pave the way for the future implementation of hwasan's memory management
Allows each thread to independently control the mte switch function
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
- Replace direct string comparisons with regex pattern matching for ARCHCPUEXTFLAGS
- Change from using LLVM_CPUFLAGS list to setting LLVM_CPUTYPE directly
- Simplify CPU type detection logic while maintaining same functionality
- Use more consistent string variable naming convention
This change makes the CPU type detection more flexible and maintainable
while keeping the same behavior for supported RISC-V configurations.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
when accept conn timeout, only accept conn itself should handle the event
(send TCP_RESET), and there is no need to notify the listening conn.
otherwise, the server's poll will return with POLLERR and POLLHUP.
this may cause some applications to execute incorrect logic in the future.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit cleans up redundant header file includes throughout the codebase.
The changes include:
- Removing duplicate #include directives that were present in the same file
- Consolidating includes that were split across multiple lines unnecessarily
- Removing unused includes that were no longer needed
- Fixing some formatting issues with includes
The changes improve code organization and maintainability by:
- Reducing unnecessary dependencies
- Making include dependencies more explicit
- Following consistent include patterns
- Removing dead code
No functional changes are made - this is purely a code cleanup commit.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Add a new guide documenting how to integrate Rust with NuttX, including:
- Prerequisites and supported platforms
- Setup instructions for Rust toolchain
- Required NuttX configurations
- Example build and run instructions for RISCV32 target
The guide provides an experimental but working example of running
a Rust application on NuttX using the rv-virt:nsh board.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Raise compilation error when I2C configuration is invalid.
It's better to catch invalid clock configuration during compilation instead of
producing binary that doesn't work as expected anyway.
Signed-off-by: raiden00pl <raiden00@railab.me>
Use findstring instead of direct equality checks for LLVM_CPUTYPE
conditions to better handle ARCHCPUEXTFLAGS that may contain additional
ISA extensions. This makes the CPU type detection more robust when
dealing with extended instruction sets while still ensuring the required
base ISA extensions are present.
For example, ARCHCPUEXTFLAGS="imc_zicsr_zifencei" will now correctly
match as sifive-e20 rather than failing the exact match check.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This patch refactors the CPU index handling in the RISC-V architecture to be based on the ARCH_RV_CPUID_MAP configuration.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
In the file stm32g474xxxx_rcc.c, the enable PLL
code, according to the intent of the comment,
wants to keep the reserved bit, but the code
clears the reserved bit.
Signed-off-by: jerryslhao <jerryslhao@gmail.com>