How to Run and Add a HelloWorld Application#
This document covers two parts:
First, run the HelloWorld already provided by the SDK (quickest way to verify your environment)
Then, add or modify your own HelloWorld application
Run the Built-in HelloWorld (Recommended First)#
The SDK provides a sample directory: src/applications/helloworld
cd <sdk_root>
ls src/applications/helloworld
If the directory contains Kconfig, Makefile, and main.c, the sample is ready to use.
Enable the HelloWorld Build Switch#
make menuconfig
Enable the following option in the menu:
Application Configuration > Enable Application HelloWorld
Build and Flash#
make
After flashing, the application will be packaged into the /sdcard/app/ directory on the board.
Run on the Board#
/sdcard/app/helloworld
Add / Modify HelloWorld#
You can modify the existing src/applications/helloworld directly, or copy it as a new application directory.
Build#
Build Standalone#
cd <sdk_root>/src/applications/helloworld
make
ls
This produces an executable helloworld that you can manually copy to the board and run.
Build as Part of the Full Image#
Edit
src/applications/apps.mkto add the corresponding directory to the build system.
cat src/applications/apps.mk
-include $(SDK_SRC_ROOT_DIR)/.config
subdirs-$(CONFIG_APP_ENABLE_HELLOWORLD) += helloworld
Enable the APP build feature in menuconfig.
make menuconfig
Application Configuration > Enable Application HelloWorld
Then run make or make app to build the applications under src/applications.
make
Flash the resulting image to the development board.
The application will be packaged into the image’s /sdcard/app/ directory, where it can be set to auto-start on boot or run manually for testing.
