We don't need to subtract the block size; we only need to determine if it's within the interrupt memory range.
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
The -D_FILE_OFFSET_BITS=64 parameter is missing
during the CMake compilation of the sim (simulator) build,
which causes incorrect version invocations of interfaces
such as hostfs_stat.
Signed-off-by: guohao15 <guohao15@xiaomi.com>
This reverts commit 29e50ffa73.
reason:
Placing the main thread and the gourd in the same memory block, and allocating and freeing memory simultaneously, presents the following two problems:
When the main thread creates a child thread and performs a detach operation, there is a possibility that the main thread may have exited, but the main thread's TCB (Transaction Control Block) may not have been released.
This could potentially cause the main thread's TCB to be double-freed. The core contradiction in this problem lies in binding the main thread's TCB (Trust Container Registry) and the group together. When releasing the main thread's TCB, an additional check is needed to ensure the main thread was the last to leave the group. If this check and the free operation are atomically guaranteed, the logic is sound, and double freeing won't occur. However, this atomicity cannot be completely guaranteed. If other free operations cause a block, problems still arise.
Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
when C++ lib has an atomic implementation, we shouldn't include NuttX defined macros to avoid conflicts
Fix errors like:
build/include/libcxx/__atomic/atomic.h:445:1: error: expected identifier before numeric constant
445 | atomic_fetch_add(volatile atomic<_Tp>* __o, typename atomic<_Tp>::difference_type __op) _NOEXCEPT
| ^~~~~~~~~~~~~~~~
Signed-off-by: raiden00pl <raiden00@railab.me>
Userled register path shouldn't depend on LED example.
This dependency is broken, kernel code should not depend on apps code.
Signed-off-by: raiden00pl <raiden00@railab.me>
Fix LED handling for nucleo-c092rc and nucleo-c071rb.
These boards have two LEDs but one is activated with HIGH the other is activated
with LOW.
Also fix userled registration.
Signed-off-by: raiden00pl <raiden00@railab.me>
The parameter count of read had to be a multiple of 4, otherwise the
result was truncated. Now all values are possible.
Signed-off-by: Mathias Duckeck <mathias.duckeck@avat.de>
Fixed error verified in this PR https://github.com/apache/nuttx/pull/17423
added to the workflow:
- Show Disk Space
- Free Disk Space (Ubuntu)
Only Android runtime removed
- Post-build Disk Space
We can now monitor disk space.
Signed-off-by: simbit18 <simbit18@gmail.com>
When the setinterface interface is called, it indicates that the underlying
USB link has been successfully established. At this point, the status of the
network card needs to be updated to RUNNING by calling the netdev_carrier_on
interface. It is similar to the logic after a Wi-Fi network card is
connected to a hotspot. Otherwise, an incorrect network card status may
cause packets to fail to be successfully sent.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
/home/ajh/work/vela_system/nuttx/include/arch/syscall.h:181: Error: operand type mismatch for `movq'
`rax`: Used in 64-bit mode, suitable for storing 64 bits of data.
`eax`: In 64-bit mode, typically used for operating on 32-bit data. When writing to `eax`, the high 32 bits of `rax` are automatically cleared to zero.
`nbr` is an unsigned int, is 32-bit.
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
- Fix EtherCAT signals drive strengh (from errata PORTS_CM.H002), caused bus faults.
- Changed xmc4_ecat.c for compile time pin definition.
- Fixed xmc4_ecat.c register not written (reset value already used).
- Removed EXTCLK for xmc4800 as pin is used for ECAT.
- Clean xmc4 familly board.h and clocks config.
Signed-off-by: adriendesp <adrien.desproges@gmail.com>
Updates the docs to the new esp32c3-devkit naming, after deprecating support
for now esp32c3-legacy.
Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
This change makes the esp32c3-generic the main esp32c3 supported board: esp32c3-devkit.
The now esp32c3-legacy is pure register based and not maintained anymore.
Now, esp32c3-devkit shares the same driver implementation as ESP32-C6 and ESP32-H2.
- esp32c3-devkit -> esp32c3-legacy
- esp32c3-generic -> esp32c3-devkit
Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
- ARCH_CHIP_ESP32C3_LEGACY created
- ARCH_CHIP_ESP32C3_GENERIC is now ARCH_CHIP_ESP32C3
This is part of deprecating esp32c3-devkit as esp32c3-legacy and
using esp32c3-generic (now esp32c3-devkit) instead.
Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
Enhance the nuttx_generate_kconfig() implementation to ensure that
both subdirectories and external directories containing a CMakeLists.txt
or a Kconfig file are properly included during Kconfig generation.
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Update the CA training result check to match the HSS reference code.
The original check which required phase delays to be 5 taps separated was wrong.
This has also been removed from the HSS.
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
The window is 32 taps, so in order to the eye to be completely inside the window,
the (offset + width) has to be less or equal than (32 - margin).
Add this additional sanity check in the mpfs_training_verify.
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
Fix build errors in the Tricore architecture caused by the missing `lock`
member in `struct tricore_systimer_lowerhalf_s`, as well as the missing
definition of the `IFX_CFG_CPU_CLOCK_FREQUENCY` macro.
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Add an option to use HPWORK queue for ethernet driver, to reduce
delays if more time critical messaging via ethernet is wanted.
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
This patch adds support for Two-Wire interface in AVR Dx chips.
Only master mode is supported in this version.
The driver was tested using TC74Ax thermal sensor and simple application
that read the temperature from it. (Driver for the sensor is not in-tree.)
Signed-off-by: Kerogit <kr.git@kerogit.eu>
The Kconfig configuration was offering alternate routing options
for USART peripherals but there was no code which would act
on those settings. This patch fixes it.
Additionally, since the code is being worked on, this patch
also renames USART-related configuration options from AVR_HAS_
to AVR_HAVE_ . This is based on GitHub and mailing list discussion
where it was pointed out that other architectures use "HAVE".
Patch was tested by choosing few combinations of the configuration
and verifying which registers are being set in disassembly. Base
configuration was also tested by an application that uses two ports.
Signed-off-by: Kerogit <kr.git@kerogit.eu>
Add complete driver support for the QST QMI8658 6-axis IMU sensor featuring
3-axis accelerometer and 3-axis gyroscope with I2C interface and uORB
integration.
Key features implemented:
* Full I2C communication with configurable frequency (default 400kHz)
* Multiple accelerometer ranges (±2g, ±4g, ±8g, ±16g) and ODR settings
* Multiple gyroscope ranges (±16 to ±1024 dps) with high ODR support
* Low-pass filter configuration for both sensors
* Temperature sensing with 16-bit resolution
* Self-test capability for both accelerometer and gyroscope
* Calibration-on-demand support with offset registers
* FIFO buffer management (framework ready)
* Interrupt-driven and polling mode support
* Complete uORB integration with sensor_accel and sensor_gyro topics
Driver components added:
* Core driver implementation (qmi8658_uorb.c) with register operations
* Header file with register definitions and scale factors (qmi8658.h)
* Kconfig options for driver configuration and polling mode
* Build system integration (CMakeLists.txt, Make.defs)
* Comprehensive documentation with API reference and usage examples
The driver follows NuttX sensor framework conventions and provides
robust error handling, mutex protection, and comprehensive debugging
support through CONFIG_DEBUG_SENSORS.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
newlib/libm/fenv/*.c are the non-functional implementation that should
be overridden by an architecture specific implementation in newlib/libm/machine/ARCH.
Make the architecture check for including shared x86 sys headers for x86 and x86_64.
Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
Implement filename-based filtering to exclude duplicate files
from source lists, ensuring ARCH-specific files (ARCH_CSRCS)
take precedence over files in common or other dirs
Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
Toolchain.defs file was treating all supported chips as AVR128DA28,
which became apparent while testing changes in USART handling.
Signed-off-by: Kerogit <kr.git@kerogit.eu>
Add back these functions since clang will use them.
This reverts "libs/libc/arm: use builtin routines instead of aliases of __aeabi_mem*"
and adds source files to cmake.
Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
This defconfig uses the legacy bootloader (based on ESP-IDF's
bootloader) and, due a recent update on SPI flash support, its
initialization was missing data to be moved to the IRAM during the
boot process.
Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>