nuttx-apps PR #3763 adds "default 4096 if LIBC_PRINT_EXTENSION" to
CONFIG_UORB_STACKSIZE. Both lckfb-szpi-esp32s3/qmi8658 and
esp32s3-ws-lcd128/imu-qmi8658 already set CONFIG_UORB_STACKSIZE=4096
explicitly, which now matches the new default and makes the line
redundant, so savedefconfig drops it -- causing the CI defconfig-sync
check (testbuild.sh -R) to flag these files as stale and fail the
xtensa-03 job.
Signed-off-by: Felipe Moura <moura.fmo@gmail.com>
Assisted-by: Claude:claude-sonnet-5
The bootloader image has no linked HPWORK or LPWORK consumers, but
enabling both queues pulls unused scheduler code into its constrained
OCRAM region.
Disable the predefined work queues and let deferred memory reclamation
fall back to the idle thread.
Assisted-by: Codex:GPT-5
Signed-off-by: DuoYuWang <thirteenking.wang@gmail.com>
This commit add support to GD32VW553-HMQ board based on GigaDevice
GD32VM553K_START as base.
No AI used for this board, the but GD32VM553K_START was developed
by Jorge Guzman with help from Claude Code.
Signed-off-by: Alan C. Assis <acassis@gmail.com>
This reverts commit 7cc6707a76.
Felipe Moura de Oliveira reported on the dev mailing list that this
commit hangs boot on real Seeed XIAO ESP32-S3 Sense hardware (chip
rev v0.2): both defconfigs (combo, usbnsh) never reach nx_start after
a normal reset (no console output, no USB enumeration; only ROM
download mode via the BOOT strap pin responds). JTAG (OpenOCD + GDB)
shows the core statically stuck inside the chip boot ROM address
range (0x40034000-0x40048000), with nx_start never reached at its
own address (0x42011068) in that build. Reverting only this commits
defconfig changes on top of current master fixes the boot.
Local static analysis (before/after build product comparison via
esptool image_info and readelf -S) ruled out image size/segment
count as the cause: both binaries have 3 segments, identical IRAM
segment address/size byte-for-byte, and the flash-mapped code/data
growth from this change is ~14.7KB total against an 8MB flash
budget. No hardware matching the reported board was available
locally to reproduce or bisect further; reverting to unblock master
per the reporters request while root cause is investigated with
real hardware access.
Reference: https://www.mail-archive.com/dev@nuttx.apache.org/msg15063.html
Assisted-by: Kiro:claude-sonnet-5
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
Switch every qemu-armv7a defconfig whose init entry point was nsh_main
(6 configs: full, gdbstub, nsh, rpproxy, rpserver, smp) to nxinit
(init_main). nsh now runs as a "console sh" service started by init.rc
instead of being the top-level init task.
Each switched defconfig only gains the nxinit-essential keys (minimal
delta):
- CONFIG_INIT_ENTRYPOINT="init_main"
- CONFIG_SYSTEM_NXINIT=y plus its Kconfig deps not already set:
CONFIG_EXPERIMENTAL, CONFIG_LIBC_EXECFUNCS, CONFIG_SCHED_CHILD_STATUS
(depends on CONFIG_SCHED_HAVE_PARENT)
- CONFIG_ETC_ROMFS=y / CONFIG_FS_ROMFS=y to ship init.rc via ROMFS
No stack-size overrides: INIT_STACKSIZE/SYSTEM_NSH_STACKSIZE keep their
Kconfig defaults.
Add boards/arm/qemu/qemu-armv7a/src/etc/init.d/init.rc, shipped via ROMFS
in the Make build (RCSRCS) and CMake (nuttx_add_romfs()), gated on
CONFIG_ETC_ROMFS && CONFIG_SYSTEM_NXINIT.
Testing: qemu-armv7a:nsh (and smp with -smp 4) boot into nxinit with nsh
spawned as its service (init task = init_main, sh = its child), confirmed
via qemu-system-arm in an earlier run of this series. Note: current
apache/master fails to build qemu-armv7a locally this round (missing
arm_timer.h) independent of this change.
Assisted-by: opencode-agent/claude-opus-4-8
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
Switch every qemu-armv8a defconfig whose init entry point was nsh_main
(20 configs) to nxinit (init_main). nsh now runs as a "console sh"
service started by init.rc instead of being the top-level init task.
Each switched defconfig only gains the nxinit-essential keys (minimal
delta):
- CONFIG_INIT_ENTRYPOINT="init_main"
- CONFIG_SYSTEM_NXINIT=y plus its Kconfig deps not already set:
CONFIG_EXPERIMENTAL, CONFIG_LIBC_EXECFUNCS, CONFIG_SCHED_CHILD_STATUS
(depends on CONFIG_SCHED_HAVE_PARENT)
- CONFIG_ETC_ROMFS=y / CONFIG_FS_ROMFS=y to ship init.rc via ROMFS
No stack-size overrides: INIT_STACKSIZE/SYSTEM_NSH_STACKSIZE keep their
Kconfig defaults (DEFAULT_TASK_STACKSIZE, already 8192 on this board).
Add boards/arm64/qemu/qemu-armv8a/src/etc/init.d/init.rc, shipped via
ROMFS in the Make build (RCSRCS) and CMake (nuttx_add_romfs()), gated on
CONFIG_ETC_ROMFS && CONFIG_SYSTEM_NXINIT. Omitting this ROMFS plumbing
causes a link-time "undefined reference to romfs_img".
Testing: qemu-armv8a:nsh (and nsh_smp with -smp 4) boot into nxinit with
nsh spawned as its service (init task = init_main, sh = its child),
confirmed via qemu-system-aarch64 in an earlier run of this series. The
removed explicit 8192 stack sizes equal this board's DEFAULT_TASK_STACKSIZE,
so runtime behavior is unchanged. Note: current apache/master fails to
build locally this round (empty -Wstack-usage=, missing libfdt.h)
independent of this change.
Assisted-by: opencode-agent/claude-opus-4-8
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
Switch every sim/sim/sim defconfig whose init entry point was nsh_main
(81 configs) to nxinit (init_main). nsh now runs as a "console sh"
service started by init.rc instead of being the top-level init task.
Each switched defconfig only gains the nxinit-essential keys (minimal
delta, regenerated so no unrelated options leak in):
- CONFIG_INIT_ENTRYPOINT="init_main"
- CONFIG_SYSTEM_NXINIT=y plus its Kconfig deps that were not already set:
CONFIG_EXPERIMENTAL, CONFIG_LIBC_EXECFUNCS, CONFIG_SCHED_CHILD_STATUS
(which depends on CONFIG_SCHED_HAVE_PARENT)
- CONFIG_ETC_ROMFS=y / CONFIG_FS_ROMFS=y to ship init.rc via ROMFS
No stack-size overrides are added: INIT_STACKSIZE and SYSTEM_NSH_STACKSIZE
keep their Kconfig defaults (DEFAULT_TASK_STACKSIZE).
Five configs (dynconns, module, module32, sotest, sotest32) had
CONFIG_BINFMT_DISABLE=y, which blocks CONFIG_LIBC_EXECFUNCS and thus
CONFIG_SYSTEM_NXINIT. Since nxinit spawns services via exec(), binfmt is
re-enabled in those five. They also enable CONFIG_LIBC_ENVPATH but did
not ship a /bin, so nxinit's posix_spawnp("sh") resolved via PATH and
failed with ENOENT ("Error Starting service 'console': 2"). Add
CONFIG_FS_BINFS=y and CONFIG_PATH_INITIAL="/bin" to those five so the
builtin apps are visible under /bin and the console service starts,
matching the working sim:nsh config.
citest additionally needed CONFIG_ETC_ROMFSDEVNO=1 (matching the 53
other sim configs that already set it to avoid the same collision):
sim_registerblockdevice() (arch/sim/src/sim/sim_blockdevice.c, called
from up_initialize() before any application task starts) unconditionally
registers a FAT ramdisk at /dev/ram0 whenever CONFIG_FS_FAT is set, and
citest is one of the few switched configs with CONFIG_FS_FAT=y that had
never overridden CONFIG_ETC_ROMFSDEVNO away from its Kconfig default of
0. With nxinit, romdisk_register() for /etc's ROMFS at that same minor
number then fails with -EEXIST and nxinit aborts with "Error Opening
/etc/init.d/init.rc" since it treats a missing init.rc as fatal;
nsh_main() silently tolerated the identical failure before this switch
(logs "init: open failed: 2" and continues to the nsh prompt), so the
/etc mount had actually never worked for citest even pre-nxinit.
Add boards/sim/sim/sim/src/etc/init.d/init.rc (registers a "console sh"
service guarded by CONFIG_SYSTEM_NSH; "on init" starts it), shipped via
ROMFS in the Make build (RCSRCS) and CMake (nuttx_add_romfs()), both gated
on CONFIG_ETC_ROMFS && CONFIG_SYSTEM_NXINIT so non-nxinit configs are
unaffected.
Switching to nxinit means nsh_main()/nsh_initialize() (which used to run
/etc/init.d/rc.sysinit and rcS to mount /tmp and /data) no longer runs on
the 46 sim configs that already had CONFIG_ETC_ROMFS=y on master, so
those mounts would otherwise be lost. /bin (binfs) and /proc (procfs) are
unaffected: sim_bringup() (called from board_late_initialize(), before
any entrypoint task starts, independent of nsh_main/init_main) already
mounts them unconditionally on master, and this PR does not touch that
file. init.rc's "on init" action reproduces the rest of rc.sysinit's
mounts (tmpfs, or the FAT-backed /tmp ramdisk via mkrd + mkfatfs + mount
for boards without CONFIG_FS_TMPFS) plus the hostfs /data mount that
used to live in rcS, inlining them directly instead of spawning the
standalone rcsysinit/rcS scripts through a "service ... oneshot"
indirection. nxinit has no builtin mount/mkrd/mkfatfs yet, so each of
these commands still resolves through its posix_spawnp() sh fallback;
that limitation is unchanged by this PR and is left for a follow-up
(either a native mount() call in sim_bringup() for the fixed-path
mounts, or a builtin in nxinit). The 6 configs that also enable
CONFIG_FS_FAT get an explicit CONFIG_ETC_FATDEVNO=2 so this ramdisk does
not collide with /etc's romdisk.
Now that every sim nsh_main + CONFIG_ETC_ROMFS config has switched to
nxinit, boards/sim/sim/sim/src/etc/init.d/rcS and rc.sysinit are dead
code: no remaining sim config calls nsh_initialize() (the only caller of
those scripts), so remove both files outright and drop them from
boards/sim/sim/sim/src/CMakeLists.txt and Makefile's ROMFS RCSRCS list
(init.rc is shipped instead, as above, only when CONFIG_SYSTEM_NXINIT=y).
The remaining ROMFS-enabled sim configs whose entrypoint isn't nsh_main
(nxlines/nxwm/toybox) never executed rcS/rc.sysinit either (their
entrypoint never calls nsh_initialize()), so they lose nothing but a few
unused bytes from their ROMFS image; sim:nxlines was rebuilt to confirm
it still links and boots with an empty etc/init.d/.
init.rc also uses <nuttx/macro.h>'s CONCATENATE() instead of a local
CONCAT_()/CONCAT() pair, matching existing NuttX convention instead of
duplicating a macro the tree already provides.
sim:windows and sim:windows64 are excluded and stay on nsh_main: they
build under MSVC in CI, and CONFIG_SYSTEM_NXINIT pulls in
apps/system/nxinit/action.c, which fails to compile under MSVC because
list_peek_head_type() (include/nuttx/list.h) uses a GCC
statement-expression the MSVC C compiler does not support; separately,
CONFIG_ETC_ROMFS routes them through nuttx_add_romfs()'s POSIX-shell
genromfs/xxd/sed custom build step, which cmd.exe cannot parse either.
Both are pre-existing MSVC gaps in nxinit/the ROMFS CMake helper, not
something this defconfig-only PR should fix, so these two configs are
left on nsh_main.
Testing (sim, host gcc): sim:nsh boots into nxinit with nsh spawned as
its service (init task = init_main, sh = its child), and now shows the
same five mount points as master (/bin /data /etc /proc /tmp), matching
the pre-switch nsh_main baseline; /data round-trips a write to the host
filesystem. The five binfmt configs reach an interactive nsh prompt
(help/uname work) instead of failing to start the console; e.g.
sim:module:
BEFORE fix: Error Starting service 'console': 2
AFTER fix: nsh> help / nsh> uname -a (console up)
init.rc's inlined FAT/tmpfs mount was verified by preprocessing it with
cpp under both CONFIG_FS_FAT and CONFIG_FS_TMPFS: the expansion matches
rc.sysinit's mount sequence (CONCATENATE() resolves to /dev/ram2, etc.).
sim:citest specifically verified with gdb: before the ETC_ROMFSDEVNO fix,
register_blockdriver("/dev/ram0") is called twice (once by
sim_registerblockdevice() from up_initialize(), once by nx_romfsetc());
the second call returns -EEXIST and nxinit aborts. After setting
CONFIG_ETC_ROMFSDEVNO=1, sim:citest boots cleanly into nxinit (ps shows
init_main waiting on its child sh, matching sim:nsh), and the compiled
ROMFS image contains only init.rc. sim:nxlines, a non-nxinit
CONFIG_ETC_ROMFS config, was rebuilt to confirm it still links and boots
with the now-empty etc/init.d/ (rcS/rc.sysinit removed).
Assisted-by: opencode-agent/claude-sonnet-5
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
Wire the RTL8721F (amebagreen2) into the shared Ameba timer driver
(arch/arm/src/common/ameba/ameba_timer.c), registered at /dev/timer0
(TIM1) and /dev/timer1 (TIM2). Only the per-chip base addresses, RCC
masks and IRQs differ, so this adds a small ameba_timer_chip.h (the two
32-bit basic LTIM timers at 0x40819200 / 0x40819400, 32.768 kHz,
APBPeriph_LTIM1/2, IRQ_TIMER1/2, verified against the SoC hal_platform.h
/ sysreg_lsys.h / vector table) plus the Make.defs/CMakeLists build
hooks, the fwlib ram_common/ameba_tim.c RAM source (now also pulled in
by CONFIG_AMEBA_TIMER, matching the PWM rule), the board bring-up
registration and a timer defconfig. The shared driver is unchanged.
TIM0 is left untouched because the boot ROM claims it as the always-on
system timer; reprogramming it would break every SDK delay.
Assisted-by: Claude <noreply@anthropic.com>
Signed-off-by: dechao_gong <dechao_gong@realsil.com.cn>
Wire the RTL8720F into the shared Ameba timer driver
(arch/arm/src/common/ameba/ameba_timer.c), registered at /dev/timer0
(TIM1) and /dev/timer1 (TIM2). Only the per-chip base addresses, RCC
masks and IRQs differ, so this adds a small ameba_timer_chip.h (the two
32-bit basic LTIM timers at 0x40808200 / 0x40808400, 32.768 kHz,
APBPeriph_LTIM1/2, IRQ_TIMER1/2, verified against the SoC hal_platform.h
/ sysreg_lsys.h / vector table) plus the Make.defs/CMakeLists build
hooks, the fwlib ram_common/ameba_tim.c RAM source (now also pulled in
by CONFIG_AMEBA_TIMER, matching the PWM rule), the board bring-up
registration and a timer defconfig. The shared driver is unchanged.
TIM0 is left untouched because the boot ROM claims it as the always-on
system timer; reprogramming it would break every SDK delay.
Assisted-by: Claude <noreply@anthropic.com>
Signed-off-by: dechao_gong <dechao_gong@realsil.com.cn>
Add a parameterised NuttX timer lower-half for the Realtek Ameba
general-purpose timers, sitting on the SDK fwlib RTIM register layer and
registered at /dev/timerN. The shared driver
(arch/arm/src/common/ameba/ameba_timer.c) reads a per-chip instance
table (ameba_timer_chip.h) for each timer's base, input clock, RCC gate
masks and IRQ; the period is programmed directly in microseconds and
converted to the 32-bit auto-reload with one clkfreq formula.
On the pke8721daf two of the 32.768 kHz "basic" (LTIM) timers are
exposed: /dev/timer0 is TIM1 and /dev/timer1 is TIM2. TIM0 is left
untouched because the boot ROM claims it as the always-on system timer
(SYSTIMER); reprogramming it would break every SDK delay. The RTIM
time-base entry points resolve to ROM, while the interrupt-clear and
period-change helpers come from the fwlib RAM source ameba_tim.c (shared
with the PWM driver).
Verified on hardware with examples/timer against both devices: the
update interrupt fires at the requested 1 s interval (measured with the
independent ROM SYSTIMER = 32768 ticks = 1.000 s).
Also whitelist the vendor RTIM_ symbol prefix in tools/nxstyle.c,
alongside the existing RCC_/SYSTIMER_ Ameba SDK entries.
Assisted-by: Claude <noreply@anthropic.com>
Signed-off-by: dechao_gong <dechao_gong@realsil.com.cn>
NETDEV_CAN_BITRATE_IOCTL, NETDEV_CAN_FILTER_IOCTL and
NETDEV_CAN_STATE_IOCTL guarded identical option blocks, and every
SIOCxCANxxx case in netdev_ifr_ioctl() forwarded a member of the same
ifr_ifru union to d_ioctl(). One option and one case block now cover
all of the CAN commands; drivers and defconfigs are updated to the
new name.
Assisted-by: Claude:claude-fable-5
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
mtd_partition(mtd, firstblock, nblocks) takes the partition offset and
size in units of the underlying device "blocks" (geo.blocksize), not
erase blocks. Several board drivers accumulated partoffset and computed
the partition size in erase-block units and passed them straight to
mtd_partition(), so on devices where blocksize != erasesize (W25/SST25:
256B vs 4KB, SAMD5E5 progmem: 512B vs 8KB) every partition came out
erasesize/blocksize (16x) too small and misaligned.
Convert partoffset and partszbytes to geo.blocksize units at the
mtd_partition() call site while keeping the erase-block accumulation.
Affected boards:
- stm32f103-minimum (W25)
- at32f437-mini (W25)
- stm32f429i-disco (SST25F064, enabled in the extflash defconfig)
- metro-m4 (SAMD5E5 progmem)
Also fix pre-existing nxstyle violations in the touched files so the
change passes checkpatch (see CONTRIBUTING.md).
Assisted-by: DeepSeek Harness:deepseek-v4-flash
Signed-off-by: rongbaichuan <rongbaichuan1027@163.com>
The Tab5 ships in two hardware variants and the board supported only
one of them. The earlier units carry an ILI9881C panel and a GT911
touch controller, the later ones a ST7121/ST7123 panel and a ST7123
touch controller, and the two always come as a pair. On an earlier
unit the panel stays lit but black, and the touch bring-up fails with
"failed to register ST7123: -5".
Add the ILI9881C initialization table, taken from the Espressif BSP,
along with the display timings it needs, which differ from the ST7123
ones in the DPI clock (60 MHz instead of 70 MHz) and in every porch.
The panel identification lives on command page 1 and is read and
logged during bring-up, so the boot log says which panel answered.
Add the GT911 to the touch controller choice. These units have a
pull-up to 3V3 on the touch interrupt line that keeps the controller
from scanning, so the line is driven low instead of being used as an
interrupt, and contacts are picked up when the device is read. The
controller identification is logged the same way.
Split esp32p4_touch.c into one file per controller, which is how the
panels are already handled, and document both variants together with
the I2C scan that tells which one is fitted. The defaults are
unchanged, so an existing configuration still selects the ST7121
panel and the ST7123 touch controller.
Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>
The XIAO ESP32-S3 Sense's onboard microSD slot (Seeed XIAOML Kit) is
wired to SPI2 through the GPIO matrix: SCK=GPIO7, MOSI=GPIO9,
MISO=GPIO8 (confirmed against espressif/arduino-esp32's
XIAO_ESP32S3/pins_arduino.h) and CS=GPIO21 (confirmed against this
project's own working xiaoml_bench_logger.ino, which tries CS
candidates {21, 3} in that order -- GPIO3 is a documented fallback,
not the real pin; a Seeed wiki page that names GPIO3 as CS turned out
to be wrong and was the initial, unsuccessful attempt here).
Wires up board_sdmmc_spi_initialize() (common esp32s3 board code,
CONFIG_MMCSD_SPI) into this board's bringup, and adds the
esp32s3_spi2_status() callback (SPI_STATUS_PRESENT for SPIDEV_MMCSD(0))
that esp32s3-devkit and other in-tree boards already provide -- the
esp32s3-xiao board had no SPI board file at all before this.
Validated on the bench: CMD0/CMD41/CMD58 handshake succeeds, SD ver2
card identified (SanDisk 32GB, 62333952 sectors), mounts as vfat,
survives umount+remount with a written file intact.
Needed board defconfig additions (not included in this NuttX-tree
commit; see the 61680_FW project repo for the board config that turns
this on):
CONFIG_ESP32S3_SPI2=y
CONFIG_ESP32S3_SPI2_CSPIN=21
CONFIG_ESP32S3_SPI2_CLKPIN=7
CONFIG_ESP32S3_SPI2_MOSIPIN=9
CONFIG_ESP32S3_SPI2_MISOPIN=8
CONFIG_MMCSD=y
CONFIG_NSH_MMCSDSPIPORTNO=2
CONFIG_FS_FAT=y
CONFIG_FAT_LFN=y
CONFIG_FAT_LCNAMES=y
Assisted-by: Claude <noreply@anthropic.com>
Signed-off-by: Felipe Moura <mouraf@fiteclabs.org.br>
board_buttons() loops over the four buttons but read the GPIO of
g_buttons[BUTTON_BTN1] on every iteration, so all four bits of the
returned set reflected the state of button 1 alone.
Matches the equivalent loop in nrf52840-dk's nrf52_buttons.c.
Signed-off-by: AlmAck <gluca86@gmail.com>
Adopt the zbus message bus on the linum-stm32h753bi (first adopter
board):
- scripts/flash.ld: include the iterable sections common fragments
(2 lines: common-rom.ld inside .text, common-ram.ld inside .data).
- configs/zbus/defconfig: board configuration enabling zbus with all
observer types, the zbus example and its cmocka test suite
(./tools/configure.sh linum-stm32h753bi:zbus).
- Board documentation: describe the new configuration.
Validated on hardware: the 16-test cmocka suite passes twice in the
same boot and the zbus example produces the expected output.
Assisted-by: Claude Code
Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>
No driver exists for this exact chip. lsm6dsl.c is the closest
register-compatible match but is the deprecated legacy char-device
style; lsm6dso32_uorb.c is the closest uORB-style match but is for a
different chip variant. The new driver borrows lsm6dso32_uorb.c's
structure (dual sensor_lowerhalf_s, raw I2C_TRANSFER helpers) and
lsm6dsl.h's register map -- fixing a bug in the header it was ported
from along the way: LSM6DSL_FIFO_CTRL2_SHIFT is defined as 255 instead
of 0.
Delivery mode is chosen the same way mpu6050 does: kthread polling by
default, or interrupt-driven if the board supplies attach(). Unlike
the earlier lsm6dso32-style design this went through first -- one INT
pin and one activate()/interrupt path per sub-sensor -- the shipped
version uses a single shared INT pin for both, mirroring mpu6050's own
one-handler-one-worker design (#19601) instead. The two-independent-
paths version worked for accel alone but was intermittently broken for
gyro: activate() sometimes never actually turned CTRL2_G on even
though the interrupt-enable bit was written correctly, and other times
the whole console hung -- a real race, never conclusively root-caused
on a serial console with no JTAG available. The LSM6DS3TR-C supports
OR'ing both DRDY_XL and DRDY_G onto one pin via independent enable
bits in that pin's INTn_CTRL register, so there was no need for two
paths in the first place: one ISR times the burst, one HPWORK worker
reads OUT_TEMP_L..OUTZ_H_A (14 contiguous bytes covering temp, gyro
and accel in one I2C transaction) and pushes whichever topic(s) are
currently subscribed. activate() now just flips each sub-sensor's own
bit in the shared register instead of running its own attach.
On the XIAO ESP32-S3 with Seeed's IMU Breakout Board, INT1/INT2 route
to GPIO3/GPIO4 (confirmed from the breakout board's schematic, not
guessed). Only INT1/GPIO3 is wired up, since one pin is now enough;
GPIO4/INT2 is documented as available but unused.
Also: CTRL1_XL's FS_XL bits were never actually written to match the
driver's own software default (4g) -- registration set the in-memory
value but the chip stayed at its 2g reset default until a caller
issued an explicit SNIOC_SETFULLSCALE. register() now writes it.
Validated on the bench, both modes, reproduced across multiple fresh
reboots: WHO_AM_I reads 0x6a, sensor_accel0/sensor_gyro0 stream
continuously. Interrupt mode delivers ~300 samples of each per 6s
window with shared timestamps down to the microsecond between the two
topics per event, confirming both come from the same burst read.
Assisted-by: Claude <noreply@anthropic.com>
Signed-off-by: Felipe Moura <moura.fmo@gmail.com>
This commit introduces EDID reading and parsing to the JZ4780 display
driver, replacing hardcoded resolution limits with dynamic mode selection
based on the connected display's capabilities.
Specific changes include:
- Implemented I2C DDC master communication for the HDMI controller to
read EDID blocks from monitors.
- Added dynamic mode selection to calculate bandwidth and pick the best
supported resolution, prioritizing the EDID preferred mode.
- Dynamically allocated framebuffer bounds (g_planeinfo and g_videoinfo)
based on parsed EDID dimensions.
- Configured GPIO pin multiplexing for HDMI power, DDC, and control pins
(POWER_EN, CEC, SCL, SDA) to enable display power and communication
on the CI20 board.
Signed-off-by: Lwazi Dube <lwazeh@gmail.com>
Wire the RTL8721F (amebagreen2) into the shared Ameba watchdog driver
(arch/arm/src/common/ameba/ameba_wdg.c), registered as /dev/watchdog0.
Only the per-chip base address and IRQ differ, so this adds a small
ameba_wdg_chip.h (WDG2 non-secure system watchdog at 0x4080AD80,
CPU0_NS_WDG IRQ 69, verified against the SoC hal_platform.h and
ameba_vector_table.h) plus the Make.defs/CMakeLists build hooks, the
board bring-up registration, and a wdg defconfig. The shared driver is
unchanged.
Assisted-by: Claude <noreply@anthropic.com>
Signed-off-by: dechao_gong <dechao_gong@realsil.com.cn>
Wire the RTL8720F into the shared Ameba watchdog driver
(arch/arm/src/common/ameba/ameba_wdg.c), registered as /dev/watchdog0.
Only the per-chip base address and IRQ differ, so this adds a small
ameba_wdg_chip.h (WDG2 non-secure system watchdog at 0x40801D80,
KM4TZ_NS_WDG IRQ 52, verified against the SoC hal_platform.h and
ameba_vector_table.h) plus the Make.defs/CMakeLists build hooks, the
board bring-up registration, and a wdg defconfig. The shared driver is
unchanged.
Also corrects the RTL8720F row in the rtl8721dx chip-header reference
table (the non-secure system WDG IRQ is KM4TZ_NS_WDG = 52).
Assisted-by: Claude <noreply@anthropic.com>
Signed-off-by: dechao_gong <dechao_gong@realsil.com.cn>
Add a NuttX watchdog lower-half for the Ameba KM4 non-secure system
watchdog (WDG2), registered as /dev/watchdog0. The fwlib WDG API is
ROM-resident, so no board.mk change is needed.
The hardware cannot be stopped once enabled, so stop() is emulated via
the early interrupt (EI) auto-refreshing the counter, and capture()
delivers a pre-timeout callback through the same EI. The EI has a
three-part timing contract, all handled here: it must be armed with
EIMOD=ENABLE at WDG_Init, its EIE gate only takes effect after
WDG_Enable, and -- because the EI is level-based -- a pure capture path
must mask EIE after the one-shot callback to avoid re-entrant storming
while the reset is pending. The EI flag is cleared twice per the slow
WDG clock.
Per-chip base address and IRQ live in ameba_wdg_chip.h so the shared
driver needs no change to port to another Ameba IC.
Verified on pke8721daf: timeout reset (BOOT REASON WDG2), stop()
suppressing the reset, and capture() firing ~EICNT ms before the reset.
Assisted-by: Claude <noreply@anthropic.com>
Signed-off-by: dechao_gong <dechao_gong@realsil.com.cn>
The esp32s3-devkit:usbmsc config uses CONFIG_ESPRESSIF_SIMPLE_BOOT, so
the image is packaged with "esptool elf2image --ram-only-header". With
esptool v5.2.0, that path asserts that each flash segment satisfies
(f.tell() + 8 + BOOTLOADER_FLASH_OFFSET) % IROM_ALIGN
== segment.addr % IROM_ALIGN
When .flash.text lands right on a 64 KB (IROM_ALIGN) boundary the
assertion cannot be satisfied and elf2image fails with AssertionError,
even though NuttX itself links cleanly.
usbmsc is a plain C test and does not need the C++ runtime. Disabling
CONFIG_HAVE_CXX / CONFIG_HAVE_CXXINITIALIZE moves .flash.text off the
IROM_ALIGN boundary so the SIMPLE_BOOT image can be generated, without
changing the boot mode or the test's intent.
Signed-off-by: yukangzhi <yukangzhi@xiaomi.com>
Adds GPIO defconfig on M5Stack Tab5. The example has one GPIO output
and one GPIO interrupt.
Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
The link support is no longer limited to the pseudo file system and now
covers both soft (symbolic) links and hard links across the VFS. Rename
the configuration option PSEUDOFS_SOFTLINKS to the more accurate FS_LINKS
and update all references in the source, headers, Kconfig, documentation
and board defconfigs accordingly.
This is a configuration rename; any out-of-tree defconfig that still
selects PSEUDOFS_SOFTLINKS must be updated to FS_LINKS.
Signed-off-by: zhengyu16 <zhengyu16@xiaomi.com>
Wire the shared Ameba RTC driver (arch/arm/src/common/ameba/ameba_rtc.c)
into RTL8721F (amebagreen2). The driver is chip-agnostic and reads only
per-chip macros from ameba_rtc_chip.h; RTL8721F differs from amebadplus
only in the RTC interrupt vector (RTL8721F_IRQ_RTC, vector 41). The
APBPeriph_RTC masks and RTC_BASE_YEAR (1900) are identical across all
current Ameba chips.
- ameba_rtc_chip.h: per-chip RTC IRQ / clock masks / base year
- Make.defs, ameba_board.mk: compile ameba_rtc.c and the fwlib RAM
RTC source when CONFIG_AMEBA_RTC=y
- board: rtl8721f_rtc.c registers /dev/rtc0 from bringup
- configs/rtc: examples/alarm profile
Signed-off-by: dechao_gong <dechao_gong@realsil.com.cn>
Assisted-by: Claude <noreply@anthropic.com>
Wire the shared Ameba RTC driver (arch/arm/src/common/ameba/ameba_rtc.c)
into RTL8720F. The driver is chip-agnostic and reads only per-chip macros
from ameba_rtc_chip.h; RTL8720F differs from amebadplus only in the RTC
interrupt vector (RTL8720F_IRQ_RTC, vector 33). The APBPeriph_RTC masks
and RTC_BASE_YEAR (1900) are identical across all current Ameba chips.
- ameba_rtc_chip.h: per-chip RTC IRQ / clock masks / base year
- Make.defs, ameba_board.mk: compile ameba_rtc.c and the fwlib RAM
RTC source when CONFIG_AMEBA_RTC=y
- board: rtl8720f_rtc.c registers /dev/rtc0 from bringup
- configs/rtc: examples/alarm profile
Signed-off-by: dechao_gong <dechao_gong@realsil.com.cn>
Assisted-by: Claude <noreply@anthropic.com>
Expose the Ameba on-chip RTC as a NuttX date/time RTC at /dev/rtc0
(rdtime/settime) with a single one-shot alarm (setalarm/rdalarm/
cancelalarm/setrelative) that fires the RTC interrupt and the upper-half
callback. The same hardware also backs the arch date/time RTC hooks
(up_rtc_initialize/getdatetime/settime, g_rtc_enabled) so the NuttX
system time is seeded from it.
The driver sits on the SDK fwlib RTC API (mirrored structures + local
externs, no vendor headers pulled into the NuttX include world). The
fwlib RTC API lives in the RAM source ameba_rtc.c, so it is added to the
board fwlib build under CONFIG_AMEBA_RTC. The hardware keeps a year plus
a day-of-year (no month/day register); the driver bridges that to the
NuttX month/day calendar with the libc UTC routines (timegm/gmtime_r),
which is exact and reversible.
The only per-chip fact -- the RTC interrupt vector -- lives in the
per-chip ameba_rtc_chip.h; the shared driver is never edited for a new
Ameba chip. A configs/rtc profile (examples/alarm) is added for
verification.
Signed-off-by: dechao_gong <dechao_gong@realsil.com.cn>
Assisted-by: Claude <noreply@anthropic.com>
Switch all three esp32p4 boards' nsh defconfigs (esp32p4-function-ev-board,
esp32p4-pico-wifi-wareshare, esp32p4-tab5) from nsh_main to nxinit
(init_main) as the system init entry point, matching the esp32s3 boards'
existing nxinit configs for consistency across Espressif boards.
- Add boards/risc-v/esp32p4/common/src/etc/init.d/init.rc, copied from
the esp32s3 common version: registers a "console sh" service (nsh)
guarded by CONFIG_SYSTEM_NSH, plus adbd/fastbootd service stubs
guarded by their own Kconfig symbols for future reuse; "on init"
starts whichever services are enabled.
- boards/risc-v/esp32p4/common/src/Make.defs: ship init.rc via ROMFS
(RCSRCS) when CONFIG_SYSTEM_NXINIT=y, alongside the existing
rc.sysinit/rcS, mirroring esp32s3's Make.defs.
- Per board defconfig:
- CONFIG_INIT_ENTRYPOINT switched to "init_main"
- CONFIG_INIT_STACKSIZE=8192 (was unset/2048 default), matching the
value already used and measured on esp32s3 boards for the
nxinit init task running console-sh (and up to two services)
- CONFIG_SYSTEM_NXINIT=y added, plus its direct Kconfig dependencies:
CONFIG_LIBC_EXECFUNCS, CONFIG_SCHED_CHILD_STATUS (which depends on
CONFIG_SCHED_HAVE_PARENT); CONFIG_EXPERIMENTAL was already set on
all three boards
- CONFIG_SYSTEM_NSH_STACKSIZE=8192 added: nsh now runs as a service
spawned by init.rc instead of being init itself, so it needs its
own stack instead of borrowing the init stack
- CONFIG_ETC_ROMFS/CONFIG_FS_ROMFS added, needed to ship init.rc via
the board's ROMFS
nsh continues to run as a console service started by init.rc
(boards/risc-v/esp32p4/common/src/etc/init.d/init.rc), not as the
top-level init.
CMake: esp32p4's common/src/CMakeLists.txt currently has no ROMFS/RCSRCS
wiring at all (unlike e.g. esp32c3's nuttx_add_romfs() block), so
rc.sysinit/rcS/init.rc are only shipped via the Make build. This is a
pre-existing gap independent of this change and is left untouched here.
Verified all three defconfigs with:
./tools/configure.sh -l <board>:nsh
make -j$(nproc) CROSSDEV=riscv-none-elf-
using the xPack riscv-none-elf-gcc 14.2.0 toolchain (the local
riscv64-unknown-elf-gcc bare-metal toolchain lacks sys/cdefs.h needed
by esp-hal-3rdparty). All three link cleanly with no errors/warnings;
the built nuttx.bin contains the init.rc-embedded "service console sh"
string, confirming init.rc is picked up by the ROMFS build. Each
defconfig was regenerated with "make savedefconfig" to normalize
field ordering.
esp32p4 has no hardware attached in this session, so this change is
build-verified only; no flash/boot pass was performed.
Assisted-by: opencode/claude-sonnet-5
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
Switch all esp32s3-8048S043 defconfigs (gpio, i2c, lcd, nsh, sdmmc, spi,
touchscreen) from nsh_main to nxinit (init_main) as the system init entry
point, matching the lckfb-szpi-esp32s3 board's existing nxinit configs
(see 73c949c87e) for consistency across esp32s3 boards.
For each defconfig:
- CONFIG_INIT_ENTRYPOINT switched to "init_main"
- CONFIG_INIT_STACKSIZE set to 8192. Measured on lckfb-szpi-esp32s3
with CONFIG_STACK_COLORATION=y on the worst case available: a config
whose init.rc starts two services (console sh + adbd). At the 2048
Kconfig default the board panics at runtime (xtensa_user_panic, task
"sh"); at 4096 init_main reaches FILLED=99.5%, i.e. no headroom; at
8192 it settles at USED=4336 (53.6%). A single-service config only
fills 46.9% of a 3072-byte init stack, so 8192 is deliberately
uniform rather than minimal: it covers the two-service worst case
with roughly 2x margin and keeps every defconfig off the 2048
default, where the init stack overflows and clobbers the global
inode/mount tree - the procfs mount disappears, "ls /" crashes in
read_pseudodir and "ps" reports "/proc not mounted".
- CONFIG_SYSTEM_NXINIT=y added, plus its direct Kconfig dependencies
(CONFIG_EXPERIMENTAL, CONFIG_LIBC_EXECFUNCS, CONFIG_SCHED_CHILD_STATUS,
which depends on CONFIG_SCHED_HAVE_PARENT)
- CONFIG_SYSTEM_NSH_STACKSIZE=8192 added: nsh now runs as a service
spawned by init.rc instead of being init itself, so the shell
workload is carried by its own stack rather than the init stack.
Without this it falls back to CONFIG_DEFAULT_TASK_STACKSIZE (2048
unless the defconfig overrides it) and crashes in getumask while
running "ps", too small to reach the procfs read path.
- ETC_ROMFS/FS_ROMFS added where missing, needed to ship init.rc via
the board's ROMFS
nsh continues to run as a console service started by init.rc
(boards/xtensa/esp32s3/common/src/etc/init.d/init.rc), not as the
top-level init.
Verified all 7 defconfigs (gpio, i2c, lcd, nsh, sdmmc, spi,
touchscreen) build cleanly with make. Runtime behavior (init_main
spawning nsh as a console service) was confirmed on lckfb-szpi-esp32s3
hardware, which shares the same nxinit/init.rc mechanism; this board
has no hardware attached for a flash/boot pass in this session, so the
build-verified defconfigs are the extent of local testing here.
Assisted-by: Kiro:claude-sonnet-5
Assisted-by: Kiro:claude-opus-5
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
Switch all esp32s3-xiao defconfigs (combo, usbnsh) from nsh_main to
nxinit (init_main) as the system init entry point, matching the
lckfb-szpi-esp32s3 board's existing nxinit configs (see 73c949c87e)
for consistency across esp32s3 boards.
For each defconfig:
- CONFIG_INIT_ENTRYPOINT switched to "init_main"
- CONFIG_INIT_STACKSIZE set to 8192. Measured on lckfb-szpi-esp32s3
with CONFIG_STACK_COLORATION=y on the worst case available: a config
whose init.rc starts two services (console sh + adbd). At the 2048
Kconfig default the board panics at runtime (xtensa_user_panic, task
"sh"); at 4096 init_main reaches FILLED=99.5%, i.e. no headroom; at
8192 it settles at USED=4336 (53.6%). A single-service config only
fills 46.9% of a 3072-byte init stack, so 8192 is deliberately
uniform rather than minimal: it covers the two-service worst case
with roughly 2x margin and keeps every defconfig off the 2048
default, where the init stack overflows and clobbers the global
inode/mount tree - the procfs mount disappears, "ls /" crashes in
read_pseudodir and "ps" reports "/proc not mounted".
- CONFIG_SYSTEM_NXINIT=y added, plus its direct Kconfig dependencies
(CONFIG_EXPERIMENTAL, CONFIG_LIBC_EXECFUNCS, CONFIG_SCHED_CHILD_STATUS,
which depends on CONFIG_SCHED_HAVE_PARENT)
- CONFIG_SYSTEM_NSH_STACKSIZE=8192 added: nsh now runs as a service
spawned by init.rc instead of being init itself, so the shell
workload is carried by its own stack rather than the init stack.
Without this it falls back to CONFIG_DEFAULT_TASK_STACKSIZE (2048
unless the defconfig overrides it) and crashes in getumask while
running "ps", too small to reach the procfs read path.
- ETC_ROMFS/FS_ROMFS added where missing, needed to ship init.rc via
the board's ROMFS
nsh continues to run as a console service started by init.rc
(boards/xtensa/esp32s3/common/src/etc/init.d/init.rc), not as the
top-level init.
Verified both defconfigs (combo, usbnsh) build cleanly with make.
Runtime behavior (init_main spawning nsh as a console service) was
confirmed on lckfb-szpi-esp32s3 hardware, which shares the same
nxinit/init.rc mechanism; this board has no hardware attached for a
flash/boot pass in this session, so the build-verified defconfigs are
the extent of local testing here.
Assisted-by: Kiro:claude-sonnet-5
Assisted-by: Kiro:claude-opus-5
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
Switch all esp32s3-ws-lcd128 defconfigs still on nsh_main
(imu-qmi8658, nsh, ostest, watchdog) to nxinit (init_main) as the
system init entry point, matching the lckfb-szpi-esp32s3 board's
existing nxinit configs (see 73c949c87e) for consistency across
esp32s3 boards. This board's coremark, notouch-lvgl and touch-lvgl
defconfigs use other custom entrypoints and are unaffected.
For each defconfig:
- CONFIG_INIT_ENTRYPOINT switched to "init_main"
- CONFIG_INIT_STACKSIZE set to 8192. Measured on lckfb-szpi-esp32s3
with CONFIG_STACK_COLORATION=y on the worst case available: a config
whose init.rc starts two services (console sh + adbd). At the 2048
Kconfig default the board panics at runtime (xtensa_user_panic, task
"sh"); at 4096 init_main reaches FILLED=99.5%, i.e. no headroom; at
8192 it settles at USED=4336 (53.6%). A single-service config only
fills 46.9% of a 3072-byte init stack, so 8192 is deliberately
uniform rather than minimal: it covers the two-service worst case
with roughly 2x margin and keeps every defconfig off the 2048
default, where the init stack overflows and clobbers the global
inode/mount tree - the procfs mount disappears, "ls /" crashes in
read_pseudodir and "ps" reports "/proc not mounted".
- CONFIG_SYSTEM_NXINIT=y added, plus its direct Kconfig dependencies
(CONFIG_EXPERIMENTAL, CONFIG_LIBC_EXECFUNCS, CONFIG_SCHED_CHILD_STATUS,
which depends on CONFIG_SCHED_HAVE_PARENT)
- CONFIG_SYSTEM_NSH_STACKSIZE=8192 added: nsh now runs as a service
spawned by init.rc instead of being init itself, so the shell
workload is carried by its own stack rather than the init stack.
Without this it falls back to CONFIG_DEFAULT_TASK_STACKSIZE (2048
unless the defconfig overrides it) and crashes in getumask while
running "ps", too small to reach the procfs read path.
- ETC_ROMFS/FS_ROMFS added where missing, needed to ship init.rc via
the board's ROMFS
nsh continues to run as a console service started by init.rc
(boards/xtensa/esp32s3/common/src/etc/init.d/init.rc), not as the
top-level init.
Verified all 4 defconfigs (imu-qmi8658, nsh, ostest, watchdog) build
cleanly with make. Runtime behavior (init_main spawning nsh as a
console service) was confirmed on lckfb-szpi-esp32s3 hardware, which
shares the same nxinit/init.rc mechanism; this board has no hardware
attached for a flash/boot pass in this session, so the build-verified
defconfigs are the extent of local testing here.
Assisted-by: Kiro:claude-sonnet-5
Assisted-by: Kiro:claude-opus-5
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
Switch both esp32s3-touch-lcd7 defconfigs (lcd, usbnsh) from nsh_main
to nxinit (init_main) as the system init entry point, matching the
lckfb-szpi-esp32s3 board's existing nxinit configs (see 73c949c87e)
for consistency across esp32s3 boards.
- CONFIG_INIT_ENTRYPOINT switched to "init_main"
- CONFIG_INIT_STACKSIZE set to 8192. Measured on lckfb-szpi-esp32s3
with CONFIG_STACK_COLORATION=y on the worst case available: a config
whose init.rc starts two services (console sh + adbd). At the 2048
Kconfig default the board panics at runtime (xtensa_user_panic, task
"sh"); at 4096 init_main reaches FILLED=99.5%, i.e. no headroom; at
8192 it settles at USED=4336 (53.6%). A single-service config only
fills 46.9% of a 3072-byte init stack, so 8192 is deliberately
uniform rather than minimal: it covers the two-service worst case
with roughly 2x margin and keeps every defconfig off the 2048
default, where the init stack overflows and clobbers the global
inode/mount tree - the procfs mount disappears, "ls /" crashes in
read_pseudodir and "ps" reports "/proc not mounted".
- CONFIG_SYSTEM_NXINIT=y added, plus its direct Kconfig dependencies
(CONFIG_EXPERIMENTAL, CONFIG_LIBC_EXECFUNCS, CONFIG_SCHED_CHILD_STATUS,
which depends on CONFIG_SCHED_HAVE_PARENT)
- CONFIG_SYSTEM_NSH_STACKSIZE=8192 added: nsh now runs as a service
spawned by init.rc instead of being init itself, so the shell
workload is carried by its own stack rather than the init stack.
Without this it falls back to CONFIG_DEFAULT_TASK_STACKSIZE (2048
unless the defconfig overrides it) and crashes in getumask while
running "ps", too small to reach the procfs read path.
- ETC_ROMFS/FS_ROMFS added, needed to ship init.rc via the board's
ROMFS
nsh continues to run as a console service started by init.rc
(boards/xtensa/esp32s3/common/src/etc/init.d/init.rc), not as the
top-level init.
Verified both defconfigs build cleanly with make. Runtime
behavior (init_main spawning nsh as a console service) was confirmed
on lckfb-szpi-esp32s3 hardware, which shares the same nxinit/init.rc
mechanism; this board has no hardware attached for a flash/boot pass
in this session, so the build-verified defconfigs are the extent of
local testing here.
Assisted-by: Kiro:claude-sonnet-5
Assisted-by: Kiro:claude-opus-5
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
Switch all esp32s3-meadow defconfigs (nsh, usbnsh) from nsh_main to
nxinit (init_main) as the system init entry point, matching the
lckfb-szpi-esp32s3 board's existing nxinit configs (see 73c949c87e)
for consistency across esp32s3 boards.
For each defconfig:
- CONFIG_INIT_ENTRYPOINT switched to "init_main"
- CONFIG_INIT_STACKSIZE set to 8192. Measured on lckfb-szpi-esp32s3
with CONFIG_STACK_COLORATION=y on the worst case available: a config
whose init.rc starts two services (console sh + adbd). At the 2048
Kconfig default the board panics at runtime (xtensa_user_panic, task
"sh"); at 4096 init_main reaches FILLED=99.5%, i.e. no headroom; at
8192 it settles at USED=4336 (53.6%). A single-service config only
fills 46.9% of a 3072-byte init stack, so 8192 is deliberately
uniform rather than minimal: it covers the two-service worst case
with roughly 2x margin and keeps every defconfig off the 2048
default, where the init stack overflows and clobbers the global
inode/mount tree - the procfs mount disappears, "ls /" crashes in
read_pseudodir and "ps" reports "/proc not mounted".
- CONFIG_SYSTEM_NXINIT=y added, plus its direct Kconfig dependencies
(CONFIG_EXPERIMENTAL, CONFIG_LIBC_EXECFUNCS, CONFIG_SCHED_CHILD_STATUS,
which depends on CONFIG_SCHED_HAVE_PARENT)
- CONFIG_SYSTEM_NSH_STACKSIZE=8192 added: nsh now runs as a service
spawned by init.rc instead of being init itself, so the shell
workload is carried by its own stack rather than the init stack.
Without this it falls back to CONFIG_DEFAULT_TASK_STACKSIZE (2048
unless the defconfig overrides it) and crashes in getumask while
running "ps", too small to reach the procfs read path.
- ETC_ROMFS/FS_ROMFS added where missing, needed to ship init.rc via
the board's ROMFS
nsh continues to run as a console service started by init.rc
(boards/xtensa/esp32s3/common/src/etc/init.d/init.rc), not as the
top-level init.
Verified both defconfigs (nsh, usbnsh) build cleanly with make.
Runtime behavior (init_main spawning nsh as a console service) was
confirmed on lckfb-szpi-esp32s3 hardware, which shares the same
nxinit/init.rc mechanism; this board has no hardware attached for a
flash/boot pass in this session, so the build-verified defconfigs are
the extent of local testing here.
Assisted-by: Kiro:claude-sonnet-5
Assisted-by: Kiro:claude-opus-5
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
Switch all esp32s3-m5-cardputer defconfigs (fb, lvgl, lvglterm, nsh,
sdcard, softap, wifi) from nsh_main to nxinit (init_main) as the
system init entry point, matching the lckfb-szpi-esp32s3 board's
existing nxinit configs (see 73c949c87e) for consistency across
esp32s3 boards.
For each defconfig:
- CONFIG_INIT_ENTRYPOINT switched to "init_main"
- CONFIG_INIT_STACKSIZE set to 8192. Measured on lckfb-szpi-esp32s3
with CONFIG_STACK_COLORATION=y on the worst case available: a config
whose init.rc starts two services (console sh + adbd). At the 2048
Kconfig default the board panics at runtime (xtensa_user_panic, task
"sh"); at 4096 init_main reaches FILLED=99.5%, i.e. no headroom; at
8192 it settles at USED=4336 (53.6%). A single-service config only
fills 46.9% of a 3072-byte init stack, so 8192 is deliberately
uniform rather than minimal: it covers the two-service worst case
with roughly 2x margin and keeps every defconfig off the 2048
default, where the init stack overflows and clobbers the global
inode/mount tree - the procfs mount disappears, "ls /" crashes in
read_pseudodir and "ps" reports "/proc not mounted".
- CONFIG_SYSTEM_NXINIT=y added, plus its direct Kconfig dependencies
(CONFIG_EXPERIMENTAL, CONFIG_LIBC_EXECFUNCS, CONFIG_SCHED_CHILD_STATUS,
which depends on CONFIG_SCHED_HAVE_PARENT)
- CONFIG_SYSTEM_NSH_STACKSIZE=8192 added: nsh now runs as a service
spawned by init.rc instead of being init itself, so the shell
workload is carried by its own stack rather than the init stack.
Without this it falls back to CONFIG_DEFAULT_TASK_STACKSIZE (2048
unless the defconfig overrides it) and crashes in getumask while
running "ps", too small to reach the procfs read path.
- ETC_ROMFS/FS_ROMFS added where missing, needed to ship init.rc via
the board's ROMFS
nsh continues to run as a console service started by init.rc
(boards/xtensa/esp32s3/common/src/etc/init.d/init.rc), not as the
top-level init.
Verified all 7 defconfigs (fb, lvgl, lvglterm, nsh, sdcard, softap,
wifi) build cleanly with make. Runtime behavior (init_main spawning
nsh as a console service) was confirmed on lckfb-szpi-esp32s3
hardware, which shares the same nxinit/init.rc mechanism; this board
has no hardware attached for a flash/boot pass in this session, so
the build-verified defconfigs are the extent of local testing here.
Assisted-by: Kiro:claude-sonnet-5
Assisted-by: Kiro:claude-opus-5
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
Switch the esp32s3-lhcbit usbnsh defconfig from nsh_main to nxinit
(init_main) as the system init entry point, matching the
lckfb-szpi-esp32s3 board's existing nxinit configs (see 73c949c87e)
for consistency across esp32s3 boards.
- CONFIG_INIT_ENTRYPOINT switched to "init_main"
- CONFIG_INIT_STACKSIZE set to 8192. Measured on lckfb-szpi-esp32s3
with CONFIG_STACK_COLORATION=y on the worst case available: a config
whose init.rc starts two services (console sh + adbd). At the 2048
Kconfig default the board panics at runtime (xtensa_user_panic, task
"sh"); at 4096 init_main reaches FILLED=99.5%, i.e. no headroom; at
8192 it settles at USED=4336 (53.6%). A single-service config only
fills 46.9% of a 3072-byte init stack, so 8192 is deliberately
uniform rather than minimal: it covers the two-service worst case
with roughly 2x margin and keeps every defconfig off the 2048
default, where the init stack overflows and clobbers the global
inode/mount tree - the procfs mount disappears, "ls /" crashes in
read_pseudodir and "ps" reports "/proc not mounted".
- CONFIG_SYSTEM_NXINIT=y added, plus its direct Kconfig dependencies
(CONFIG_EXPERIMENTAL, CONFIG_LIBC_EXECFUNCS, CONFIG_SCHED_CHILD_STATUS,
which depends on CONFIG_SCHED_HAVE_PARENT)
- CONFIG_SYSTEM_NSH_STACKSIZE=8192 added: nsh now runs as a service
spawned by init.rc instead of being init itself, so the shell
workload is carried by its own stack rather than the init stack.
Without this it falls back to CONFIG_DEFAULT_TASK_STACKSIZE (2048
unless the defconfig overrides it) and crashes in getumask while
running "ps", too small to reach the procfs read path.
- ETC_ROMFS/FS_ROMFS added, needed to ship init.rc via the board's
ROMFS
nsh continues to run as a console service started by init.rc
(boards/xtensa/esp32s3/common/src/etc/init.d/init.rc), not as the
top-level init.
Verified the usbnsh defconfig builds cleanly with make. Runtime
behavior (init_main spawning nsh as a console service) was confirmed
on lckfb-szpi-esp32s3 hardware, which shares the same nxinit/init.rc
mechanism; this board has no hardware attached for a flash/boot pass
in this session, so the build-verified defconfig is the extent of
local testing here.
Assisted-by: Kiro:claude-sonnet-5
Assisted-by: Kiro:claude-opus-5
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
Switch all esp32s3-lcd-ev defconfigs (audio, buttons, lcd, lvgl, nsh,
ws2812) from nsh_main to nxinit (init_main) as the system init entry
point, matching the lckfb-szpi-esp32s3 board's existing nxinit configs
(see 73c949c87e) for consistency across esp32s3 boards.
For each defconfig:
- CONFIG_INIT_ENTRYPOINT switched to "init_main"
- CONFIG_INIT_STACKSIZE set to 8192. Measured on lckfb-szpi-esp32s3
with CONFIG_STACK_COLORATION=y on the worst case available: a config
whose init.rc starts two services (console sh + adbd). At the 2048
Kconfig default the board panics at runtime (xtensa_user_panic, task
"sh"); at 4096 init_main reaches FILLED=99.5%, i.e. no headroom; at
8192 it settles at USED=4336 (53.6%). A single-service config only
fills 46.9% of a 3072-byte init stack, so 8192 is deliberately
uniform rather than minimal: it covers the two-service worst case
with roughly 2x margin and keeps every defconfig off the 2048
default, where the init stack overflows and clobbers the global
inode/mount tree - the procfs mount disappears, "ls /" crashes in
read_pseudodir and "ps" reports "/proc not mounted".
- CONFIG_SYSTEM_NXINIT=y added, plus its direct Kconfig dependencies
(CONFIG_EXPERIMENTAL, CONFIG_LIBC_EXECFUNCS, CONFIG_SCHED_CHILD_STATUS,
which depends on CONFIG_SCHED_HAVE_PARENT)
- CONFIG_SYSTEM_NSH_STACKSIZE=8192 added: nsh now runs as a service
spawned by init.rc instead of being init itself, so the shell
workload is carried by its own stack rather than the init stack.
Without this it falls back to CONFIG_DEFAULT_TASK_STACKSIZE (2048
unless the defconfig overrides it) and crashes in getumask while
running "ps", too small to reach the procfs read path.
- ETC_ROMFS/FS_ROMFS added where missing, needed to ship init.rc via
the board's ROMFS
nsh continues to run as a console service started by init.rc
(boards/xtensa/esp32s3/common/src/etc/init.d/init.rc), not as the
top-level init.
Verified all 6 defconfigs (audio, buttons, lcd, lvgl, nsh, ws2812)
build cleanly with make. Runtime behavior (init_main spawning nsh as
a console service) was confirmed on lckfb-szpi-esp32s3 hardware, which
shares the same nxinit/init.rc mechanism; this board has no hardware
attached for a flash/boot pass in this session, so the build-verified
defconfigs are the extent of local testing here.
Assisted-by: Kiro:claude-sonnet-5
Assisted-by: Kiro:claude-opus-5
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
Switch all esp32s3-korvo-2 defconfigs (audio, nsh, rtptools, sdmmc)
from nsh_main to nxinit (init_main) as the system init entry point,
matching the lckfb-szpi-esp32s3 board's existing nxinit configs (see
73c949c87e) for consistency across esp32s3 boards.
For each defconfig:
- CONFIG_INIT_ENTRYPOINT switched to "init_main"
- CONFIG_INIT_STACKSIZE set to 8192. Measured on lckfb-szpi-esp32s3
with CONFIG_STACK_COLORATION=y on the worst case available: a config
whose init.rc starts two services (console sh + adbd). At the 2048
Kconfig default the board panics at runtime (xtensa_user_panic, task
"sh"); at 4096 init_main reaches FILLED=99.5%, i.e. no headroom; at
8192 it settles at USED=4336 (53.6%). A single-service config only
fills 46.9% of a 3072-byte init stack, so 8192 is deliberately
uniform rather than minimal: it covers the two-service worst case
with roughly 2x margin and keeps every defconfig off the 2048
default, where the init stack overflows and clobbers the global
inode/mount tree - the procfs mount disappears, "ls /" crashes in
read_pseudodir and "ps" reports "/proc not mounted".
- CONFIG_SYSTEM_NXINIT=y added, plus its direct Kconfig dependencies
(CONFIG_EXPERIMENTAL, CONFIG_LIBC_EXECFUNCS, CONFIG_SCHED_CHILD_STATUS,
which depends on CONFIG_SCHED_HAVE_PARENT)
- CONFIG_SYSTEM_NSH_STACKSIZE=8192 added: nsh now runs as a service
spawned by init.rc instead of being init itself, so the shell
workload is carried by its own stack rather than the init stack.
Without this it falls back to CONFIG_DEFAULT_TASK_STACKSIZE (2048
unless the defconfig overrides it) and crashes in getumask while
running "ps", too small to reach the procfs read path.
- ETC_ROMFS/FS_ROMFS added where missing, needed to ship init.rc via
the board's ROMFS
nsh continues to run as a console service started by init.rc
(boards/xtensa/esp32s3/common/src/etc/init.d/init.rc), not as the
top-level init.
Verified all 4 defconfigs (audio, nsh, rtptools, sdmmc) build cleanly
with make. Runtime behavior (init_main spawning nsh as a console
service) was confirmed on lckfb-szpi-esp32s3 hardware, which shares
the same nxinit/init.rc mechanism; this board has no hardware attached
for a flash/boot pass in this session, so the build-verified
defconfigs are the extent of local testing here.
Assisted-by: Kiro:claude-sonnet-5
Assisted-by: Kiro:claude-opus-5
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
Switch all esp32s3-eye defconfigs (gpio, i2c, lcd, nsh, usbnsh, wifi)
from nsh_main to nxinit (init_main) as the system init entry point,
matching the lckfb-szpi-esp32s3 board's existing nxinit configs (see
73c949c87e) for consistency across esp32s3 boards.
For each defconfig:
- CONFIG_INIT_ENTRYPOINT switched to "init_main"
- CONFIG_INIT_STACKSIZE set to 8192. Measured on lckfb-szpi-esp32s3
with CONFIG_STACK_COLORATION=y on the worst case available: a config
whose init.rc starts two services (console sh + adbd). At the 2048
Kconfig default the board panics at runtime (xtensa_user_panic, task
"sh"); at 4096 init_main reaches FILLED=99.5%, i.e. no headroom; at
8192 it settles at USED=4336 (53.6%). A single-service config only
fills 46.9% of a 3072-byte init stack, so 8192 is deliberately
uniform rather than minimal: it covers the two-service worst case
with roughly 2x margin and keeps every defconfig off the 2048
default, where the init stack overflows and clobbers the global
inode/mount tree - the procfs mount disappears, "ls /" crashes in
read_pseudodir and "ps" reports "/proc not mounted".
- CONFIG_SYSTEM_NXINIT=y added, plus its direct Kconfig dependencies
(CONFIG_EXPERIMENTAL, CONFIG_LIBC_EXECFUNCS, CONFIG_SCHED_CHILD_STATUS,
which depends on CONFIG_SCHED_HAVE_PARENT)
- CONFIG_SYSTEM_NSH_STACKSIZE=8192 added: nsh now runs as a service
spawned by init.rc instead of being init itself, so the shell
workload is carried by its own stack rather than the init stack.
Without this it falls back to CONFIG_DEFAULT_TASK_STACKSIZE (2048
unless the defconfig overrides it) and crashes in getumask while
running "ps", too small to reach the procfs read path.
- ETC_ROMFS/FS_ROMFS added where missing, needed to ship init.rc via
the board's ROMFS
nsh continues to run as a console service started by init.rc
(boards/xtensa/esp32s3/common/src/etc/init.d/init.rc), not as the
top-level init.
Verified all 6 defconfigs (gpio, i2c, lcd, nsh, usbnsh, wifi) build
cleanly with make. Runtime behavior (init_main spawning nsh as a
console service) was confirmed on lckfb-szpi-esp32s3 hardware, which
shares the same nxinit/init.rc mechanism; this board has no hardware
attached for a flash/boot pass in this session, so the build-verified
defconfigs are the extent of local testing here.
Assisted-by: Kiro:claude-sonnet-5
Assisted-by: Kiro:claude-opus-5
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
Switch all esp32s3-devkit defconfigs still on nsh_main (adc, audio,
ble, blewifi, buttons, capture, crypto, cxx, efuse, elf, eth_lan9250,
fastboot, fastboot_tcp, gpio, i2c, i2schar, knsh, ksta_softap, mbedtls,
mcuboot_nsh, mcuboot_update_agent, motor, nsh, nxlooper, oneshot,
ostest, pm, psram_octal, psram_quad, psram_usrheap, pwm, python,
qemu_debug, qemu_openeth, qemu_toywasm, qencoder, random, rmt, romfs,
rtc, sdm, sdmmc, sdmmc_spi, smp, sotest, spi, spiflash, spislv,
sta_softap, stack, temperature_sensor, tickless, timer, toywasm, twai,
ulp, usb_device, usbnsh, watchdog, wifi) to nxinit (init_main) as the
system init entry point, matching this board's adb/txtable configs
that already use nxinit, and matching the lckfb-szpi-esp32s3 board
(see 73c949c87e) for consistency across esp32s3 boards.
For each defconfig:
- CONFIG_INIT_ENTRYPOINT switched to "init_main"
- CONFIG_INIT_STACKSIZE set to 8192. Measured on lckfb-szpi-esp32s3
with CONFIG_STACK_COLORATION=y on the worst case available: a config
whose init.rc starts two services (console sh + adbd). At the 2048
Kconfig default the board panics at runtime (xtensa_user_panic, task
"sh"); at 4096 init_main reaches FILLED=99.5%, i.e. no headroom; at
8192 it settles at USED=4336 (53.6%). A single-service config only
fills 46.9% of a 3072-byte init stack, so 8192 is deliberately
uniform rather than minimal: it covers the two-service worst case
with roughly 2x margin and keeps every defconfig off the 2048
default, where the init stack overflows and clobbers the global
inode/mount tree - the procfs mount disappears, "ls /" crashes in
read_pseudodir and "ps" reports "/proc not mounted".
- CONFIG_SYSTEM_NXINIT=y added, plus its direct Kconfig dependencies
(CONFIG_EXPERIMENTAL, CONFIG_LIBC_EXECFUNCS, CONFIG_SCHED_CHILD_STATUS,
which depends on CONFIG_SCHED_HAVE_PARENT)
- CONFIG_SYSTEM_NSH_STACKSIZE=8192 added: nsh now runs as a service
spawned by init.rc instead of being init itself, so the shell
workload is carried by its own stack rather than the init stack.
Without this it falls back to CONFIG_DEFAULT_TASK_STACKSIZE (2048
unless the defconfig overrides it) and crashes in getumask while
running "ps", too small to reach the procfs read path.
esp32s3-devkit:stack was the only defconfig that already set this
option (at 4096); it is raised to 8192 with the rest.
- ETC_ROMFS/FS_ROMFS added where missing, needed to ship init.rc via
the board's ROMFS
nsh continues to run as a console service started by init.rc
(boards/xtensa/esp32s3/common/src/etc/init.d/init.rc), not as the
top-level init, matching this board's existing adb/txtable configs.
Verified 59 of the 60 changed defconfigs build cleanly with make.
esp32s3-devkit:qemu_openeth fails to link on this host both before
and after this change (MERGEBIN error: missing ESPTOOL_BINDIR, a
pre-existing local build-invocation issue unrelated to this patch).
esp32s3-devkit:stack segfaults the linker on this host both before
and after this change (pre-existing toolchain issue on this host,
unrelated to this patch). esp32s3-devkit:ulp fails at context/rule
generation on this host due to a missing local RISC-V ULP toolchain
setup, also unrelated to this patch.
Runtime behavior (init_main spawning nsh as a console service) was
confirmed on lckfb-szpi-esp32s3 hardware, which shares the same
nxinit/init.rc mechanism; this board has no hardware attached for a
flash/boot pass in this session, so the build-verified defconfigs are
the extent of local testing here.
Assisted-by: Kiro:claude-sonnet-5
Assisted-by: Kiro:claude-opus-5
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
Switch all esp32s3-box defconfigs (buttons, lvgl, lvgl-3, nsh,
touchscreen) from nsh_main to nxinit (init_main) as the system init
entry point, matching the lckfb-szpi-esp32s3 board's existing nxinit
configs (see 73c949c87e) for consistency across esp32s3 boards.
For each defconfig:
- CONFIG_INIT_ENTRYPOINT switched to "init_main"
- CONFIG_INIT_STACKSIZE set to 8192. Measured on lckfb-szpi-esp32s3
with CONFIG_STACK_COLORATION=y on the worst case available: a config
whose init.rc starts two services (console sh + adbd). At the 2048
Kconfig default the board panics at runtime (xtensa_user_panic, task
"sh"); at 4096 init_main reaches FILLED=99.5%, i.e. no headroom; at
8192 it settles at USED=4336 (53.6%). A single-service config only
fills 46.9% of a 3072-byte init stack, so 8192 is deliberately
uniform rather than minimal: it covers the two-service worst case
with roughly 2x margin and keeps every defconfig off the 2048
default, where the init stack overflows and clobbers the global
inode/mount tree - the procfs mount disappears, "ls /" crashes in
read_pseudodir and "ps" reports "/proc not mounted".
- CONFIG_SYSTEM_NXINIT=y added, plus its direct Kconfig dependencies
(CONFIG_EXPERIMENTAL, CONFIG_LIBC_EXECFUNCS, CONFIG_SCHED_CHILD_STATUS,
which depends on CONFIG_SCHED_HAVE_PARENT)
- CONFIG_SYSTEM_NSH_STACKSIZE=8192 added: nsh now runs as a service
spawned by init.rc instead of being init itself, so the shell
workload is carried by its own stack rather than the init stack.
Without this it falls back to CONFIG_DEFAULT_TASK_STACKSIZE (2048
unless the defconfig overrides it) and crashes in getumask while
running "ps", too small to reach the procfs read path.
- ETC_ROMFS/FS_ROMFS added where missing, needed to ship init.rc via
the board's ROMFS
nsh continues to run as a console service started by init.rc
(boards/xtensa/esp32s3/common/src/etc/init.d/init.rc), not as the
top-level init.
Verified all 5 defconfigs (buttons, lvgl, lvgl-3, nsh, touchscreen)
build cleanly with make. Runtime behavior (init_main spawning nsh as
a console service) was confirmed on lckfb-szpi-esp32s3 hardware, which
shares the same nxinit/init.rc mechanism; this board has no hardware
attached for a flash/boot pass in this session, so the build-verified
defconfigs are the extent of local testing here.
Assisted-by: Kiro:claude-sonnet-5
Assisted-by: Kiro:claude-opus-5
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
Switch all lckfb-szpi-esp32s3 defconfigs from nsh_main to nxinit
(init_main) as the system init entry point, for consistency across
the whole board (adb and txtable already used nxinit, see
73c949c87e).
For each defconfig (adb, camera, es7210, fastboot, fastboot_tcp,
gc0308, gpio, lcd, lvgl, nsh, pca9557, psram, pwm, qmi8658, sdmmc,
usb_device, uvc, vncviewer):
- CONFIG_INIT_ENTRYPOINT="nsh_main" -> "init_main"
- CONFIG_INIT_STACKSIZE raised to 8192. The default init and nsh
stacks overflow at runtime on this target: init_main overflows a
smaller stack (observed 100% usage with a corrupted task name),
clobbering the global inode/mount tree so the procfs mount
installed by board bringup disappears; "ls /" then crashes in
read_pseudodir and "ps" reports "/proc not mounted". Raising
CONFIG_INIT_STACKSIZE to 8192 drops init_main to about 61% usage
on hardware, and /proc stays mounted.
- CONFIG_SYSTEM_NXINIT=y added, plus its direct Kconfig dependencies
(CONFIG_EXPERIMENTAL, CONFIG_LIBC_EXECFUNCS, CONFIG_SCHED_CHILD_STATUS
which in turn selects CONFIG_SCHED_HAVE_PARENT)
- CONFIG_SYSTEM_NSH_STACKSIZE=8192 added: the nsh console service
launched by init.rc also needs a larger stack, otherwise it
crashes in getumask while running "ps" because its stack is too
small to reach the procfs read path.
- ETC_ROMFS/FS_ROMFS added where missing, needed to ship init.rc via
the board's ROMFS
nsh continues to run as a console service started by init.rc
(boards/xtensa/esp32s3/common/src/etc/init.d/init.rc), not as the
top-level init, matching the adb/txtable configs.
Verified all 20 defconfigs (adb, camera, es7210, fastboot,
fastboot_tcp, fastboot_usb, gc0308, gpio, lcd, lvgl, nsh, pca9557,
psram, pwm, qmi8658, sdmmc, txtable, usb_device, uvc, vncviewer) build
cleanly with `make`. Flashed nsh and es7210 to hardware:
- nsh: UART0 console reachable, "ps" shows init_main (PID 2) as the
parent of nsh's "sh" (PID 3).
- es7210: adb reachable, "ps" shows init_main (PID 4) as the parent of
both "sh" (PID 5) and "adbd" (PID 6).
Assisted-by: Kiro:claude-sonnet-5
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
SPI support was added to nucleo-h563zi without the CMakeLists.txt
SRCS list being updated to build stm32_spi.c. Add it.
Signed-off-by: Liam Howatt <liamhowatt@geotab.com>
Adds PSEUDOTERM as selected Kconfig option on lvglterm demo defconfigs.
Required after changes on lvgl_term example app.
Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
Add an NXTerm framebuffer configuration for QEMU and Intel64 hardware.
Enable USB keyboard input, PCI serial logging, CPython, and serial fallback.
Signed-off-by: raiden00pl <raiden00@railab.me>
Add HSI48 clock selection, USB pull-up control, automatic CDC/ACM registration during board bring-up, USB test configurations, and board documentation.
Assisted-by: OpenAI Codex
Signed-off-by: jsanchez-2g <jsanchez@2g-eng.com>