Commit Graph
62041 Commits
Author SHA1 Message Date
leisiji c28bdaa3c9 arch/arm/armv7-a: Fix L1 page table entry double-offset in addrenv create region
Build / Fetch-Source (push) Has been cancelled
Build / Linux-Arch (push) Has been cancelled
Build / Linux (push) Has been cancelled
Build / OOT-Build (push) Has been cancelled
Build / macOS-Arch (push) Has been cancelled
Build / macOS (push) Has been cancelled
Build / msys2-Arch (push) Has been cancelled
Build / msys2 (push) Has been cancelled
Build / msvc-Arch (push) Has been cancelled
Build / msvc (push) Has been cancelled
In arm_addrenv_create_region(), the inner loop already advances vaddr by
MM_PGSIZE for each mapped page, so after filling one L2 page table
(i.e., ENTRIES_PER_L2TABLE pages), vaddr has naturally advanced to the
start of the next 1MB section.  The old code additionally added
i * SECTION_SIZE, causing the L1 entry for the second and subsequent
sections to skip one section each iteration—leaving virtual address
holes in the mapping.

Remove the redundant i * SECTION_SIZE offset so that the L1 entry tracks
the vaddr already maintained by the inner loop, producing contiguous
section mappings.

Signed-off-by: leisiji <2265215145@qq.com>
2026-06-23 10:45:03 +08:00
Alan Carvalho de Assis ef4c8bc4b4 ci/test: Remove FTDI from CI to avoid failure
Even after installing the ftdi library on CI it doesn't work to
compile the sim:ft2232h_gpio, so remove it from CI test.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-06-23 10:02:28 +08:00
Catalin Visinescu 0076f35401 drivers/eeprom/i2c_xx24xx: Integer Overflow in I2C EEPROM ee24xx_seek()
The function seek which allows the user to move the cursor to a particular
offset in order to read and write from EEPROM storage does not validate the
offset is valid. Later, this can cause an out-of-bounds reads or writes.
Note that newpos may store a large value, larger than the size of the EEPROM.

Similar change in the SPI driver.

Tested locally, builds fine.

Signed-off-by: Catalin Visinescu <catalin_visinescu@yahoo.com>
2026-06-23 10:02:10 +08:00
hanzhijian 687471c0d9 drivers/clk: fix conflicting types in clk_register_* definitions
Update the function definitions in all 6 clk implementation files to
match the uintptr_t parameter type already declared in clk_provider.h.

Fixes CI error:
  error: conflicting types for 'clk_register_divider'

Signed-off-by: hanzhijian <hanzhijian@zepp.com>
2026-06-23 09:46:33 +08:00
hanzhijian b0e8926eb6 drivers/clk: use uintptr_t for register addresses
Change the 'reg' field type from uint32_t to uintptr_t in all clock
provider structs (clk_gate_s, clk_divider_s, clk_phase_s,
clk_fractional_divider_s, clk_multiplier_s, clk_mux_s) and their
corresponding clk_register_*() function prototypes.

Also update clk_write() and clk_read() inline functions to take
uintptr_t parameter and remove the now-redundant (uintptr_t) cast.

On 32-bit embedded platforms uintptr_t equals uint32_t so there is
no functional change. On 64-bit targets (e.g. sim) this fixes
-Wint-to-pointer-cast warnings that GCC15 promotes to errors.

Fixes: #16896
Signed-off-by: hanzhijian <hanzhijian@zepp.com>
2026-06-23 09:46:33 +08:00
raiden00pl 9db6667ac4 !arm/stm32wl5: standardize public API/type prefix to stm32_
BREAKING CHANGE: Public STM32WL5 interfaces were renamed from stm32wl5_*
forms to canonical stm32_* forms across arch and board headers/sources.

Public type names in STM32WL5 timer/GPIO/EXTI and related API-facing
declarations were normalized to stm32_* equivalents.

The STM32WL5 root family header was renamed from stm32wl5.h to stm32.h;
all STM32WL5 arch/board includes were updated accordingly.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-06-23 09:45:36 +08:00
raiden00pl f1ff5abddf !arm/stm32wb: standardize public API/type prefix to stm32_
BREAKING CHANGE: Public STM32WB interfaces were renamed from stm32wb_*
forms to canonical stm32_* forms across arch and board headers/sources.

Public type names in STM32WB timer/dma/freerun/oneshot/GPIO/EXTI and
related API-facing declarations were normalized to stm32_* equivalents.

The STM32WB root family header was renamed from stm32wb.h to stm32.h;
all STM32WB arch/board includes were updated accordingly.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-06-23 09:45:36 +08:00
raiden00pl ab7a32031b !arm/stm32l5: standardize public API/type prefix to stm32_
BREAKING CHANGE: Public STM32L5 interfaces were renamed from stm32l5_* forms
to canonical stm32_* forms across arch and board headers/sources.

Public type names in STM32L5 timer/GPIO/EXTI and related API-facing
declarations were normalized to stm32_* equivalents.

The STM32L5 root family header was renamed from stm32l5.h to stm32.h;
all STM32L5 arch/board includes were updated accordingly.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-06-23 09:45:36 +08:00
raiden00pl e5d9e2dd59 !arm/stm32l4: standardize public API/type prefix to stm32_
BREAKING CHANGE: Public STM32L4 interfaces were renamed from stm32l4_* forms to
canonical stm32_* forms across arch and board headers/sources.

Public type names were normalized to stm32_*
equivalents (including timer/lptimer/dma/freerun API-facing types), and
stm32l4can_initialize() was renamed to stm32_caninitialize().

The STM32L4 root family header was renamed from stm32l4.h to stm32.h;
all STM32L4 arch/board includes were updated accordingly.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-06-23 09:45:36 +08:00
raiden00pl e6bfa37424 !arm/stm32h7: standardize public API prefix to stm32_
BREAKING CHANGE: Public STM32H7 APIs were renamed from stm32h7_*
forms to canonical stm32_* forms.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-06-23 09:45:36 +08:00
raiden00pl f897cb9ef6 !arm/stm32h5: standardize public API prefix to stm32_
BREAKING CHANGE: Public STM32H5 APIs were renamed from stm32h5_*
forms to canonical stm32_* forms.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-06-23 09:45:36 +08:00
raiden00pl 096e8d7e59 !arm/stm32f7: standardize public API prefix to stm32_
BREAKING CHANGE: Public STM32F7 APIs were renamed from stm32f7_*
and stm32f7x9_* forms to canonical stm32_* names.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-06-23 09:45:36 +08:00
Jukka Laitinen d4a5db49c2 drivers/mtd: Make compile time check for sane mtd isbad/markbad configuration
Build / Fetch-Source (push) Has been cancelled
Build / Linux-Arch (push) Has been cancelled
Build / Linux (push) Has been cancelled
Build / OOT-Build (push) Has been cancelled
Build / macOS-Arch (push) Has been cancelled
Build / macOS (push) Has been cancelled
Build / msys2-Arch (push) Has been cancelled
Build / msys2 (push) Has been cancelled
Build / msvc-Arch (push) Has been cancelled
Build / msvc (push) Has been cancelled
This removes the DEBUGASSERT in ftl_initialize_by_path. Instead, check
compile time that FTL is enabled in case some of the drivers implement
the isbad and markbad functions.

Also select the FTL_BBM for those drivers as they require it.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2026-06-17 23:14:58 +08:00
Abhishek Mishra fec3c5bc07 Documentation/sched: Add POSIX user identity transition docs
Build / Fetch-Source (push) Has been cancelled
Build / Linux-Arch (push) Has been cancelled
Build / Linux (push) Has been cancelled
Build / OOT-Build (push) Has been cancelled
Build / macOS-Arch (push) Has been cancelled
Build / macOS (push) Has been cancelled
Build / msys2-Arch (push) Has been cancelled
Build / msys2 (push) Has been cancelled
Build / msvc-Arch (push) Has been cancelled
Build / msvc (push) Has been cancelled
Adds comprehensive documentation for the POSIX three-tier user identity
model (real, effective, saved-set IDs) enabled by CONFIG_SCHED_USER_IDENTITY.

* Updates sched/Kconfig with detailed help text explaining the config.
* Adds user_identity.rst to formally document credential inheritance
  and the privilege transition rules for setuid(), seteuid(), setgid(),
  and setegid().
* Updates tasks_vs_threads.rst to list credentials as a shared task
  group resource.

Signed-off-by: Abhishek Mishra <mishra.abhishek2808@gmail.com>
2026-06-17 17:13:57 +08:00
Abhishek Mishra 370d89a012 sched/group: implement POSIX saved-set-UID/GID semantics
Adds tg_suid and tg_sgid fields to task_group_s to complete the
POSIX three-field identity model (real, effective, saved-set).

Updates group_inherit_identity() to propagate the new fields from
parent to child task group on task creation.

Fixes setuid(), setgid(), seteuid(), and setegid() to implement
correct POSIX privilege transition logic:
- Root (euid==0): may set any value; all three IDs updated by setuid/setgid
- Non-root: may only set effective ID to real or saved value; else EPERM

Signed-off-by: Abhishek Mishra <mishra.abhishek2808@gmail.com>
2026-06-17 17:13:57 +08:00
Catalin Visinescu d33e20fa1c drivers/contactless/pn532: Fix Stack Overflow in PN532 Contactless Driver
When calling Set RF Configuration command, a compromised user
process can trigger memory corruption in the kernel. This can
lead to a system crash or potentially arbitrary code execution
in the kernel.

It addresses an earlier incomplete fix.

Tested locally.

Signed-off-by: Your Name <catalin_visinescu@yahoo.com>
2026-06-17 17:13:32 +08:00
Catalin Visinescu 269cc0dc15 drivers/can/ctucanfd_pci: Stack Overflow When Malformed CAN Data Is Received
A malformed packet can trigger memory corruption in the kernel leading to a
system crash or potentially arbitrary code execution in the kernel.

The CAN driver for the CTU CAN FD IP Core connected to the NuttX device
via a PCI / PCI Express (PCIe) bus shows a lack of consideration for
malformed data, assuming the CAN frames are always correct.

Ensure `frame->fmt.rwcnt` is 21 or less before it is used in the `for` loop.

A similar change was done in ctucanfd_sock_recv().

Tested locally, builds fine.

Signed-off-by: Catalin Visinescu <catalin_visinescu@yahoo.com>
2026-06-17 17:12:22 +08:00
Eren Terzioglu 79d80e4918 Docs/platforms: Add missing defconfig docs for esp32[-c3|-c6|-h2]
Add missing defconfig docs for risc-v based Espressif devices
2026-06-17 17:12:14 +08:00
hanzhijian be8fe68ff7 Documentation/applications/system/conntrack: add conntrack man page
Add comprehensive documentation for the conntrack command including
dump and event monitoring options.

Signed-off-by: hanzhijian <hanzhijian@zepp.com>
2026-06-17 17:12:14 +08:00
hanzhijian a147b4d6dd Documentation/applications/system/conntrack: add conntrack man page
Add documentation for the conntrack command including usage, options,
output format, and examples for listing and monitoring connection
tracking entries.

Signed-off-by: hanzhijian <hanzhijian@zepp.com>
2026-06-17 17:12:14 +08:00
hanzhijian 56e3e5b354 Documentation/applications/system/critmon: add critmon man page
Add documentation for the critmon command including:
- critmon (one-shot dump)
- critmon_start (start daemon)
- critmon_stop (stop daemon)
- Output format explanation
- Configuration options

Signed-off-by: hanzhijian <hanzhijian@zepp.com>
2026-06-17 17:12:14 +08:00
raiden00pl 49eaa7b860 Documentation: update references to nrfjprog
nrfjprog is no longer maintained. Change all nrfjprog commands
to equivalent nrfutil commands

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-06-17 17:12:14 +08:00
hanzj 81ff8a31ca Documentation: document tcpdump command.
Add documentation for the tcpdump system command, covering
command-line options (-i, -w, -s), Kconfig configuration,
usage examples, and notes on pcap output format compatibility.

Signed-off-by: hanzj <hanzjian@zepp.com>
2026-06-17 17:12:14 +08:00
yushuailong 8538e1423f arch/risc-v/esp32c3-legacy: Fix non-atomic clock read in up_rtc_rdalarm.
up_rtc_rdalarm() computed tv_sec and tv_nsec from two separate
evaluations of rt_timer_time_us() + offset + deadline. The RT timer
advances between the two calls, so a read that straddles a second
boundary yields an inconsistent timespec.

Compute the microsecond value once into a local variable and derive
both fields from that single snapshot.

Signed-off-by: yushuailong <yyyusl@qq.com>
2026-06-17 17:12:04 +08:00
yushuailong a23a7b45c3 arch/risc-v/espressif: Fix non-atomic clock read in esp_rtc_rdalarm.
esp_rtc_rdalarm() computed tv_sec and tv_nsec from two separate
evaluations of esp_hr_timer_time_us() + offset + deadline. The
high-resolution timer advances between the two calls, so a read that
straddles a second boundary yields an inconsistent timespec.

Compute the microsecond value once into a local variable and derive
both fields from that single snapshot.

Signed-off-by: yushuailong <yyyusl@qq.com>
2026-06-17 17:12:04 +08:00
yushuailong fb2f117ec2 arch/xtensa/espressif: Fix non-atomic clock read in esp_rtc_rdalarm.
esp_rtc_rdalarm() computed tv_sec and tv_nsec from two separate
evaluations of esp_hr_timer_time_us() + offset + deadline. The
high-resolution timer advances between the two calls, so a read that
straddles a second boundary yields an inconsistent timespec.

Compute the microsecond value once into a local variable and derive
both fields from that single snapshot.

Signed-off-by: yushuailong <yyyusl@qq.com>
2026-06-17 17:12:04 +08:00
yushuailong fb4ffa4ae7 drivers/timers: Fix non-atomic clock read in up_timer_gettime.
up_timer_gettime() computed tv_sec and tv_nsec from two separate calls
to current_usec(), which returns a free-running microsecond counter.
The counter advances between the two calls, so a read that straddles a
second boundary yields an inconsistent (possibly backwards) timespec.

Read current_usec() once into a local variable and derive both fields
from that single snapshot.

Signed-off-by: yushuailong <yyyusl@qq.com>
2026-06-17 17:12:04 +08:00
Michal Lenc a6c2cd73b5 fs/vfs/fs_lock.c: support flock for SHM driver
We can apply file lock on SHM inode as well. Ensure file_lock_get_path
function passes and doesn't return EBADF errno.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2026-06-17 17:11:35 +08:00
Michal Lenc e5199c94ac fs/vfs/fs_lock.c: fix flock behavior for more threads and fds
We need to use gettid instead of getpid, otherwise flocks applied
from different threads are considered as single thread lock and are
ignored (or updated).

Also fix the behavior if process opens the file multiple times
Linux/BSD manual states multiple file descriptors opened by a single
process shall be treated independently. Therefore we also need to
compare struct file pointer to determine whether the lock applies
to the same descriptor or not.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2026-06-17 17:11:35 +08:00
Jukka Laitinen 361e7e29ae arch, sched/signal: Fix compilation with ENABLE_PARTIAL_SIGNALS=y
Correct build errors when CONFIG_ENABLE_ALL_SIGNALS is not defined

- sched makefiles: Move pending-signal helpers from the ENABLE_ALL_SIGNALS-only
  list to the !DISABLE_ALL_SIGNALS list so signal dispatch is available in
  PARTIAL builds sched: make SIG_PREALLOC_ACTIONS, SIG_ALLOC_ACTIONS and
  SIG_DEFAULT depend on ENABLE_ALL_SIGNALS
- sched: fix ifdefs around pending-signal queue access and signal-mask for
  PARTIAL/DISABLE modes
- arch: gate SYS_signal_handler / _return calls and SYSCALL_LOOKUP(signal)
  with ENABLE_ALL_SIGNALS

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2026-06-17 17:11:26 +08:00
Jukka Laitinen 8c1ac9c093 drivers/input/button_upper.c: Fix compilation with CONFIG_DISABLE_ALL_SIGNALS
The optional signal delivery should be disabled when signals support is
disabled for the board.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2026-06-17 17:11:26 +08:00
Jukka Laitinen fb9a7dc1ce boards/nucleo-f302r8 : Set CONFIG_DISABLE_ALL_SIGNALS=y for ihm07m1_f32
This small board doesn't use the signals, so it is safe to disable them to save flash.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2026-06-17 17:11:26 +08:00
Jukka Laitinen ce4e167ea7 libs/libc/pthread/pthread_mutex: Fix robust mutex initialization
This fixes an issue where ostest robust mutex test gets stuck.

In CONFIG_PTHREAD_MUTEX_ROBUST mode, every NORMAL mutex is robust by
definition, so the robust flag must be set to allow the mutex to be tracked
in the holder's mutex list.

Otherwise, pthread_mutex_add() will not record the mutex and
pthread_mutex_inconsistent() will not be able to mark it as inconsistent or
wake waiters when the holder thread terminates.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2026-06-17 17:11:14 +08:00
Abhishek Mishra 72192fc8bc fs/binfmt: Enforce POSIX execute permissions prior to binary load
Adds a pre-load permission check in exec_internal() to verify the
calling task has the required execute (x) bits for the target file.
Properly evaluates root (euid == 0), owner, group, and other permissions.

This ensures POSIX compliance and cleanly rejects unauthorized files
with -EACCES before they reach the ELF loader, preventing unnecessary
memory allocation and downstream hardware execution faults.

Signed-off-by: Abhishek Mishra <mishra.abhishek2808@gmail.com>
2026-06-17 17:11:07 +08:00
nicolasWDC 2cddf4e638 include/pthread : initialize wait_count in PTHREAD_COND_INITIALIZER
struct pthread_cond_s contains three fields: sem, clockid, and
wait_count. However, PTHREAD_COND_INITIALIZER only initialized the first
two fields, which triggers -Wmissing-field-initializers when a condition
variable is statically initialized.

Initialize wait_count explicitly to zero so the macro matches the structure
definition and remains warning-free with strict compiler flags.

Validated with a minimal compile test using:

pthread_cond_t cond = PTHREAD_COND_INITIALIZER;

Signed-off-by: nicolasWDC <nicolasWDC@users.noreply.github.com>
2026-06-17 17:10:49 +08:00
raiden00pl 7f479a7e84 arch/arm/src/stm32f7: remove duplicated stm32_exti_alarm.c source
stm32_exti_alarm.c was added twice in Make.defs and CMakeLists.txt.
Drop the duplicate block

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-06-17 17:10:35 +08:00
raiden00pl e23af454f1 !arch/stm32n6: unify non-standard hardware definition prefixes
BREAKING CHANGE: STM32N6 non-standard hardware definition macros
(IRQ, peripheral-count, SRAM and related) were renamed to the common
STM32_* prefix. Out-of-tree code must update the affected references.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-06-17 17:10:28 +08:00
raiden00pl 8e3710d0d7 !arch/stm32wl5: unify non-standard hardware definition prefixes
BREAKING CHANGE: STM32WL5 non-standard hardware definition macros
(IRQ, peripheral-count, SRAM and related) were renamed to the common
STM32_* prefix. Out-of-tree code must update the affected references.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-06-17 17:10:28 +08:00
raiden00pl 62751f772c !arch/stm32wb: unify non-standard hardware definition prefixes
BREAKING CHANGE: STM32WB non-standard hardware definition macros
(IRQ, peripheral-count, SRAM and related) were renamed to the common
STM32_* prefix. Out-of-tree code must update the affected references.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-06-17 17:10:28 +08:00
raiden00pl a3acb2bf13 !arch/stm32u5: unify non-standard hardware definition prefixes
BREAKING CHANGE: STM32U5 non-standard hardware definition macros
(IRQ, peripheral-count, SRAM and related) were renamed to the common
STM32_* prefix. Out-of-tree code must update the affected references.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-06-17 17:10:28 +08:00
raiden00pl 813af2e506 !arch/stm32l5: unify non-standard hardware definition prefixes
BREAKING CHANGE: STM32L5 non-standard hardware definition macros
(IRQ, peripheral-count, SRAM and related) were renamed to the common
STM32_* prefix. Out-of-tree code must update the affected references.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-06-17 17:10:28 +08:00
raiden00pl 6d489b66b1 !arch/stm32l4: unify non-standard hardware definition prefixes
BREAKING CHANGE: STM32L4 non-standard hardware definition macros
(IRQ, peripheral-count, SRAM and related) were renamed to the common
STM32_* prefix. Out-of-tree code must update the affected references.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-06-17 17:10:28 +08:00
raiden00pl 1e0a014b40 !arch/stm32h7: unify non-standard hardware definition prefixes
BREAKING CHANGE: STM32H7 non-standard hardware definition macros
(IRQ, peripheral-count, SRAM and related) were renamed to the common
STM32_* prefix. Out-of-tree code must update the affected references.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-06-17 17:10:28 +08:00
raiden00pl 8c4f15d670 !arch/stm32h5: unify non-standard hardware definition prefixes
BREAKING CHANGE: STM32H5 non-standard hardware definition macros
(IRQ, peripheral-count, SRAM and related) were renamed to the common
STM32_* prefix. Out-of-tree code must update the affected references.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-06-17 17:10:28 +08:00
raiden00pl 69de43b347 !arch/stm32f7: unify non-standard hardware definition prefixes
BREAKING CHANGE: STM32F7 non-standard hardware definition macros
(IRQ, peripheral-count, SRAM and related) were renamed to the common
STM32_* prefix. Out-of-tree code must update the affected references.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-06-17 17:10:28 +08:00
Kerogit 8ad4f90b72 arch/avr/src/avrdx/avrdx_delay: add custom up_udelay function
NuttX builtin up_udelay function uses BOARD_LOOPSPERMSEC configuration
value to determine how many loops need to be done to cause requested
delay. This does not match well with AVR DA/DB microcontrollers
because the CPU clock frequency is configurable.

A board configuration could therefore provide BOARD_LOOPSPERMSEC
valid for one frequency but for other frequencies, the user would
be required to calibrate the value and would still get incorrect
result when changing the clock speed during runtime.

This patch therefore implements dynamic architecture-specific
up_udelay function which determines current clock settings
and infers required loop count from that.

New function was tested by simple application that used up_udelay
to put delays between printf calls.

Signed-off-by: Kerogit <kr.git@kerogit.eu>
2026-06-17 17:10:02 +08:00
Kerogit 8eb5c85e72 arch/avr/src/avrdx: add support for reading CPU clock from other sources
This patch adds support for reading CPU clock frequency when the MCU
is driven by clock source other than high frequency oscillator.

Signed-off-by: Kerogit <kr.git@kerogit.eu>
2026-06-17 17:10:02 +08:00
Kerogit eb41209a07 sched/clock/clock_delay: added config flag to remove weak up_udelay
While attempting to create architecture-specific implementation
of up_udelay, it was discovered that the overriding function is not
included in the final binary, the weak implementation was used instead.

Further investigation and experimentation showed that the linker
only overrides the weak implementation with the custom one if
the custom one is present in a .c source file that contains at least
one other function that is called from somewhere. Some additional
testing revealed that at least one other already present up_udelay
override (rv32m1-vega:nsh) is affected by this.

In a short mailing list discussion it was determined that this
is a likely result of using static libraries during the build process
and it was suggested to introduce configuration option that will
exclude weak implementations of the function from the build altogether.
This patch does that.

This patch does not enable this configuration option for any existing
board/chip because doing so would change its behaviour and needs
to be tested by users of the hardware.

Also changed is the static assertion in sched/clock/clock_delay.c
to not prevent building the code when architecture declares that
it does not use BOARD_LOOPSPERMSEC to determine required loop count.
BOARD_LOOPSPERMSEC is made undefined in such case.

Patch was tested by building breadxavr:nsh (identical binary by SHA256),
rv32m1-vega:nsh (identical text section) and rv-virt:nsh (text section
differs because of different ordering of functions in the binary, ostest
passed though.)

Signed-off-by: Kerogit <kr.git@kerogit.eu>
2026-06-17 17:10:02 +08:00
Kerogit e6249b8f16 arch/avr/src/avrdx: fix Make.defs when CONFIG_ENABLE_ALL_SIGNALS unset
This patch amends commit dfd3426aa5 which added support for running
with some signals disabled to AVR architecture. AVR DA/DB architecture
was not covered by the commit and failed to build
with CONFIG_ENABLE_ALL_SIGNALS unset (which includes building
with CONFIG_ENABLE_PARTIAL_SIGNALS, the default value.)

Change is replicated from the commit and tested by a custom stress
application which spawns some always-busy threads and uses preemptive
multitasking to switch between them. Additionally, ability to sleep
in the application was tested by a simple LED blinking application.

Signed-off-by: Kerogit <kr.git@kerogit.eu>
2026-06-17 17:10:02 +08:00
Kerogit cd1ea28727 boards/avr/avrdx/breadxavr: provide board_late_initialize
This patch amends commit f077c0321d which is a part of series that
changed (in commit 48db502daf) default value of BOARD_LATE_INITIALIZE
to yes. With this change, the boards are required to provide
board_late_initialize function.

Commit f077c0321d added this function to many AVR boards but
not to this one, making the build with default configuration
fail. This patch rectifies that and provides an empty function.

With this patch applied, the build no longer fails.

Signed-off-by: Kerogit <kr.git@kerogit.eu>
2026-06-17 17:10:02 +08:00