On 2026-03-02 19:47, Alan C. Assis wrote:
Hi KR,
I'm not expert on this issue, but I took a look and have an idea about
this
issue (please take my advice with a grain of salt) :
Looking at arch/ I see only other 3 archs implement it:
$ git grep "void up_udelay"
arm/src/cxd56xx/cxd56_delay.c:void up_udelay(useconds_t microseconds)
risc-v/src/mpfs/mpfs_perf.c:void up_udelay(useconds_t microseconds)
risc-v/src/rv32m1/rv32m1_delay.c:void up_udelay(useconds_t
microseconds)
So, chances are that none of these archs are in fact using these
functions
(please double check, but I think they are facing the same issue as
you).
Managed to build rv32m1 in the end and as far as I can see, you are
right - the binary built with implementation of up_udelay coming from
drivers/timers/arch_alarm.c (which, apparently, needs to be hidden
behind an ifdef as well. And the same for drivers/timers/arch_timer.c)
As for the reply from spudaneco:
In order to override, the implementation should also be mar,wc as
"weak"
This doesn't feel right, does it? If both implementations are marked
weak, then which one is the correct one to pick? I tried it anyway,
marked my implementation with weak_function and the linker indeed went
back to the original one and did not use mine.