From b8561558e753fcf7408a28878028109c47c0f90b Mon Sep 17 00:00:00 2001 From: Nathan Hartman <{ID}+{username}@users.noreply.github.com> Date: Sun, 21 Jul 2024 11:56:41 -0400 Subject: [PATCH] sched: Improve Kconfig help of INIT_ENTRYPOINT * sched/Kconfig (INIT_ENTRYPOINT): Document that the signature of "main" must take "argc" and "argv" or else compilation error results, as discussed in the email thread below [1]. References: [1] dev@nuttx.apache.org email thread: "basically, I get an error when I do make" started 18 Jul 2024, archived: https://lists.apache.org/thread/9j2s3647ysdhy204g4ombn4o09bn11c1 and elsewhere. --- sched/Kconfig | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sched/Kconfig b/sched/Kconfig index 1601dbcd53..09c3ac08f4 100644 --- a/sched/Kconfig +++ b/sched/Kconfig @@ -445,6 +445,20 @@ config INIT_ENTRYPOINT applications this is of the form 'app_main' where 'app' is the application name. If not defined, INIT_ENTRYPOINT defaults to "main". + Note that main must take "argc" and "argv" arguments: + + int main(int argc, FAR char *argv[]) + + Otherwise, if using a signature such as "int main(void)" a compilation + error will result: + + > $ make + > CC: CustomHello.c : error: conflicting types for + > 'custom_hello_main' + > CustomHello.c:3:5: note: in expansion of macro 'main' + > 3 | int main(void) + > | ^~~~ + config INIT_ENTRYNAME string "Application entry name" default INIT_ENTRYPOINT