Commit graph

61837 commits

Author SHA1 Message Date
zhangyu117
02833038fd arch/tricore: Full implementation of setjmp and longjmp.
1. The original method of restoring the register context relies on
   the ret instruction, which does not conform to the semantics of
   longjmp not returning.
2. There are csa leak during longjmp and need recycle.

Signed-off-by: zhangyu117 <zhangyu117@xiaomi.com>
2026-05-22 00:38:02 +08:00
zhangyuan29
e087d0f79d arch/tricore: Support setjmp and longjmp.
Add setjmp/longjmp support for TriCore architecture using iLLD
intrinsics to save and restore the CSA (Context Save Area) chain.

This implementation saves upper/lower context registers and walks
the CSA linked list to restore the full call context on longjmp.

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2026-05-22 00:38:02 +08:00
hanzhijian
fd907e6ef4 sim: pass no-pie through gcc driver
Pass -no-pie through the gcc driver instead of forwarding it as -Wl,-no-pie.

On Ubuntu 20 with GCC 9, sim:nsh failed during the final link step with /usr/bin/ld: cannot find -lgcc_s.

This change fixes the link failure in that environment.

Signed-off-by: hanzhijian <hanzhijian@zepp.com>
2026-05-21 10:53:00 -03:00
Eren Terzioglu
50352c5b75 Docs/platforms/risc-v: Add Analog Comparator docs for esp32[-h2|-p4]
Add Analog Comparator docs for esp32h2 and esp32p4

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-05-21 09:38:58 -04:00
Eren Terzioglu
2769b27efd boards/risc-v/espressif: Add Analog Comparator board support for esp32[-h2|-p4]
Add Analog Comparator board support for esp32p4 and esp32h2

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-05-21 09:38:58 -04:00
Eren Terzioglu
df27531c09 arch/risc-v/espressif: Add Analog Comparator for esp32[-h2|-p4]
Add analog comparator support for esp32p4 and esp32h2

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-05-21 09:38:58 -04:00
Peter Barada
2230d32595 Documentation/nucleo-h753zi: Add board image
Add missing NUCLEO-H753ZI board image.

Signed-off-by: Peter Barada <peter.barada@gmail.com>
2026-05-21 08:56:24 +02:00
Peter Barada
1840cbe63d Documentation/nucleo-h753zi: Fix typo in test log
Fix typo in string written to SD card; its "This", not "Thos".

Signed-off-by: Peter Barada <peter.barada@gmail.com>
2026-05-21 08:56:24 +02:00
Peter Barada
fc2f6c9fc5 boards/arm/stm32h7: Add support fpr nucleo-h753zi board
Add BSP for the NUCLEO-H753ZI board using nucleo-h743zi2 as base.

Signed-off-by: Peter Barada <peter.barada@gmail.com>
2026-05-21 08:56:24 +02:00
hanzhijian
ad182bcb4b sim: resolve host symbols eagerly on Linux
Resolve PLT entries at load time on Linux hosts so early host calls do not enter the lazy binder with simulated interrupts masked.

On Ubuntu 20 with GCC 9, the sim:nsh binary linked successfully after the -no-pie fix but crashed very early at runtime inside _dl_fixup / _dl_runtime_resolve_xsavec when up_irq_save() triggered a first-time PLT resolution.

Setting LD_BIND_NOW=1 avoided the crash and allowed NSH to start, which showed lazy binding was the trigger.

Signed-off-by: hanzhijian <hanzhijian@zepp.com>
2026-05-21 08:55:39 +02:00
liwenxiang1
bb27808631 arch/tricore: Improve up_backtrace implementation
1. Make tricore_backtrace.c conditional on CONFIG_SCHED_BACKTRACE,
   consistent with RISC-V and ARM architectures.
2. Add NULL return address check to terminate early on invalid entries.
3. Fix non-current task backtrace to use regs[REG_LPCXI] which
   preserves the UL bit needed for correct CSA type identification.

Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2026-05-21 11:38:31 +08:00
zhangyu117
356f7c7b47 arch/tricore: Fix up_fpucmp to compare correct CSA region.
up_fpucmp was comparing lower CSA registers (offset 0) using upper CSA
register definitions (REG_D8-D15). Since up_saveusercontext stores:
  - Lower CSA at saveregs[0..15]
  - Upper CSA at saveregs[16..31]

The fix adds TC_CONTEXT_REGS offset to point to the upper CSA and
compares only D8-D15 which are the FPU data registers on TriCore.

Signed-off-by: zhangyu117 <zhangyu117@xiaomi.com>
2026-05-21 11:34:14 +08:00
zhangyu117
4e648c1693 tricore/fpu: Support tricore fpucmp for float.
Implement up_fpucmp to compare FPU register state between two
saved contexts. This is used by the ostest FPU test to verify
that FPU registers are properly preserved across context switches.

Signed-off-by: zhangyu117 <zhangyu117@xiaomi.com>
2026-05-21 11:34:14 +08:00
zhangyuan29
51ebb21474 tricore: Add fpu init to open FZ trap.
Initialize the FPU and enable the FZ (flush-to-zero) trap for
TriCore TC4xx processors. This ensures floating-point divide-by-zero
exceptions are properly caught and reported via the trap handler.

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2026-05-21 11:34:14 +08:00
raiden00pl
980b7b1e27 arch/stm32f0l0g0/stm32_pwm.h: restore mapping for STM32F0L0G0_PWM_MULTICHAN=n
restore mapping for CONFIG_STM32F0L0G0_PWM_MULTICHAN=n.

It should not be removed in 4df80e1928

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-21 06:30:36 +08:00
zhangyu117
a4e9584715 arch/tricore: optimize perf counter conversion with fast integer division
for tc3xx, without div64 hw inst:
gcc toolchain software way: 684ns
tasking toolchain software way: 3516ns.
invdiv_u64: 182ns

for tc4xx, with div64 hw inst:
div64 hw inst cost 182ns.
invdiv_u64: 125ns

Although there is a delay of tens of nanoseconds for tc4xx, the impact
on performance is minimal, but for simplicity, invdiv_u64 is used.

Signed-off-by: zhangyu117 <zhangyu117@xiaomi.com>
2026-05-21 06:29:18 +08:00
zhangyuan29
4f98bb32ae arch/tricore: add up_perf function for tricore
Add performance counter support for TriCore architecture using the
CPU clock counter (CCNT). Implements up_perf_init, up_perf_getfreq,
up_perf_gettime and up_perf_convert interfaces.

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2026-05-21 06:29:18 +08:00
Bowen Wang
426a5154d9 drivers/rptun: guard nxsched_waitpid with CONFIG_SCHED_WAITPID
nxsched_waitpid is only available when CONFIG_SCHED_WAITPID is
enabled. Wrap the call with #ifdef to fix the build error when
this option is disabled.

Signed-off-by: huojianchao <huojianchao@xiaomi.com>
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-05-21 06:28:36 +08:00
Bowen Wang
960bd97bb0 drivers/rpmsg: use NuttX atomic_t API instead of C11 atomics
Replace C11 atomic types and operations with NuttX native atomic
interfaces (atomic_t, atomic_set, atomic_fetch_and_acquire,
atomic_fetch_or_acquire) to avoid build failures on toolchains
that lack full C11 atomics support.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-05-21 06:28:36 +08:00
Carlos Sanchez
ee57ca0800 drivers/mtd/mx25rxx.c: add support for MX25L12873G
MX25L12873G is a SPI memory very similar to MX25L25673G,
but 128Mbit, which means it does not use 4-byte addresses.

Signed-off-by: Carlos Sanchez <carlossanchez@geotab.com>
2026-05-20 14:50:18 -03:00
dependabot[bot]
f657ea6031 build(deps): bump idna from 3.11 to 3.15 in /Documentation
Bumps [idna](https://github.com/kjd/idna) from 3.11 to 3.15.
- [Release notes](https://github.com/kjd/idna/releases)
- [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.md)
- [Commits](https://github.com/kjd/idna/compare/v3.11...v3.15)

---
updated-dependencies:
- dependency-name: idna
  dependency-version: '3.15'
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-20 13:13:59 -04:00
raiden00pl
4ee59f6b68 arch/stm32f0l0g0/stm32c0_rcc.h: fix TIM bits
fix wrong bits for TIM14-TIM17

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-20 13:13:01 -04:00
raiden00pl
4484f16efc boards/nucleo-c0XXX: add PWM support
add PWM support for nucleo-c071rb and nucleo-c092rc

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-20 13:13:01 -04:00
Filipe Cavalcanti
ec9a849e15 tools: add build path support on host_info tool
Adds a build_path argument for when CMake builds are used.
This solves a problem when building the nxdiag tool with CMake.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-05-20 13:12:38 -04:00
panzihao
191e250cc3 arch/tricore: Suspend stm when CPU stops
Fix break point cause suspend stm still running cause timer paused.

Signed-off-by: panzihao <panzihao@xiaomi.com>
2026-05-20 21:25:28 +08:00
Peter van der Perk
52ae08196d Docs/platforms/imxrt: Update chip support table.
Include i.MXRT1170 as supported chip and add newer unsupported chips.
Also updated the cache chapter to reflect current state of driver and
support.

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2026-05-20 17:34:30 +08:00
Alin Jerpelea
fee3c3d3aa AUTHORS: add Eren Terzioglu
Eren Terzioglu has submitted the ICLA and should be added to
the AUTHORS file

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2026-05-20 15:17:00 +08:00
Filipe Cavalcanti
5053734b50 arch/risc-v/espressif: Fix CMake irq.h header ordering race
Ensure esp-hal copied headers are generated during nuttx_context so parallel CMake builds cannot compile sources before arch/chip/irq.h exists.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-05-20 09:35:45 +08:00
donghaokun
f401467a94 arch/tricore: add TriCore up_backtrace() support
Implement up_backtrace() for TriCore by walking the CSA chain and
collecting return addresses from upper CSA A11 register.

Signed-off-by: LukeKun <donghaokun@lixiang.com>
2026-05-20 09:20:33 +08:00
Shoji Tokunaga
131cc703c5 git: Specify multiple build directories in .gitignore.
Change to allow ignoring multiple build directories.

Signed-off-by: Shoji Tokunaga <toku@mac.com>
2026-05-20 03:06:58 +08:00
Lwazi Dube
81dc339415 arch/arm: fix infinite loop in test and clean cache operations
Update the destination register to r15 (PC) for test and clean
operations, as specified by the ARM926EJ-S Technical Reference
Manual (TRM). Using the wrong destination register prevented the
loop condition from updating correctly, resulting in an infinite
loop.

Signed-off-by: Lwazi Dube <lwazeh@gmail.com>
2026-05-19 19:49:55 +08:00
Shoji Tokunaga
5349a5ab0c arch/sim: replace macOS C++ constructor runtime hack with post-link patch
- Invoke `codesign` and after lief rewrites the binary, so the modified
   Mach-O remains loadable on macOS.
- Run the patch script via a dedicated `sim_patch_macho_initsection`
  custom target attached to `nuttx_post`, instead of a POST_BUILD
  command on the `nuttx` target.

Signed-off-by: Shoji Tokunaga <toku@mac.com>
2026-05-19 07:08:55 -03:00
Xiang Xiao
754dfd980b arch/sim: replace macOS C++ constructor runtime hack with post-link patch
The sim architecture needs to defer C++ global constructors until after
NuttX kernel initialization completes. On macOS this was previously done
via a runtime hack (sim_macho_init.c): a __attribute__((constructor))
function intercepted constructors, saved them, and replayed them later.
That approach was fragile because it depended on constructor ordering
and required mprotect() to patch the read-only __mod_init_func section
at runtime.

This commit replaces the runtime hack with a post-link patching scheme:

  1. Link with -Wl,-ld_classic,-no_fixup_chains to keep the classic
     __mod_init_func pointer format (prevents ld64 from converting it
     to __init_offsets).
  2. Post-link, run patch_macho_initsection.py (python3 + lief) to
     patch Mach-O section type flags from
     MOD_INIT_FUNC_POINTERS/INIT_FUNC_OFFSETS to REGULAR, so dyld
     skips them entirely.
  3. Use the Mach-O auto-generated boundary symbols
     section$start$__DATA_CONST$__mod_init_func /
     section$end$__DATA_CONST$__mod_init_func, mapped via __asm()
     labels in arch/sim/include/arch.h to the common _sinit[]/_einit[]
     names used by lib_cxx_initialize().

Linux behavior is unchanged.

Changes:
  - arch/sim/include/arch.h: add macOS __asm() declarations for
    _sinit/_einit
  - arch/sim/src/Makefile: drop sim_macho_init.c HEADSRC handling,
    always pass -ld_classic,-no_fixup_chains on macOS, run
    patch_macho_initsection.py after link when CONFIG_HAVE_CXXINITIALIZE
  - arch/sim/src/sim/CMakeLists.txt: same for the CMake build
  - arch/sim/src/patch_macho_initsection.py: new lief-based patcher
  - arch/sim/src/sim/posix/sim_macho_init.c: deleted (135-line hack)
  - libs/libc/misc/lib_cxx_initialize.c: remove
    macho_call_saved_init_funcs special case; single unified loop

Testing:
  - macOS (Ventura VM): verified lief patching with standalone test
    (test_sinit7) confirming the constructor is deferred past main()
    and only invoked when explicitly called via the _sinit/_einit loop.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-05-19 07:08:55 -03:00
Eren Terzioglu
306de5b04b Docs/platforms/esp32p4: Add touch sensor docs
Add touch sensor docs for esp32[-p4]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-05-19 16:38:16 +08:00
Eren Terzioglu
9dca04a5cf boards/risc-v/esp32p4: Add touch sensor board support for esp32[-p4]
Add touch sensor board support for esp32p4

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-05-19 16:38:16 +08:00
Eren Terzioglu
c5c4670737 arch/risc-v/espressif: Add touch sensor support for esp32[-p4]
Add touch sensor support for esp32p4

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-05-19 16:38:16 +08:00
Xiang Xiao
2c9f91526a board: enable LTO on g431 nsh boards and fix LTO link with toolchain switch
For boards b-g431b-esc1/nsh, nucleo-g431kb/nsh and nucleo-g431rb/nsh,
the `.data` section of nuttx.elf overflows the 128 KB flash region by a
few hundred bytes on default GNU EABI builds:

    arm-none-eabi-ld: nuttx section `.data' will not fit in region `flash'
    arm-none-eabi-ld: region `flash' overflowed by 296 bytes

Enabling CONFIG_LTO_FULL=y in the corresponding defconfigs brings flash
usage back below the 128 KB limit (~93%).

Additionally, fix arch/arm/src/cmake/gcc.cmake so that when LTO is
enabled it always uses the gcc-ar / gcc-nm / gcc-ranlib wrappers, not
just when CONFIG_ARM_TOOLCHAIN_GNU_EABI is also set.  CI tooling (via
tools/testbuild.sh) configures cmake first, then flips the toolchain
choice in .config with kconfig-tweak before running `cmake --build`.
With the previous "ARM_TOOLCHAIN_GNU_EABI && !LTO_NONE" guard the
regen step would switch to plain `ar` for the .a files, even though the
linker driver picked at configure time is still arm-none-eabi-g++ and
the object files contain GCC LTO IR.  The result was a flood of
"undefined reference to `printf' / `free' / `puts' ..." link errors
when running tools/testbuild.sh -A -N -R on the *_CLANG variants.

Now that we are inside gcc.cmake the toolchain is unambiguously GCC,
so dropping the redundant CONFIG_ARM_TOOLCHAIN_GNU_EABI conjunct keeps
the LTO-aware ar wrappers in place across kconfig-tweak toolchain
switches.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-05-19 16:21:28 +08:00
Xiang Xiao
c020e6ef9a arch/esp32: Fix conflicting types for '_times_r'
D:/a/nuttx/nuttx/sources/nuttx/arch/risc-v/src/common/espressif/esp_libc_stubs.c:131:9: error: conflicting types for '_times_r'; have 'clock_t(struct _reent *, struct tms *)' {aka 'long long int(struct _reent *, struct tms *)'}
  131 | clock_t _times_r(struct _reent *r, struct tms *buf)
      |         ^~~~~~~~
In file included from D:/a/nuttx/nuttx/sources/nuttx/build/arch/risc-v/src/common/espressif/esp-hal-3rdparty/components/esp_rom/esp32c3/include/esp32c3/rom/libc_stubs.h:15,
                 from D:/a/nuttx/nuttx/sources/nuttx/arch/risc-v/src/common/espressif/esp_libc_stubs.c:44:
D:/a/nuttx/nuttx/sources/tools/riscv-none-elf-gcc/riscv-none-elf/include/reent.h:156:18: note: previous declaration of '_times_r' with type 'long unsigned int(struct _reent *, struct tms *)'
  156 | extern _CLOCK_T_ _times_r (struct _reent *, struct tms *);
      |                  ^~~~~~~~

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-05-19 16:21:28 +08:00
Xiang Xiao
9ff99c6d0f !nuttx: drop redundant casts on tv_sec/tv_nsec and fix printf formats
Now that time_t is unconditionally 64-bit (signed int64_t) and the
struct timespec fields tv_sec / tv_nsec are wide enough on their own,
the explicit (uint64_t)/(int64_t)/(int) casts that used to guard the
multiplications and subtractions in *_us / *_ms / *_ns helpers are no
longer needed.  Drop them to keep the timekeeping math readable and
consistent with the previous sclock_t/time_t cleanup.

In the same spirit, this commit also:

* Normalises the printf-style format specifiers and casts used to
  print tv_sec / tv_nsec / tv_usec values across arch/, drivers/,
  fs/, sched/ and libs/.  The prior code was a mix of
  "%d"/"%u"/"%ld"/"%lu"/"%lld"/PRIu32/PRIu64 with matching
  (int)/(unsigned long)/(long long)/PRIu* casts; some formats
  truncated time_t on 32-bit hosts, others mismatched signedness or
  width.  Replace all such cases with the portable POSIX-recommended
  forms:

    - tv_sec  (time_t,       signed, impl-defined width) -> %jd  + (intmax_t)
    - tv_nsec (long,         signed)                     -> %ld  (no cast)
    - tv_usec (suseconds_t / long)                       -> %ld  (no cast)

  Add #include <stdint.h> where required.

* Drops a few stale `(FAR const time_t *)&ts.tv_sec` casts and
  related `(FAR struct tm *)` / `(const time_t *)` casts in
  gmtime_r() / localtime_r() / gmtime() callers; ts.tv_sec is plain
  time_t now and the casts only obscured the type.

* Fixes one overflow in fs/procfs/fs_procfscritmon.c where
  all_time.tv_sec * 1000000 could overflow on 32-bit time_t before
  being multiplied again; cast to uint64_t at the start.

No behavioural change.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-05-19 16:21:28 +08:00
Xiang Xiao
c47b1e2c5b !sys/types.h: change time_t and clock_t to int64_t to align with other OSes
POSIX leaves the signedness of time_t and clock_t unspecified, but
mainstream implementations (Linux glibc/musl, the BSDs, macOS, RTEMS,
Zephyr's POSIX layer, Windows _time64) expose time_t as signed 64-bit.
NuttX has historically used uint64_t only because it was tied to the
CONFIG_SYSTEM_TIME64 knob; with that gone, switch:

  time_t   : uint64_t  -> int64_t
  clock_t  : uint64_t  -> int64_t
  CLOCK_MAX: UINT64_MAX -> INT64_MAX

This lets (time_t)-1 sentinels, negative tick deltas, and host-side
headers behave as on every other POSIX system without source churn.

Headers updated:
  - include/sys/types.h, include/limits.h, include/nuttx/clock.h
  - include/nuttx/fs/hostfs.h (nuttx_time_t alias)
  - include/nuttx/{mqueue.h,wdog.h,wqueue.h,timers/clkcnt.h}

Because clock_t is now signed 64-bit, the NuttX-internal sclock_t
alias becomes redundant: every sclock_t/SCLOCK_MAX use is folded
back to clock_t/CLOCK_MAX (notably in sched/wdog, sched/mqueue,
sched/sched, sched/clock, sched/timer, libs/libc/time, fs/vfs and
the drivers/arch consumers below).

Tick/period constants (NSEC_PER_SEC, USEC_PER_SEC, MSEC_PER_SEC,
SEC_PER_MIN, ...) in include/nuttx/clock.h are retyped from "long"
literals to INT64_C(...) so that 64-bit arithmetic no longer
depends on the host's long width.

Strip now-redundant (time_t)/(clock_t)/(unsigned long) casts and
unsigned-only branches across the tree:
  - arch RTC / oneshot / tickless lowerhalfs:
      arm: cxd56xx, efm32, imxrt, lc823450, max326xx, sam34, sama5,
           samd5e5, samv7, stm32, stm32f7, stm32h7, stm32l4, stm32wb,
           xmc4
      mips: pic32mz       sparc: bm3803       x86_64: intel64
      risc-v/xtensa: espressif (esp_i2c[_slave], esp_rtc,
           esp32c3{_i2c,_rtc,_wifi_adapter}, esp32{,s2,s3}_*),
           mpfs_perf
  - drivers: audio/tone, input/aw86225, power/pm/{activity,
           stability}_governor, rpmsg/rpmsg_ping,
           timers/{ds3231,mcp794xx,pcf85263,rx8010},
           wireless/ieee80211/bcm43xxx, wireless/spirit/spirit_spi
  - core: fs/vfs/{fs_poll,fs_timerfd}, mm/iob/iob_alloc,
          libs/libc/{netdb/lib_dnscache,time/{lib_calendar2utc,
          lib_time}}, net/icmp/icmp_pmtu, net/icmpv6/icmpv6_pmtu,
          net/ipfrag, net/tcp/{tcp.h,tcp_timer},
          net/utils/net_snoop, net/mld/mld_query (drop the now-dead
          mld_mrc2mrd helper since signed math handles it directly),
          sched/clock/{clock,clock_initialize},
          sched/sched/{sched_profil,sched_setparam,sched_setscheduler},
          sched/pthread/pthread_create,
          sched/wdog/{wd_gettime,wd_start,wdog.h},
          sched/timer/timer_gettime, sched/mqueue/*

Flip the few in-tree printf format strings that assumed an
unsigned 64-bit tv_sec:
  * drivers/rpmsg/rpmsg_ping.c                       PRIu64 -> PRId64
  * arch/xtensa/src/esp32{,s2,s3}/esp32*_oneshot_lowerhalf.c
                                          PRIu32 (already wrong) -> PRId64

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-05-19 16:21:28 +08:00
Xiang Xiao
c6654b1106 !sched/clock: remove CONFIG_SYSTEM_TIME64 and always use 64-bit time
The 32-bit system clock has a limited range (~497 days) and the
configuration knob is no longer worth the complexity given that
practically every modern target already enables it.  Make 64-bit
time_t/clock_t/sclock_t/nuttx_time_t the only supported flavor.

Specifically:
  - Drop the SYSTEM_TIME64 Kconfig option and its dependent
    PERF_OVERFLOW_CORRECTION/HRTIMER guards in sched/Kconfig.
  - Remove every #ifdef CONFIG_SYSTEM_TIME64 branch in headers
    (include/{sys/types.h,limits.h,inttypes.h,nuttx/clock.h,
    nuttx/fs/hostfs.h}) and core code paths
    (sched/clock/clock.h, drivers/power/pm/pm_procfs.c,
    drivers/rpmsg/rpmsg_ping.c, fs/procfs/fs_procfsuptime.c,
    libs/libc/wqueue/work_usrthread.c,
    arch/avr/src/avrdx/avrdx_timerisr_tickless_alarm.c).
  - Strip CONFIG_SYSTEM_TIME64=y from every board defconfig.
  - Update Documentation/guides/rust.rst accordingly.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-05-19 16:21:28 +08:00
Xiang Xiao
1b3af76bf3 !libc/stream: remove CONFIG_LIBC_LONG_LONG and always support long long
Long long support is now unconditional in printf/scanf and related
helpers. Remove the Kconfig option, the conditional compilation in
libvsprintf/libvscanf/ultoa_invert, the build-time #error in the
rn2xx3 driver, and clean up CONFIG_LIBC_LONG_LONG entries from all
board defconfigs.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-05-19 16:21:28 +08:00
Xiang Xiao
c32b683085 !compiler: drop CONFIG_HAVE_LONG_LONG and require long long support
Every compiler supported by NuttX provides the "long long" types,
so the CONFIG_HAVE_LONG_LONG indirection is no longer useful.
Remove the option from include/nuttx/compiler.h and treat
"long long" as unconditionally available across the OS.

In addition to deleting the guard itself, this commit unconditionally
enables the long-long flavored helpers that used to be gated behind
it:

  - libs/libc/fixedmath: drop the soft-emulated b32/ub32 routines
    in lib_fixedmath.c (-261 lines) and trim the matching
    prototypes, Make.defs and CMakeLists.txt entries; keep only
    the long-long backed implementations.
  - include/sys/endian.h, include/strings.h, libs/libc/string
    /lib_ffsll.c, lib_flsll.c: always expose the 64-bit byte-swap
    and ffsll/flsll variants.
  - libs/libm/libm/lib_llround{,f,l}.c: drop the empty stubs.
  - libs/libc/stdlib (atoll, llabs, lldiv, strtoll/ull, rand48,
    strtold), libs/libc/stream (libvsprintf, libvscanf,
    libbsprintf, ultoa_invert), libs/libc/misc (crc64, crc64emac),
    libs/libc/inttypes/strtoimax, libs/libc/lzf, libs/libc/libc.csv,
    libs/libc/string (memset, vikmemcpy): remove the
    #ifdef CONFIG_HAVE_LONG_LONG branches.
  - include/{stddef.h,stdlib.h,fixedmath.h,sys/epoll.h,cxx/cstdlib,
    nuttx/audio/audio.h,nuttx/crc64.h,nuttx/lib/math.h,
    nuttx/lib/math32.h,nuttx/lib/stdbit.h}: same guard cleanup.
  - drivers/note/note_driver.c, fs/spiffs/src/spiffs.h,
    sched/irq/irq_procfs.c: drop their local guards as well.
  - Documentation/applications/netutils/ntpclient/index.rst:
    refresh the documentation snippet.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-05-19 16:21:28 +08:00
Xiang Xiao
9a84223c1e sched/clock: Remove TIMER_MASK32 from clock.h
since it isn't used anymore

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-05-19 16:21:28 +08:00
Saurav Pal
4f6e695f7c fs/mnemofs: Add mnemofs version 1 support.
Split mnemofs into allocation, directory, file, CTZ, and read/write
modules, and update direntry traversal and file handling. Add superblock
format version 1 support, reject newer on-flash versions, and preserve
the mounted version when rewriting metadata.

Update the NAND simulator drivers for the new mnemofs behavior by fixing
spare writes, exposing the erase state, allowing raw reads, and documenting
the background-task startup flow.

Signed-off-by: Saurav Pal <resyfer.dev@gmail.com>
2026-05-19 10:29:11 +08:00
Carlos Santos
319ca656b8 drivers/video/vnc: fix typo in Kconfig
Mentioned header name is "kbd_codec.h", not "kbd_coded.h".

Signed-off-by: Carlos Santos <unixmania@gmail.com>
2026-05-19 08:40:22 +08:00
Eren Terzioglu
f21acd2213 Docs/platforms/risc-v: Add LPSPI and SPI3 docs for esp32[-p4]
Add LPSPI and SPI3 docs for esp32p4

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-05-19 02:04:35 +08:00
Eren Terzioglu
87b63402a7 boards/risc-v/esp32p4: Add LPSPI and SPI3 board support
Add LPSPI and SPI3 board support for esp32[-p4]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-05-19 02:04:35 +08:00
Eren Terzioglu
6497d57c30 arch/risc-v/espressif: Add LPSPI and SPI3 support
Add LPSPI and SPI3 support for esp32[-p4]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-05-19 02:04:35 +08:00
ImBonkers
f47e5394b5 Documentation/arm: Add STM32N6 and Nucleo-N657X0-Q
Add documentation for the STMicro STM32N6 chip family and the
Nucleo-N657X0-Q development board introduced in the previous two
commits.

  - platforms/arm/stm32n6/index.rst
        Chip overview: core, peripherals supported in the initial
        port, and a pointer to the board page.

  - platforms/arm/stm32n6/boards/nucleo-n657x0-q/index.rst
        Board page, structured per Documentation/contributing/
        doc_templates/board.rst: hardware summary, user LED and
        button pin map, the two shipped configs (nsh, ostest),
        and the DEV-mode flash recipe used to load NuttX into
        AXISRAM via ST-LINK.

  - platforms/arm/stm32n6/boards/nucleo-n657x0-q/nucleo-n657x0-q.jpg
        Photograph of the board, referenced from the board page.

The pages are picked up by the existing glob-based toctree in
Documentation/platforms/arm/index.rst, no parent index changes are
required.

Signed-off-by: ImBonkers <samuelnlinden@pm.me>
2026-05-18 14:50:29 -03:00