Iterate the NVIC interrupt enable and priority registers from
STM32_IRQ_NEXTINTS instead of dumping a hardcoded U3/U5 register list,
so the helper works unchanged for any interrupt count.
Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: Claude Code
Rename the U3/U5 idle, NVIC, and SysTick sources to the Cortex-M33 v1
naming convention: stm32_idle_m33_v1.c, stm32_irq_m33_v1.c, and
stm32_timerisr_m33_v1.c, and move them into their own Make and CMake
block, still selected by the direct U3/U5 family condition.
Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: Claude Code
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>
Blank lines only; `git diff --ignore-blank-lines` against the parent is empty.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
MAXMB resets to 0x0f, so OR-ing the intended value into MCR can only ever
raise it. Every configuration with fewer than 16 mailboxes therefore runs with
MAXMB = 15 and FlexCAN arbitrates over mailboxes the driver never initialised:
with the classic payload layout MB14 and MB15 hold power-on contents, and with
a 64-byte CAN FD layout they are past the end of the mailbox RAM region
entirely.
s32k1xx_flexcan.c already does this; carry the same two lines over.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
imxrt_transmit() wrote the caller's deadline into txmb[] before testing
whether it had already passed, and the early return for an expired deadline
then left that deadline behind on a mailbox holding no frame. The next
watchdog expiry finds it, counts a transmit timeout that did not happen, and
writes CAN_TXMB_ABORT into a mailbox the allocator may have handed to a live
frame in the meantime.
Compute the timeout first and store the deadline after the early return.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
imxrt_txtimeout_work() had four defects that together let one expired frame
take the interface down permanently.
It aborted mailbox RXMBCOUNT + mbi while the deadline it consulted belongs to
RXMBCOUNT + 1 + mbi, so every abort landed one mailbox low and mbi == 0 wrote
CAN_TXMB_ABORT into the buffer reserved for the ERR005829 workaround, while
the highest TX mailbox was never aborted at all.
Its expiry test read `now.tv_sec > d.tv_sec || now.tv_usec > d.tv_usec`, which
declares any deadline that crosses a second boundary expired: in that case the
deadline's microsecond field is always the smaller of the two. The `now` it
compared against was a struct timespec cast to a struct timeval, so writing
tv_usec wrote over tv_nsec and tv_sec was whatever the cast happened to line
up with.
imxrt_txdone() cancelled the watchdog but left txmb[].deadline set, so a
retired mailbox looked expired forever and the next watchdog expiry on any
other mailbox aborted whatever frame had since been loaded there.
The walk ran to TXMBCOUNT, which counts the reserved mailbox as well, so its
last iteration addressed mailbox TOTALMBCOUNT - one past the ring, and
mb_address[] one past its end. Only txmb[] never being written that far kept
it in bounds. TXMBRINGSIZE now names the ring size that the rest of the driver
already assumes.
Aborting a frame that is already on the wire raises a bit error, so the
transmit error counter climbs and the node goes error passive. Since
imxrt_txmb_next() only hands out a mailbox above every pending one, a mailbox
left in DATAORREMOTE also pins the allocator at TOTALMBCOUNT and transmit
never recovers.
Measured on an ARK FMU-v6XRT with a DroneCAN GNSS node on the bus, offering
736 frames/s (9% of a 1 Mbit/s bus) from the PX4 uavcan driver: before, the
interface transmitted 0 frames/s with ECR[TXERRCNT] pinned at 128 and
ESR1[FLTCONF] error passive, and stayed dead across a reboot. After, 734
frames/s, 0.1% loss, TXERRCNT 0, error active.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
Add generic support for link-time registration of struct instances,
modeled after the Zephyr STRUCT_SECTION_* mechanism:
- include/nuttx/iterable_sections.h: STRUCT_SECTION_ITERABLE/DECLARE/
FOREACH/GET/COUNT macros placing instances in name-sorted linker
sections delimited by _<type>_list_start/_end symbols (attributes
through the nuttx/compiler.h macros; FOREACH takes a caller-declared
iterator, like list_for_every_entry).
- include/nuttx/linker/iterable_sections.ld: ITERABLE_SECTION() macro
emitting the KEEP + SORT_BY_NAME collection statements (linker
scripts in ARCHSCRIPT are CPP-preprocessed).
- include/nuttx/linker/common-rom.ld / common-ram.ld: central
aggregators meant to be included by board linker scripts (inside
.text and .data respectively); subsystems register their sections
here guarded by their Kconfig options, so the fragments expand to
nothing on configurations that do not use them.
- CONFIG_ITERABLE_SECTIONS_LINKER_INSERT + include/nuttx/linker/
common-insert.ld (added before the board script by tools/Config.mk and
by the top-level CMakeLists.txt): optional zero-touch mode that
supplements the board script through GNU ld INSERT AFTER, collecting
the subsystems' ITERABLE_SECTION blocks in one output section; the
common-rom.ld/common-ram.ld fragments expand to nothing in that mode.
See the option help for the constraints.
- Documentation/components/iterable_sections.rst.
First user: the Zephyr zbus message bus port (apps/system/zbus in
nuttx-apps); its board integration comes in a companion PR.
Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>
Reviewers on apps#3751 (support compound command and resetcause-based
triggers) asked for documentation of the new features. Add two
sections to the nxinit doc:
- "Built-in Properties": describes the sys.boot.reason property set
by NXInit at startup from BOARDIOC_RESET_CAUSE, its two value forms
(hardware cause with numeric subreason, or software reset reason
string), and behavior when CONFIG_BOARDCTL_RESET_CAUSE is disabled
or the boardctl() call fails.
- "Compound Commands": describes the && / || short-circuit semantics
for chaining commands on a single action line, including quoting
behavior.
Assisted-by: GitHubCopilot:claude-sonnet-5
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
The idle stack area started at _ebss + CONFIG_IDLETHREAD_STACKSIZE *
CONFIG_SMP_NCPUS, so the first CONFIG_SMP_NCPUS stack slots after .bss
were never used - 16MiB on a 4-CPU configuration with a 4MiB idle
stack. Start the area at _ebss and let the heap begin that much
earlier.
The -16 offset is kept: it is what places the AP initial RSP set up in
intel64_head.S below the xcp->regs block that up_cpu_idlestack()
reserves at the top of the same stack. Without it both land on the
same 64-byte slot and the first context save corrupts the AP stack.
Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: Claude Code
intel64 port explicitly enumerates five idle-stack
addresses and rejects configurations with more than five CPUs.
Store the CPU0 stack top and calculate every CPU stack address
from its index.
Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: Claude Code
The AP boot path masked RSP with ~XCPTCONTEXT_SIZE, which just clears
whichever bits happen to be set in the size (0x340 -> mask 0xfffffcbf).
That drops RSP by an arbitrary amount and only guarantees 16-byte
alignment, while the XSAVE area in the context needs 64.
Mask with ~(XCPTCONTEXT_ALIGN - 1) instead.
Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: Claude Code
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>
The standard asks for a blank line between the local declarations at the
head of a function and the code. A declaration is recognised by its
shape, since no list of type names can be complete.
Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: Claude Code
Alternatives selected by conditional compilation share the braces that
follow, and a branch may hold statements before reaching its condition.
Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: Claude Code
nxstyle now checks case labels against their enclosing brace, and the
DWC2-derived OTG device drivers align every case label with the switch
brace itself, so any change that touches one of these files fails
checkpatch on hundreds of pre-existing lines.
Indent the switch bodies by two columns as the standard requires and
re-wrap the lines that this pushes past the width limit. Whitespace and
comment re-flow only; no code changes.
Assisted-by: Claude:claude-fable-5
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
Every DWC2-derived USB device driver enables USBSUSP in GINTMSK but not
WKUP, and every one of them ANDs GINTSTS with GINTMSK before dispatch.
The resume handler is therefore unreachable: CLASS_SUSPEND is delivered
on suspend, CLASS_RESUME never is.
For CDC/ACM that is fatal. cdcacm_suspend() calls uart_connected(false),
after which serial.c refuses every open() and write() with -ENOTCONN,
and the cdcacm_resume() that would clear it never runs. On a Linux host
with the default USB autosuspend (power/control=auto, 2000 ms) simply
closing the tty is enough to trip it, and the port stays dead for the
rest of the boot while the device remains enumerated.
Verified on STM32H7 (ARK FMU v6X): before, one host suspend leaves the
CDC/ACM port permanently -ENOTCONN; after, ten forced suspend/resume
cycles all recover with the MAVLink stream intact. The remaining
drivers carry a line-for-line copy of the same initialisation.
Assisted-by: Claude:claude-fable-5
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.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>
Add LPTIM 1, 3, 4, 5 support. Based on STM32H7. setperiod and
setcompare have been made to wait for the auto-reload value to
be applied before returning.
6 is absent since generic stm32 configs for a 6th LPTIM are not
present yet. 2 is absent for no good reason besides maybe
that it's in a different RCC APB register. I am not adding
support last-minute without more testing. The build fails
noisily when LPTIM2 is enabled so the shortcoming is clear.
Corrected some RCC definitions. They are needed for selecting the LPTIMx
clock source. This is not done in the LPTIM driver. It is done
outside and the definitions should ideally be correct for that.
Signed-off-by: Liam Howatt <liamhowatt@geotab.com>
Co-authored-by: Farzan Farhangian <farzanfarhangian@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>
The fixed list of type names holds neither uint64_t nor any NuttX
typedef, so declarations using them went unchecked.
Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: Claude Code
The brace was compared against the line before it rather than the line
the statement began on, so a macro broken over two lines was reported.
Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: Claude Code
imxrt_transmit() handed out the lowest free TX mailbox. FlexCAN breaks an
arbitration tie between mailboxes holding equal CAN IDs by taking the lowest
mailbox number, so refilling a just-drained low mailbox while older frames
are still pending in higher ones puts the newer frame on the wire first.
imxrt_txdone_work() re-polls after each individual TX completion, which is
exactly the condition that triggers it.
Every frame of a multi-frame transport transfer carries the same CAN ID, so
this reorders transfers. On a DroneCAN bus the receiver sees a broken toggle
bit and discards the transfer: measured on the wire, a 6-frame message from
an i.MX RT1176 failed 82% of the time, while a node on the same bus running
a different controller was flawless over the same capture.
Hand out a mailbox above every pending one instead, and wrap back to the
bottom only once the ring has drained. Ordering then holds for any transfer
length; the cost is that the ring stalls at a wrap rather than refilling
immediately.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
Correct the switch case label indentation in imxrt_netinitialize(), the brace
alignment in imxrt_ioctl(), and the indentation of the ERR005829 workaround
statements so imxrt_flexcan.c passes nxstyle. The last of these is only
reported since commit c81cc02e83.
These predate this series; CONTRIBUTING.md section 2.1 asks that modified
files be brought into compliance even where the contributor did not introduce
the problem.
Whitespace only, no functional change: `git diff -w` against the parent is
empty.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
Select LIBC_ATOMIC_ARCH for TriCore when not using Tasking toolchain,
so that the tricore arch-atomic implementation is used instead of
the toolchain builtin.
Signed-off-by: zhangyu117 <zhangyu117@xiaomi.com>
Replace ILLD intrinsics (__swap, __ld32, __cmpAndSwap) with inline
assembly functions (tricore_atomic_swap, tricore_atomic_cmpswap) to
remove the dependency on IfxCpu_Intrinsics.h.
Also fix the expect parameter type to use volatile void * to match
the declaration in atomic.h, avoiding type conflicts.
Signed-off-by: zhangyu117 <zhangyu117@xiaomi.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>
PCI endpoints cannot perform memory transactions when a bridge in
their hierarchy has memory forwarding or bus mastering disabled.
Firmware may leave these bits clear when handing a device over
after PXE boot.
Enable both bits on every parent bridge before enabling the
endpoint.
Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: Claude Code
Only lines beginning with a C keyword were checked, so an assignment or
a call could sit at any column.
Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: Claude Code