From 4b26b05ba8adb9743a28ce21f779721bdcc112a5 Mon Sep 17 00:00:00 2001 From: Alan Carvalho de Assis Date: Fri, 19 Jul 2024 18:38:57 -0300 Subject: [PATCH] Doc: Fix CustomApps/CustomHello example NuttX generact the app main name from Kconfig entry xxxx_PROGNAME. The documentation was defining manually the entry point as custom_name(int char, char *argv[]) and CONFIG_INIT_ENTRYPOINT="custom_hello". The right thing to do is creating the application entry point as int main(int char, char *argv[]) and the build system will add _main to it. Signed-off-by: Alan C. Assis --- Documentation/guides/customapps.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/guides/customapps.rst b/Documentation/guides/customapps.rst index dd839fe89dc55..43f515e743ea2 100644 --- a/Documentation/guides/customapps.rst +++ b/Documentation/guides/customapps.rst @@ -172,7 +172,7 @@ For this "Hello, Custom World!" application ``custom_hello()`` is the applicatio #include - int custom_hello(int argc, char *argv[]) + int main(int argc, char *argv[]) { printf("Hello, Custom World!!\n"); return 0; @@ -185,7 +185,7 @@ In order to build with the new custom configuration, you will need the following :menuselection:`CONFIG_APPS_DIR="../CustomApps"` -:menuselection:`CONFIG_INIT_ENTRYPOINT="custom_hello"` +:menuselection:`CONFIG_INIT_ENTRYPOINT="custom_hello_main"` Note that you can only access the ``../CustomApps/Kconfig`` configuration file if ``CONFIG_APPS_DIR`` is set to ``../CustomApps`` BEFORE ``make menuconfig`` is executed