Activating environment
source ./scripts/activate.sh
Generating tizen-arm-light
gn gen --check \ --fail-on-unused-args \ --export-compile-commands \ --root=$PW_PROJECT_ROOT/examples/lighting-app/tizen \ "--args=target_os=\"tizen\" target_cpu=\"arm\" tizen_sdk_root=\"$TIZEN_SDK_ROOT\" tizen_sdk_sysroot=\"$TIZEN_SDK_SYSROOT\"" \ $PW_PROJECT_ROOT/out/tizen-arm-light
Building tizen-arm-light
ninja -C $PW_PROJECT_ROOT/out/tizen-arm-light
For packaging the Tizen APP, there is a need to generate an author certificate and security profile using the commands described below. Change password and author data as needed.
$TIZEN_SDK_ROOT/tools/ide/bin/tizen certificate \ --alias=CHIP \ --name=CHIP \ --email=chip@tizen.org \ --password=chiptizen $TIZEN_SDK_ROOT/tools/ide/bin/tizen security-profiles add \ --active \ --name=CHIP \ --author=$HOME/tizen-sdk-data/keystore/author/author.p12 \ --password=chiptizen
This is only one-time action. To regenerate the author certificate and security profile, you have to remove files from the $HOME
directory using specified commands:
rm -r \ $HOME/tizen-sdk-data \ $HOME/.tizen-cli-config \ $HOME/.secretsdb
After that, normally call scripts to generate the author certificate and security profile mentioned previously.
Regenerating the author certificate and security profile makes it necessary to remove the previously installed Tizen app. You can't reinstall an application on the Tizen device with a different certificate.
pkgcmd -u -n org.tizen.matter.example.lighting
ninja -C $PW_PROJECT_ROOT/out/tizen-arm-light chip-lighting-app:tpk
Upload TPK package to device under test (DUT). Install it with pkgcmd
as follows:
pkgcmd -i -t tpk -p org.tizen.matter.example.lighting-1.0.0.tpk
For launching Tizen application one should use app_launcher
. It is possible to pass user arguments from command line which might be used to control application behavior. However, passed strings cannot start with “-” (minus) character and all arguments have to consist of name and value. Boolean options (option without argument) should have value equal to “true”.
e.g.:
app_launcher --start=org.tizen.matter.example.lighting discriminator 43 wifi true
To run all commands below sdb
has to be installed on computer and available in PATH
. Also vscode has to have the augustocdias.tasks-shell-input
extension installed.
open the Command Palette (Ctrl+Shift+P) -> Tasks: Run Task -> Build LightingApp (Tizen)
open the Command Palette (Ctrl+Shift+P) -> Tasks: Run Task -> Connect to device (Tizen) -> insert IP address and port
open the Command Palette (Ctrl+Shift+P) -> Tasks: Run Task -> Install LightingApp (Tizen)
open the Command Palette (Ctrl+Shift+P) -> Tasks: Run Task -> Launch LightingApp with gdbserver attached (Tizen)
To debug app using vscode gdbserver has to be available on the target device, run ./scripts/helpers/tizen_gdbserver_run.sh --help
for more information.