diff options
Diffstat (limited to 'doc/code')
| -rw-r--r-- | doc/code/Apps.md | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/doc/code/Apps.md b/doc/code/Apps.md index 2d49c60e..16cb3992 100644 --- a/doc/code/Apps.md +++ b/doc/code/Apps.md @@ -159,22 +159,10 @@ If your application is a **user** application, you don't need to add anything in everything will be automatically generated for you. The user application will also be automatically be added to the app launcher menu. -Since the list of **user** application is generated by CMake, add a new `option` in the main [CMakeLists.txt file](../../CMakeLists.txt). The application will be built by default if the value is set to `True`. : +Since the list of **user** application is generated by CMake, you need to add the variable `ENABLE_USERAPPS` to the command line of CMake. This variable must be set with a string composed of an ordered list of the **user** applications that must be built into the firmware. The items of the list are fields from the enumeration `Apps`. Ex : build the firmware with 3 user application : Alarm, Timer and MyApp (the application will be listed in this specific order in the application menu). ```cmake -option(ENABLE_APP_MYAPP "Enable the MyApp application" True) -``` - -The default value can be overridden by passing an additional parameter to the command line of CMake : - -```cmake -$ cmake ... -DENABLE_APP_MYAPP=True ... -``` - -Then add your **user app** to the list of apps by calling `AddToListIfEnabled()` : - -```cmake -AddToListIfEnabled(USERAPP_TYPES_LIST ${ENABLE_APP_MYAPP} "Apps::MyApp") +$ cmake ... -DENABLE_USERAPPS="Apps::Alarm, Apps::Timer, Apps::MyApp" ... ``` You should now be able to [build](../buildAndProgram.md) the firmware |
