Skip to content

Commit

Permalink
Doc: Fix CustomApps/CustomHello example
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
acassis committed Jul 19, 2024
1 parent d708eda commit 4b26b05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Documentation/guides/customapps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ For this "Hello, Custom World!" application ``custom_hello()`` is the applicatio
#include <stdio.h>
int custom_hello(int argc, char *argv[])
int main(int argc, char *argv[])
{
printf("Hello, Custom World!!\n");
return 0;
Expand All @@ -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
Expand Down

0 comments on commit 4b26b05

Please sign in to comment.