nuttx/arch
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
..
arm cmake/elf: Fix ELF entry point from __start to _start 2026-06-11 03:23:04 +08:00
arm64 cmake/elf: Fix ELF entry point from __start to _start 2026-06-11 03:23:04 +08:00
avr arch/avr/src/avrdx: fix Make.defs when CONFIG_ENABLE_ALL_SIGNALS unset 2026-06-17 17:10:02 +08:00
ceva arch/ceva: Replace board_app_initialize 2026-05-02 18:36:46 +08:00
dummy
hc style: fix checkpatch issues after debug.h move 2026-04-07 07:50:06 -03:00
mips !nuttx: drop redundant casts on tv_sec/tv_nsec and fix printf formats 2026-05-19 16:21:28 +08:00
misoc include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
or1k include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
renesas !nuttx: drop redundant casts on tv_sec/tv_nsec and fix printf formats 2026-05-19 16:21:28 +08:00
risc-v arch/risc-v/espressif: Add LP Mailbox support for esp32p4 2026-05-26 10:03:43 +08:00
sim arch/sim: Add dependencies for Rust cargo in make builds 2026-06-10 08:57:45 -03:00
sparc !nuttx: drop redundant casts on tv_sec/tv_nsec and fix printf formats 2026-05-19 16:21:28 +08:00
tricore arch/tricore: Add hardware debug breakpoint and watchpoint support. 2026-05-22 15:38:36 +08:00
x86 arch/x86: Add palette 256 color to qemu-i486 VGA driver 2026-05-02 09:51:59 -04:00
x86_64 cmake/elf: Fix ELF entry point from __start to _start 2026-06-11 03:23:04 +08:00
xtensa xtensa/esp32: Fix RWDT register offsets. 2026-05-27 09:36:43 +08:00
z16 include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
z80 style: fix checkpatch issues after debug.h move 2026-04-07 07:50:06 -03:00
CMakeLists.txt arch/z80: migrate to SPDX identifier 2024-12-02 17:23:25 +08:00
Kconfig sched/clock/clock_delay: added config flag to remove weak up_udelay 2026-06-17 17:10:02 +08:00