Commit Graph

61755 Commits

Author SHA1 Message Date
Eren Terzioglu a3f4d292ff Docs/platforms/esp32c3: Add BLE sleep
Add BLE sleep docs for esp32[-c3]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-05-09 09:48:32 +08:00
Eren Terzioglu a18b7186a6 arch/risc-v/espressif: Add BLE sleep
Add BLE sleep for esp32[-c3]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-05-09 09:48:32 +08:00
yaojiaqi 131f7f75ed arm: memcpy: add NEON paths for aligned copies
Add dedicated NEON implementations for mutually aligned medium and long memcpy copies when building with __ARM_NEON__. These paths use NEON multi-register loads and stores while preserving the existing VFP implementation for non-NEON VFP configurations.

NEON builds also define USE_VFP, so select the NEON implementation explicitly before falling back to VFP. Apply the same aligned-copy optimization to the armv7-a, armv7-r, and armv8-r implementations.

Signed-off-by: yaojiaqi <yaojiaqi@lixiang.com>
2026-05-09 09:46:43 +08:00
Serg Podtynnyi 9c1b2e12ce tools:mksyscall fix compilation warning
mksyscall.c:145:19: warning: initialization discards ‘const’ qualifier
from pointer target type [-Wdiscarded-qualifiers]
  145 |   char *pactual = strchr(arg, '|');
      |                   ^~~~~~
Change to use const char* on pointers

Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
2026-05-09 09:42:58 +08:00
bijunda 99d639b9fe Documentation: add nxcamera documentation
Build Documentation / build-html (push) Has been cancelled
Document the nxcamera command usage, including device selection,
resolution, and pixel format options. Also mention recent support
for multi-instance camera mounting and the macOS AVFoundation
backend on the SIM platform.

Signed-off-by: Peter Bee <bijunda@bytedance.com>
2026-05-08 19:51:39 +08:00
Peter Bee 7771cbd0d0 sim: fix mkallsyms for Objective-C symbols on macOS
/Library/Developer/CommandLineTools/usr/bin/c++filt: error: unknown argument '-['

Signed-off-by: Peter Bee <bijunda@bytedance.com>
2026-05-08 19:51:39 +08:00
Peter Bee 2a353fcc0c sim: adapt macos avfoundation backend for camera indexing and capture
Adapt the macOS AVFoundation backend for multi-device discovery,
camera index mapping and capture startup compatibility. This enables
reliable use of multiple cameras through the SIM camera framework.

Signed-off-by: Peter Bee <bijunda@bytedance.com>
2026-05-08 19:51:39 +08:00
Peter Bee ea05918799 sim: support camera framework multi-instance and dynamic mounting
Allow the SIM camera/V4L2 capture framework to manage multiple
imgdata instances with dynamic mounting. This avoids cross-talk
between camera streams when multiple devices are used.

Signed-off-by: Peter Bee <bijunda@bytedance.com>
2026-05-08 19:51:39 +08:00
Peter Bee 601d77c180 video: ensure video library is non-empty
Add dummy.c so video can build an archive even when there are no other objects (e.g. on macOS).

Signed-off-by: bijunda <bijunda@bytedance.com>
2026-05-08 19:51:39 +08:00
wangyongrong f20f9ff19e sched/group: skip group_release for kernel thread group
When CONFIG_DISABLE_PTHREAD=y, HAVE_GROUP_MEMBERS is undefined and
group_leave() unconditionally calls group_release() for every exiting
thread. This destroys the shared g_kthread_group resources (mutex,
fdlist, task_info) while other kernel threads are still using them,
causing use-after-free crashes.

Fix by checking TCB_FLAG_TTYPE_KERNEL in group_leave() before calling
group_release(), so the entire release path is skipped for kernel
threads. This is safe because g_kthread_group is statically allocated
and its lifetime is the entire system.

Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2026-05-08 13:44:51 +08:00
raiden00pl deb52b0855 !arch/arm/src/stm32: remove STM32_USE_LEGACY_PINMAP
BREAKING CHANGE: remove STM32_USE_LEGACY_PINMAP and all references

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-07 11:45:23 +08:00
raiden00pl cebdcdc692 boards/nucleo-h563zi/nshusbnet: normalize defconfig
boards/nucleo-h563zi/nshusbnet: normalize defconfig

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-06 08:33:06 -04:00
raiden00pl 7934a1c21c boards/stm32f3: migrate to new pinmap
migrate stm32f3 to new pinmap

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-06 08:33:06 -04:00
Max Kriegleder eb92f0f8c8 drivers/timers: avoid 32-bit overflow in arch_timer current_usec
current_usec() returns a uint64_t, but it used TICK2USEC(timebase)
to convert scheduler ticks to microseconds. On 32-bit clock_t builds,
TICK2USEC() performs the multiplication in 32-bit arithmetic before the
result is widened.

With CONFIG_USEC_PER_TICK=10000, this wraps after about 71.6 minutes:

  UINT32_MAX / 1000000 ~= 4294 seconds

After the wrap, up_timer_gettick() can report time near zero again. This
can leave absolute watchdog timeouts, such as those used by usleep() /
clock_nanosleep(), waiting for a tick value that will not be reached until
the 32-bit scheduler counter wraps.

Cast timebase to uint64_t before multiplying by USEC_PER_TICK so
current_usec() remains monotonic across the 32-bit microsecond boundary.

Signed-off-by: Max Kriegleder <max.kriegleder@gmail.com>
2026-05-06 08:49:52 +02:00
Stephen Fox 990ac856b2 net/bluetooth: fix BTPROTO_HCI socket device lookup
bluetooth_sendto() uses netdev_findbyindex(conn->bc_ldev + 1) to find
the Bluetooth network device for an HCI socket.  netdev_findbyindex
searches by global interface index, but bc_ldev is a 0-based count of
Bluetooth devices only — it bears no fixed relationship to the global
interface index.  If any netdev other than a Bluetooth device is
registered before it (e.g. loopback or Ethernet), the Bluetooth device
will not be at global index bc_ldev + 1 and the lookup will return NULL
or the wrong device.

Fix this by replacing netdev_findbyindex with a netdev_foreach walk
using a small callback (bluetooth_dev_byidx_callback) that counts only
NET_LL_BLUETOOTH devices and returns the bc_ldev-th one, regardless of
what else is registered or in what order.

Signed-off-by: Stephen Fox <stephenfox@geotab.com>
2026-05-06 14:45:46 +08:00
Matteo Golin 89b4815382 boards/xtensa: Normalize configurations
Normalizes configurations after removal of some app-related init config
options due to simplification of NuttX init.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-05-06 13:27:26 +08:00
daniellizewski 0b0769f8d9 arch/arm/src/stm32h5/stm32_usbdrdhost.c: Disable host channel when freed
Build Documentation / build-html (push) Has been cancelled
The host interrupt callback was incorrectly using the wrong IRQ for
disconnected. In host mode the same IRQ is used for connect/disconnected
and it must check a status bit to know which one.

When a USB device was unplugged, the host channels were free'd,
but if they happen to be mid-transfer, that transfer was never cancelled
so the USB hardware might still be trying to perfrom a transfer after
was free'd. Fixed by cancelling any transfers on free.

Signed-off-by: daniellizewski <daniellizewski@geotab.com>
2026-05-06 06:20:03 +08:00
daniellizewski fe67544d5f drivers/usbhost/usbhost_cdcecm.c: Converted CDC-ECM to lower half
Converted USB Host CDC-ECM to a lower half driver.
Removed existing full network driver callbacks and replaced with lower
half.

Signed-off-by: daniellizewski <daniellizewski@geotab.com>
2026-05-06 06:20:03 +08:00
daniellizewski 9b18160893 drivers/usbhost/usbhost_cdcecm.c: Added support for Host CDC-ECM
Added support for USB host to use an USB CDC-ECM device.
This class is used for usb-ethernet adapters as well as many modems.

Signed-off-by: daniellizewski <daniellizewski@geotab.com>
2026-05-06 06:20:03 +08:00
daniellizewski 761c17f1e0 drivers/usbhost/usbhost_enumerate.c: Allow selecting USB configuration
Added support for selecting a different USB configuration.
Certain USB devices offer different classes using different
configurations. This allows a board file to provide a callback
to select the proper configuration for a given USB device.

Signed-off-by: daniellizewski <daniellizewski@geotab.com>
2026-05-06 06:20:03 +08:00
Lwazi Dube 7e0f282718 fs/vfs: allow NULL iov_base in KERNEL build with zero-based text
Build Documentation / build-html (push) Has been cancelled
This commit fixes a regression introduced by
89df084b0e. That commit
added a check to ensure iov_base is not NULL, assuming NULL
always represents an inaccessible address.

However, in CONFIG_BUILD_KERNEL mode where CONFIG_ARCH_TEXT_VBASE
is set to 0, address zero is a valid virtual address for the
user-space text segment. The previous check caused libelf to
fail with -EFAULT when attempting to load ELF program headers
into the base of the user address space.

This patch wraps the safety check in a conditional to ensure it is
only executed when address zero is not considered a valid
executable base.

Signed-off-by: Lwazi Dube <lwazeh@gmail.com>
2026-05-06 01:37:53 +08:00
Tiago Medicci Serrano 20c38d050b Documentation: Describe ESP32-P4 Ethernet support
This commit describes ethernet support on ESP32-P4 SoC and its
ESP32-P4-Function-EV-Board v1.5.2.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-05-06 01:37:00 +08:00
Tiago Medicci Serrano c63c061a52 boards/risc-v: Enable ethernet on ESP32-P4-Function-EV-Board
This commit simply enables the ethernet support for the ESP32-P4's
Function EV board.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-05-06 01:37:00 +08:00
Tiago Medicci Serrano 34bfa0d68d arch/xtensa: Update common-source base for ESP32[|S2|S3]
After recent changes on the event handler for the RISC-V-based
Espressif SoCs, the same set of changes were ported back to xtensa
devices.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-05-06 01:37:00 +08:00
Tiago Medicci Serrano 5c4c60f9d2 arch/risc-v: Support the ethernet driver on ESP32-P4
This commit enables the ethernet driver support on ESP32-P4 based
on a common-source implementation. This required a set of changes
regargind the event handler for the Wi-Fi driver (which is now
shared with the ethernet driver).

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-05-06 01:37:00 +08:00
raiden00pl 4b4ba522cb boards/stm32f4: migrate to new pinmap
migrate stm32f4 to new pinmap

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-05 13:30:30 -04:00
shichunma de5cc186e4 net/netdev/netdev_txnotify.c: add debug log with interface name
Add ninfo() in netdev_txnotify_dev() to log the network interface
name when TX notification is triggered, aiding network debugging.

Signed-off-by: Jerry Ma <shichunma@bestechnic.com>
2026-05-06 01:16:40 +08:00
raiden00pl d6e1c20a9c arch/stm32: use input mode for STM32F1 input pinmap entries
Use GPIO_MODE_INPUT for STM32F1 pinmap entries that are configured as
GPIO_INPUT instead of carrying GPIO_MODE_2MHz.

For STM32F1 the MODE field selects output speed only for output or
alternate-function output pins. stm32_configgpio() forces input pins to
input mode regardless of the encoded MODE bits.

From arch/arm/src/stm32/stm32_gpio.c:

   311   /* Decode the mode and configuration */
   312
   313   regval  = getreg32(cr);
   314
   315   if (input)
   316     {
   317       /* Input.. force mode = INPUT */
   318
   319       modecnf = 0;
   320     }
   321   else
   322     {
   323       /* Output or alternate function */
   324
   325       modecnf = (cfgset & GPIO_MODE_MASK) >> GPIO_MODE_SHIFT;
   326     }

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-05 11:48:49 -04:00
raiden00pl ebb53a7ae6 boards/stm32f1: migrate to new pinmap
migrate stm32f1 to new pinmap

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-05 11:48:49 -04:00
raiden00pl 1df49fbb36 boards/stm32f2: migrate to new pinmap
migrate stm32f2 to new pinmap

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-05 11:47:42 -04:00
Alan Carvalho de Assis fc89dfdc3c boards/weact-stm32h750: Don't disable compilation optimization
This board was failing because the CONFIG_DEBUG_NOOPT was enabled.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-05-05 15:01:35 +08:00
Alan Carvalho de Assis 97a50eaf45 net/sixlowpan: Fix sixlowpan_uncompresshdr_hc06()
This commit fixes sixlowpan_uncompresshdr_hc06() to avoid that the
frame data be bigger than the iob->io_len.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-05-04 12:17:23 -03:00
Alan Carvalho de Assis 805169cebd libs/netdb: Fix dns_recv_response() to dns_answer_s size
This commit avoid that dns_recv_response() accepts fewer tha 10 bytes
that could end up with an OOB read.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-05-04 12:16:50 -03:00
Matteo Golin 96041a7c58 boards/comments: Remove legacy comments
Removing legacy comments referring to calling setup functions from the
NSH library.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-05-04 12:16:11 -03:00
Matteo Golin 8e06efb047 boards/stm32f4discovery: Normalize mt6816 defconfig
Normalize board configuration for mt6816 config.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-05-04 12:16:11 -03:00
Alan Carvalho de Assis 4d72eb8421 net/icmpv6: Discard Neighbor Discovery packet if optlen is 0
This commit make ICMPv6 on NuttX compliant with RFC4861 ignoring
a Neighbor Discovery packet when its optlen is 0.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-05-04 12:06:43 -03:00
shichunma 3c9a9d683f include/errno.h: skip set_errno in interrupt context
set_errno() should not modify the interrupted task's errno.
Add a check using up_interrupt_context() and skip the assignment
when called from an interrupt handler.

Signed-off-by: Jerry Ma <shichunma@bestechnic.com>
2026-05-03 17:23:40 -03:00
Matteo Golin a8a492cb4f boards/arm: Remove app-specific initialization
Build Documentation / build-html (push) Has been cancelled
Now that initialization is performed by BOARD_LATE_INITIALIZE,
app-specific initialization options are not needed.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-05-03 08:23:18 -03:00
Alan Carvalho de Assis 51cd4a548f doc: Improved QE Documentation and add mt6816 board profile doc
This commit explain that the QE encoder driver can be used to
internal QE from microcontroller or external magnetic encoder.
Also explains how to use the mt6816 board profile to STM32F4Discovery

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-05-03 07:56:38 -03:00
Alan Carvalho de Assis 928d7682ce boards/stm32f4discovery: Add support to MT6816
This commit add support to use MagTek Magnetic Rotary Encoder MT6816
on STM32F4Discovery board.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-05-03 07:56:38 -03:00
Alan Carvalho de Assis a1d6016962 drivers/sensors: Add support to MT6816
This commit adds support to MagTek MT6816 sensor

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-05-03 07:56:38 -03:00
Alan Carvalho de Assis 04d5cad64e drivers/spi: Add SPIDEV_MAG_ENCODER() definition
This definition is needed to have multiplese Magnetic Sensors in the
same board.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-05-03 07:56:38 -03:00
Alan Carvalho de Assis f8e78c1075 drivers/qe: Don't compile stm32_qencoder.c if STM32 QE is not enabled
NuttX uses Quadrature Encoder lower half driver to internal QE from
MCUs and also with Magnetic Rotary Encoder sensors. But when the
STM32 QE is not enabled, the board code will try to compile the
stm32_qencoder.c because Magnetic Rotary Encoders enables the
CONFIG_SENSORS_QENCODER. This patch fixes this issue.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-05-03 07:56:38 -03:00
Alan Carvalho de Assis 2b8be4a3da drivers/fb: Fix a symbol missing CONFIG_
This was a mistake that was preveting the boot logo to stay visible
for more time.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-05-02 15:26:10 -03:00
Matteo Golin 51f77ee111 boards/config: Remove final mentions of NSH_ARCHINIT
Since `NSH_ARCHINIT` is now removed, this commit cleans the last few
references to this option in the defconfig files that were recently
modified and escaped removal in initialization simplification commit.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-05-02 15:25:45 -03:00
Alan Carvalho de Assis c01aca09f0 boards/qemu-i486: Fix the removal of qemu_appinit.c
This PR makes the qemu-i486 boot again.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-05-03 01:22:00 +08:00
Alan Carvalho de Assis 63a03d0f8a arch/x86: Add palette 256 color to qemu-i486 VGA driver
Build Documentation / build-html (push) Has been cancelled
This patch adds support to get the VGA driver working with 256
colors.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-05-02 09:51:59 -04:00
Alan Carvalho de Assis b30fe55fe0 arch/x86: Replace planar pixel copy with linear copy
The planar copy was used even when linar mode was used (chain4 = 1)
Probably this modification could impact VGA text mode, but for now
it is not important, since the goal is get graphic mode working.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-05-02 09:51:59 -04:00
Matteo Golin a5e8ea2b40 arch/ceva: Replace board_app_initialize
Replaced board_app_initialize logic with board_late_initialize.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-05-02 18:36:46 +08:00
Matteo Golin 66ae075ae8 boards/arm: Replace board_app_initialize
Replaced board_app_initialize logic with board_late_initialize.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-05-02 18:36:46 +08:00