Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

How to create your custom App #12

@jfm92

Description

@jfm92

When you develop an App for NuttX, you can choose if your App is an example, a system utility, can utility..
The only difference beteween the diferents options, is in which folder you save your app.
To this guide, we're going to develop the App in the example folder.

So go to: App/Examples
And create a folder with the name of your App (In this case it'll be custom_app).
Each App have four basicall file:
imagen

  • custom_app_main.c : This is the main file of the project. This file have acces to:
    • Header file of the driver.
    • Basic C/C++ library.
    • Basic NuttX library.
    • You can access to other files that you add to this folder.
  • Kconfig : Here you programm the options that will appear at the menuconfig, such as the description, the name, dependencies...
  • Make.defs : This file add this application when it's check in menu.
  • Makefile : This file is use to add the exactly file to the compilation and which options do you want to have in the App and in the system when you're run it.

Kconfig

The next image is the configuration of this App in the menu:
imagen

You can add some configuration options to your app that it'll appear in the menuconfig:
imagen
In this case you can see the options of the priority of the task when it's running the App and the stack size.

Make.defs

This file is like a linker.

imagen

Makefile

imagen

Now go to the previous folder,open the Kconfig file and add this line:
source "/home/juan/nuttxspace_add_app/apps/examples/custom_app/Kconfig"

Main file

Now everything it's setup and it's only left to program your App.
This is a basic skeleton of an empty App
imagen

(The file is already attached)

And this is a very simple example of how it works the device control in NuttX and how to apply to your app.
imagen

This app, open both sensors (Pressure and Humidity/temperature), read the value of both and show in the console.

custom_app_files.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions