Customizing ARTIK 053
Having compiled, loaded, and played with the base version of Tizen RT, you can now customize it to use your chosen applications. Although you can manually edit the configuration files, the
kconfig-frontend tools are the best choice to add and remove apps and features from the base version of Tizen RT.
You can choose the apps that you want to be able to run from the command line interface (CLI). First, we'll explain how it would be done manually. This definition file:
selects the apps you want to have listed by the
TASH> help command. You'll see from the format of the
defconfig file how an app is enabled or disabled.
If you were using the
nettest configuration, for example, you'd might edit the file like this:
defconfig must be edited prior to configuring the build with
configure.sh, which creates a hidden
os/.config file based on
defconfig. If you want to make changes after that, edit
os/.config directly or use
Editing manually is not advised, as you may miss dependencies that
Kconfig takes care of automatically.
Installing Kconfig Tools
The Tizen RT system is highly configurable and the configuration files are maintained through the
kconfig-frontends tool. Each Kconfig file contains declarations for the required configuration variables and provides one configuration option for Tizen RT.
Open a bash terminal window.
Change to main directory.
Kconfig-frontendfor Tizen RT menu configuration.
git clone https://email@example.com/nuttx/tools.git tools
./configure --enable-mconf --disable-gconf --prefix=/usr
sudo make install
Use the Kconfig GUI menu to set options. We're going to start you off on the Sensor Board app.
From within your
to arrive at the entry screen.
Scroll down to
Application Configuration(it may initially be below the bottom of the screen) and hit Enter to select.
On the sub-menu select
Scroll down to
Sensor Board Exampleand hit the space bar to select.
Saveand then exit from the program.
All the settings are stored in the hidden
os/.config file. If you re-initialize your configuration (
make distclean) you will lose any changes you made.
You built the unmodified code in the previous article to verify that it would run as expected. Now, as you get started on coding for real, here is some information to get you familiar with the layout.
<cfg>directories for selecting the project type (
build/configs/artik053/<cfg>/defconfiglists the specific apps to include or exclude for each configuration.
apps/examples/contains the source code for each of those apps.
- Running the
configure.shscript generates an
- You customize the contents of
menuconfigcommand associated with
os/arch/arm/src/artik053/src/artik053_boot.ccontains the mapping of GPIO pins.
The Sensor Board example is a good place to start to try modifying code. You'll find it under
apps/examples/sensorbd_demo/examples. You can play with your app in the first Tutorials article.
If you're familiar with MQTT, try out this easy exercise to see how quickly you can be publishing from your ARTIK 053 module.
If you have an ARTIK 5/7/10 module, you can use it instead with our Node-RED tutorial. That is, with Wi-Fi up and running on your board, enter:
mosquitto -v &
Starting from a fresh configuration and
kconfig running, do the following.
Scroll down to
Network Utilities...and select
MQTT with security
- Exit from that page.
"MQTT Test" example
- Save your changes and exit the configuration tool.
- Build and load the image to your ARTIK 053 board as always.
Have your MQTT broker ready to receive your message. You'll need to know its IP address.
Reset your board and get to the
TASH>prompt. Verify that
mqtt_pubis now in your
Manually set up Wi-Fi as you did here. Make sure you're using the same Wi-Fi access point as your MQTT broker is using.
Send an MQTT publish request, specifying
mqtt_pub -h 10.0.0.36 -p 1883 -t brightness -m "100"
That's all there is to it! You should see the message pop up on your MQTT broker screen.
Here's a quick review of file locations and commands.
File locations within the
||code the app|