Function w25qxxxjv_erase wasn't correctly handling an error in
w25qxxxjv_erase_sector call and was returning success even on failure.
Moreover this change does not immediately return EBUSY but waits for
the previous operation to finish. If the timeout is significant (more
than erase time of the entire flash), then it returns EBUSY.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
1. fix https://github.com/apache/nuttx/issues/14774.
Change the defconfig of libcxxtest and select libcxxabi by default to
fix sim:libcxxtest build in macOS CI can't find cxxabi.h.
2. fix https://github.com/apache/nuttx/issues/15491.
libcxxabi cannot be used with uclibc, so when compiling macos sim, libcxxabi cannot be selected by default in Kconfig.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
Summary:
- Added a section to the Rust guide that explains how to use the `RUSTFLAGS` environment variable to specify the target CPU for optimization.
- Provides examples and instructions for setting `RUSTFLAGS` for different CPU models, such as Cortex-M33 and Cortex-M55, to generate performance-optimized code.
Impact:
- Enhances the developer's ability to produce more efficient Rust applications on NuttX by leveraging CPU-specific optimizations.
- No runtime or functional changes; only documentation improvements to guide users in optimizing their build configurations for specific hardware.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Summary:
- Updated the Rust guide documentation to include X86 and X86_64 platforms in the supported platforms list.
- Ensured that the guide provides accurate and up-to-date information for developers using these new platforms.
Impact:
- Expands the platform support section of the Rust guide, making it more inclusive and useful for a wider range of developers.
- No functional changes to the code itself; this update only affects the documentation.
- Enhances the usability of the guide by providing necessary setup and configuration details for the X86 and X86_64 architectures.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Fixes bug where stm32_phyinit will succeed even when no PHY is connected. This is because there is no check that a PHY is actually communicating and returning data.
Update include/nuttx/net/mii.h
Co-authored-by: Xiang Xiao <xiaoxiang781216@gmail.com>
Adds support for the LSM6DSO32 IMU by STM using the uORB framework. This
only contains limited support for the I2C interface, interrupt and
polling driven measurement and standard modes of operation (high
performance ODRs). Features like interrupts besides DRDY, filtering,
gesture recognition and acting as a bus master are not implemented.
Due to interrupt latencies the i2c transfer done interrupt can get
deferred by a few hunder microseconds. This makes the i2c transfer timeout
way too early, even though the i2c IP block is already done.
Fix this by adding a significant amount of margin (1ms) to the timeout
value.
This removes several error conditions that can be present after a failed
i2c transaction. The most important of them is the priv->sem_isr semaphore
which can be signaled due to a race condition.
This also ensures the i2c device itself is in idle state before futzing
around with it.
Also, add a comment about the SI-flag in the I2C CTRL register; it has
a hidden dual meaning. Not only does it clear a pending interrupt, it
also moves the I2C IP state machine forward. This requires extra logic
in the driver to cope.
For clearing some variables corresponding with the pollfds of the felip in can_close API, we modify poll logic by binding can_reader_s and pollfd.
Signed-off-by: zhaohaiyang1 <zhaohaiyang1@xiaomi.com>
This fixes issue on Ubuntu 22.04 with cmake v3.22.1:
```
/usr/bin/arm-none-eabi-gcc -D-DLFS_ASSERT=DEBUGASSERT -D-DLFS_CONFIG=/home/yf/Projects/Nuttx/nuttx/fs/littlefs/lfs_vfs.h -D-DLFS_DEBUG=finfo -D-DLFS_ERROR=ferr -D-DLFS_TRACE=finfo -D-DLFS_WARN=fwarn -DLFS_ATTR_MAX=1022 -DLFS_FILE_MAX=2147483647 -DLFS_NAME_MAX=32 -D__KERNEL__ -D__NuttX__
```
It happeed when building `qemu-armv7a:rpproxy_ivshmem`.
Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
This selects ARM_THUMB for ARMV7R per ARM document:
https://developer.arm.com/documentation/dui0471
Thanks to hujun260 for spotting this, now ostest works.
Why it helps is still to be clarified, the `arm_signal_handler.S`
might require this THUMB option.
To keep ARM_THUMB as option, this only selects it for
PROTECTED as per anchao's suggestion.
Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
This adds up_allocate_heap() support for PROTECTED mode so that
kernel and user heap sizes match memory.ld linker script.
Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
This fixes task start syscall in PROTECTED mode, following that
of armv7-m so that hello and getprime programs can run smoothly.
Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
This adds MPU and userspace handling in QEMU chips so that to
boot PROTECTED target qemu-armv7r:pnsh.
Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
This copies struct mpu_region_s from armv7-m to fix PROTECTED mode
build error: `invalid use of undefined type 'struct mpu_region_s'`
Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
This fixes undefined 'ARCH_DATA_RESERVE' in arm_syscall.c:382 so
that to build qemu-armv7r:pnsh. Per nuttx/addrenv.h, that macro
is defined for BUILD_KERNEL, we need use BUILD_PROTECTED now.
Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
This fixes below issues when building for PROTECTED mode:
- `common/arm_fork.c:223 'struct xcpt_syscall_s' has no member 'cpsr'`
- `armv7-r/arm_syscall.c:454 'xcptcontext' has no member 'sigreturn'`
Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
search the device tree and register cfi flash
test flowchart:
mount -t littlefs -o autoformat /dev/cfi-flash1 /data
fstest -m /data
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
Realization of cfi-flash driver.
Add the interfaces of intel and amd command sets.
Signed-off-by: zhengyu9 <zhengyu9@xiaomi.com>
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
Added documentation for espnow and a default defconfig to illustrate
the use of espnow for udp communication.
Signed-off-by: Laczen JMS <laczenjms@gmail.com>
Espnow is a connectionless WiFi communication protocol that can be used
to exchange information between esp nodes.
A espnow pktradio driver is proposed that allows building a 6lowpan
network of nodes.
The driver has been evaluated using udpclient & server running on
different devices.
Solves #15347
Signed-off-by: Laczen JMS <laczenjms@gmail.com>
rpproxy_ivshmem: Remote slave(client) proxy process.
rpserver_ivshmem: Remote master(host) server process.
Please refer to the official Qemu ivshmem documentation for more information:
https://www.qemu.org/docs/master/system/devices/ivshmem.html
Signed-off-by: chao an <anchao.archer@bytedance.com>