mirror of
https://github.com/apache/nuttx.git
synced 2026-08-16 01:43:15 +00:00
apps/Application.mk stamps each program's configured priority into its ELF
as an absolute nx_priority symbol, and encodes PRIORITY =
SCHED_PRIORITY_DEFAULT as zero:
SYM_PRIORITY = $(if $(filter SCHED_PRIORITY_DEFAULT,$(PRIORITY_$@)),0,\
$(PRIORITY_$@))
elf_loadbinary() took that literally, so any program whose Makefile
declares SCHED_PRIORITY_DEFAULT -- testing/ostest, among others -- was
created at priority 0. That ties with the idle task, and the new task is
queued behind it, so it never runs.
The failure gives nothing to go on: the loader reports success, the task
appears in the task list as READY-TO-RUN, and the program never executes
an instruction. Found on an ESP32-S3 BUILD_KERNEL target where ostest
loaded and then sat with sched_priority=0 behind Idle_Task in
g_readytorun across repeated JTAG samples, while programs with explicit
numeric priorities (nsh=100, getprime=50) ran normally.
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| libnxflat | ||
| binfmt.h | ||
| binfmt_checkexec.c | ||
| binfmt_copyactions.c | ||
| binfmt_copyargv.c | ||
| binfmt_dumpmodule.c | ||
| binfmt_exec.c | ||
| binfmt_execmodule.c | ||
| binfmt_execsymtab.c | ||
| binfmt_exit.c | ||
| binfmt_globals.c | ||
| binfmt_initialize.c | ||
| binfmt_loadmodule.c | ||
| binfmt_register.c | ||
| binfmt_unloadmodule.c | ||
| binfmt_unregister.c | ||
| builtin.c | ||
| CMakeLists.txt | ||
| elf.c | ||
| Kconfig | ||
| Makefile | ||
| nxflat.c | ||