- 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>
CID 1309501: (#1 of 1): Overflow constant (INTEGER_OVERFLOW)
overflow_const: Expression upper->crefs, which is equal to 255, where enable ? 1 : -1 is known to be equal to -1, overflows the type that receives it, an unsigned integer 8 bits wide.
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
Adding source files to the fdcan branch based on identical register set. These files should mostly just work.
Removed references to FDCAN3. H5 only has 2 FDCAN interfaces.
Add basic FDCAN Kconfig
FDCAN Kconfig options
Added various options for FDCAN mode, FDCAN bitrate, clock selection and division, and timing.
Added bit timing config options (nominal and data). Added stm32h56xxx pin mappings.
Fixed Data Bit Timing. Pulled in STM32H5_FDCAN_PDIV_VALUE. Added stm32_fdcan.c to Make.defs. Added DBITRATE to Kconfig
Clock source changes to FDCAN
Moved the setting of the clock source to the stm32h5xx_rcc.c file. Added notes to stm32_fdcan.c that STM32_FDCAN_FREQUENCY and STM32_FDCAN_PDIV should be set in board.h
Change STM32H5_FDCAN_PDIV to STM32_FDCAN_PDIV
Updated Kconfig to match G4 implementation. Removed stm32_fdcan_sock for now.
Removed FDCAN3 from stm32_fdcan.h
incomplete changes for bit timning
Set NBRP and DBRP registers based on STM32H7 FDCAN socket algorithm.
Added board file for initializing 1 can device. Will update later to initialize second device.
Fixed ifdefs. Changed STM32 to STM32H5.
Add some can testing changes.
Added option to configure bit timing, with automatic bit timing set as default.
Style fixes
Fixed FDCAN2 and memory access issues
FDCAN2 msgram offset was wrong by 1 word (4 bytes). I removed the + 4 at the end of the definition. This fixed the issues with fdcan2. Also changed ifdefs when setting ESI, FDF, and BRS bits. When CAN FD was used, this resulted in the first command after the endif (the setting of dest at line 2325) being skipped because it was included in the else block when it shouldn't have. This resulted in exceptions. Adjust ifdefs fixes this problem. Other minor fixes.
Restoring board files to upstream versions. These files will be pulled in later in a separate pull request. stm32h5_fdcan_test branch created for this.
Fixed Queue Mode Transmit
The can driver checks the TFFL bits in the TXFQS register. In Queue mode, this always returns 0. As a result, fdcan_txempty was always returning false, which resulted in no transmissions. This code fixes that.
Add stm32h5 fdcan chardriver to Make.defs
Nxdiag examples scripts modified to print system information
without building and flashing nxdiag application to get report
about system without reflash or reconfigure.