Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Building AdamApp & generate package

AdamApp に必要なファイルの作成と配置が完了したら、AdamApp のビルドとパッケージ作成を行いま
す。具体的には、Build and create a package of AdamApp after creating and placing the required files for AdamApp.
(1) AdamApp の実行環境に対応する設定ファイルを読み込み、Read configuration file for the AdamApp execution environment and (2) Execute make の実行、を実施し
ます。
詳しい手順について、これ以降で説明します。

(1) ビルド用環境設定ファイルの読み込み

ビルド用環境設定ファイルとして、setup_env.sh が用意されています。これを source コマンドを用い て読み込むことで、環境設定が完了します。その際、AdamApp を動作させる実行環境に応じて、引数 を指定する必要があります。

指定できる引数は下記の通りです。

i-pro ambaCV2X 用の AdamApp を作成する場合:

 ipro-ambaCV2X

下記に、それぞれの場合の詳細な手順を示します。Read configuration file for the building environment settings

setup_env.sh is provided as a setup file for the building environment. You can set up building
environment by reading setup_env.sh using ‘source’ command with parameter depending on execution
environment of AdamApp.
Addressable parameters are as follows:

When creating an AdamApp that runs on i-pro ambaCV2X model:

 ipro-ambaCV2X

...

Code Block
$ cd ${SDK_DIR}
$ source setup_env.sh ipro-ambaCV2X
Info

下記のようなメッセージが表示されれば、ビルド用環境設定ファイルの読み込みは成功です。

If the following message is displayed, reading of the build configuration file was successful.

***** /usr/local/linaro-aarch64-2018.08-gcc8.2/bin/aarch64-linux-gnu-gcc found. *****
PF_BASEDIR = /home/user/adamappsdk
BUILD_TARGET = ipro-ambaCV2X
TARGET_FOR_ADAM = ambaCV2X
TARGET_ARCH = aarch64-linux-gnu
VERBOSE = 0
PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

(2) make の実行(AdamApp のビルド&パッケージの作成)

続いて、AdamApp(追加アプリ)のビルドとパッケージ作成を行うために、make を実行します。
make を実行すると、ビルドとパッケージの作成を一気に行います。make が成功した場合には、
skeleton_sample_app ディレクトリ直下に、

SkeletonSampleApp :

SkeletonSampleApp の実行プログラム

SkeletonSampleApp.zip :

SkeletonSampleApp のパッケージ

SkeletonSampleApp.ext :

SkeletonSampleApp.zip を Base64 化したもの

の 3 つのファイルが生成されます。Execute make (build and generate package of AdamApp)

You will need to execute make to build and generate an AdamApp package. AdamApp package will be build and generated automatically. When it is successful, the following three files are generated within skelton_sample_app directory.

SkeletonSampleApp :

The execution program of SkeletonSampleApp

SkeletonSampleApp.zip :

The package of SkeletonSampleApp

SkeletonSampleApp.ext :

Encoded file by BASE64

Code Block
$ cd src/adamapp/skeleton_sample_app
$ ls –CF
Makefile configuration.txt skeletonSampleApp.cpp
bin/ data/ setup/
$ make
(

...

Omitted)
$ ls –CF
Makefile bin/ setup/
SkeletonSampleApp* configuration.txt skeletonSampleApp.cpp
SkeletonSampleApp.ext conf/ skeltonSampleApp.d
SkeletonSampleApp.zip data/ skeltonSampleApp.o

make の実行によって、生成される 3 つのファイルの詳細な説明は、下記の通りです。The descriptions of the three files mentioned above are as follows.

SkeletonSampleApp :

デバッグ情報付きの実行プログラムです。gdbserver などを使って、AdamApp のデバッグする時に は、このファイルを用いて、デバッグ情報の読み込みを行います。なお、bin/SkeletonSampleApp は、デバッグ情報を取り除かれた実行プログラムです。

SkeletonSampleApp.zip :

必要な情報を格納した bin, data, config, setup の各ディレクトリを zip 化したパッケージファイルで す。AdamApp をインストールする際には、このファイルを用います。また暗号化する際は、この ファイルを i-PRO 株式会社へ送付します。

SkeletonSampleApp.ext :

SkeletonSampleApp.zip を Base64 化したパッケージファイルです。AdamApp のインストールす る際に、zip ファイルではなく、Base64 ファイルを指定する必要がある場合に、このファイルを用 います。(監視カメラの商品 UI を用いてのインストールなど)

コンフィギュレーションファイルのフォーマット

コンフィギュレーションファイルとは、AdamApp の動作に必要な情報を記述したファイルです。Adam
実行環境は、このファイルの内容を参照して、AdamApp の制御(インストール/開始など)を行います。このため、このファイルの内容が誤っている場合は、AdamApp のインストールや開始に失敗することがありますので、正確に記述してください。
なお、このファイルは、AdamApp パッケージの作成時に参照されますので、AdamApp 作成のための
make 実行前までに作成しておく必要があります。

具体的な記述例については、任意のサンプルアプリのconfiguration.txt を参照してください。

${SDK_DIR}/src/adamapp/[任意のサンプルアプリ]/configuration.txt

configuration.txt の各用語

コンフィギュレーションファイルの各項目は、タグと値で構成されており、下記のフォーマットで記述し ます。

# 行頭の「#」はコメントアウトを表わす

# head of line ‘#’ means comment out

TagName Value

TagName と Value の間の空白は、1文字以上のスペースか、タブで構成してください。行頭の「#」は、
コメントアウトを表わします。なお、行の途中に「#」が来ても、コメントアウトとは認識されませんの
で、ご注意ください。
具体的なタグの種類は、Table1.4.1-1 に示しています。また、Value に使える文字は、タグの種類によって異なりますので、こちらについても Table1.4.1-1 を参照してください。
記述の具体例を下記に示します。

# AdamApp 実行ファイル名の設定

# set of the name of execution file of AdamApp

APPLICATION SkeletonSampleApp

# AdamApp のバージョンの設定

# set of version of AdamApp

APPVERSION V0.01

また、項目によっては、複数設定することも可能です。複数設定する場合は、下記のように項目を複数の 項目を並べて記述してください。

# APPNAME(AdamApp の正式名称)の設定

# set of the official name of AdamApp

APPNAME0 Sample Application

APPNAME1 サンプルアプリケーション

APPNAME5 esempio di applicazione

コンフィギュレーションファイルに記載できるタグ名の種類は、下記の通りです。
なお、選択性に、「M(Mandatory)」と書かれている項目は、記述必須の項目です(何も書かれていてい
ない項目は、省略可能です)。

This is the execution program with the information for debug. The information required for debugging will be derived from this file when AdamApp is debugged using gdbserver (or other), On the other hand, bin/SkeltonSampleApp are the execution programs without information for debug.

SkeletonSampleApp.zip :

This is a package file including bin, data, config and setup directories and is encoded by zip. This file is used for installation of AdamApp to camera. Please send this file to i-PRO Co., Ltd. when encrypting.

SkeletonSampleApp.ext :

This file is an encoded file of SkeltonSampleApp.zip by BASE64. Use this file if you need to specify Base64 instead of zip file when installing AdamApp to the camera. (e.g., installation using UI of commercial surveillance camera).

Format of configuration file

...

Configuration file contains essential information to run AdamApp. AdamApp is controlled within Adam execution environment in line with the contents of this file (e.g., at the time of installation or starting). Therefore, installation or starting of AdamApp may fail if the content in this file is incorrect. In addition, this file is also used when AdamApp is packaged, which means that you need to create this file before the execution of make to create AdamApp.

See the configuration.txt of any sample app for specific examples.

${SDK_DIR}/src/adamapp/[any sample app]/configuration.txt

Each term in configuration.txt

Each item has a tag and a value as shown below.

# head of line ‘#’ means comment out

TagName Value

Add a space between TagName and Value for one or more characters, or a tab.
‘#’ placed at the beginning of a sentence means ‘comment out’ whereas, a ‘#’ in the middle of sentence
means otherwise.
Details of each tag is shown in Table 1.4.1-1 コンフィギュレーションファイルに記載するタグの説明

...

タグ名

...

説明

...

複数指定

...

選択性

...

ア プ リ ケ ー シ ョ ン 名 関 連 情 報

...

APPLICATION

...

AdamApp の実行ファイル名。 Makefile の PROG_NAME 変数と同じ名前を記載します。 使える文字は、英数字、ハイフン、アンダースコア、ピリオド で、256 文字以内です。

...

M

...

APPVERSION

...

AdamApp のバージョン。 使える文字は、英数字、ピリオドで、7 文字以内です。

...

M

...

APPNAME

...

AdamApp の正式名称。
この AdamApp の正式名称は、複数言語に対応しているため、
APPNAME0 Sample Application
というように APPNAME + リージョンコードというタグ名を構成
します。複数言語の正式名称を記載する場合には、この項目を複
数記載してください。

各言語に対応するタグ名は下記の通りです。

APPNAME0:英語

APPNAME1:日本語

APPNAME5:イタリア語

APPNAME7:フランス語

APPNAME9:ドイツ語

APPNAME11:スペイン語

APPNAME12:中国語

APPNAME13:ロシア語

APPNAME14:ポルトガル語

なお、APPNAME0(英語)は、必ず指定してください。その他の
APPNAME の指定については、任意です。
シングルクォートは使用できません。文字数は、32 文字以内です。
なお、文字コードは UTF-8 でなければなりません。

...

O

...

M

...

リ ソ ー ス 関 連 情 報

...

ROMSIZE (*1)

...

AdamApp が利用する ROM 使用量 (KB)。
この ROM 使用量には、AdamApp の実行ファイルだけでなく、
data ディレクトリに格納するファイルのサイズなども含みます。
AdamApp のインストール時に、この値を参照して、インストール可能かどうかを判断します。

...

M

...

RAMSIZE (*2)

...

AdamApp が利用する RAM 使用量(KB)。
AdamApp のインストール時に、この値を参照して、インストール可能かどうかを判断します。
AdamApp の開始時に、この値を参照して、開始可能かどうかを判断します。

...

M

...

CPURATE (*2)

...

AdamApp が利用する CPU 使用率(%)。

...

M

...

AIACCRATE (*2)

...

AdamApp が利用する AI アクセラレータ使用率(%)
AdamApp の開始時に、この値を参照して、開始可能かどうかを判断します。

...

AIMEMSIZE (*3)

...

AdamApp が利用する AI メモリ使用量(KB)
AdamApp の開始時に、この値を参照して、開始可能かどうかを判断します。

...

ス ク リ プ ト フ ァ イ ル 情 報

...

INSTALLER

...

インストール実行直後に実行されるシェルスクリプト名。
記述できるシェルスクリプトは、Bourne Shell(実際には、Bourne Shell 互換シェルである ash を利用)スクリプトのみです。
使える文字は、英数字、ハイフン、アンダースコア、ピリオドで、256 文字以内です。
なお、このシェルスクリプトを用いない場合は、値を記載しないか、この項目をコメントアウトしてください。

...

UPDATER

...

アップデート実行直後に実行されるシェルスクリプト名。
記述できるシェルスクリプトは、Bourne Shell(実際には、Bourne Shell 互換シェルである ash を利用)スクリプトのみです。
使える文字は、英数字、ハイフン、アンダースコア、ピリオドで、256 文字以内です。
なお、このシェルスクリプトを用いない場合は、値を記載しないか、この項目をコメントアウトしてください。

...

UNINSTALLER

...

アンインストール実行直前に実行されるシェルスクリプト名。
記述できるシェルスクリプトは、Bourne Shell(実際には、Bourne Shell 互換シェルである ash を利用)スクリプトのみです。
使える文字は、英数字、ハイフン、アンダースコア、ピリオドで、256 文字以内です。
なお、このシェルスクリプトを用いない場合は、値を記載しないか、この項目をコメントアウトしてください。

...

ラ イ セ ン ス 関 連 情 報

...

FUNCID

...

機能 ID。機能 ID は、AdamApp 毎に一意に割当てられる値で、通常、i-PRO 株式会社によって定められます。
この項目は、AdamApp に機能 ID を紐づけるためのものです。
使える文字は、16 進数で 8 桁の値です。

Info

AdamApp 開発時には、0000FF01~0000FFFF の間で設定してください。
なお、AdamApp 毎に違う機能 IDを設定してください。
もし、同じ機能 ID を設定されたAdamApp をインストールした時、後からインストールした AdamApp は、インストールエラーになります。

...

M

*1: ROMSIZE
以下の合計:
実行可能なファイルと共有ライブラリ(Linux サイズコマンドで取得した”text”と”data”のフィールドの合計値)。
Data ディレクトリの容量
Conf ディレクトリの容量

*2: RAMSIZE, CPURATE, AIACCRATE,
初めにサンプルアプリケーションと同じ値を設定してください。最後に、i-PRO カメラ上でアプリケーションを実行した際の値を設定してください。これらのパラメータについてはResource Monitorを参照ください。
また、利用可能な ROM/RAM のリソースについてはAppendix B: AdamApp で利用可能な CPU と RAMを参照ください。

*3: AIMEMSIZE

サンプルアプリケーションと同じ値を設定してください。. Please refer to this table to determine what character can be
used for Value for each tag. Examples are shown below.

# set of the name of execution file of AdamApp

APPLICATION SkeletonSampleApp

# set of version of AdamApp

APPVERSION V0.01

More than one item can be selected. Example is as follows.

# set of the official name of AdamApp

APPNAME0 Sample Application

APPNAME1 サンプルアプリケーション

APPNAME5 esempio di applicazione

Following tag names can be used in the configuration file. The optionality field where ‘M (Mandatory)’ is indicated must be filled. The field can be left blank if it is not indicated as mandatory.

Table 1.4.1-1 Tags written in the configuration file

Tag name

Description

Multi selectable

Optionality

Application name related information

APPLICATION

The name of AdamApp execution file. Write the same name as PROG_NAME variable in Makefile. Up to 256 characters using alpha-numeral, hyphen, under score, and period.

M

APPVERSION

AdamApp version information. Up to 7 characters using alpha-numeral and period.

M

APPNAME

The AdamApp official name Tag name should be a combination of APPNAME + region code. This is because an AdamApp official name supports multiple language.

e.g., APPNAME0 SampleApplication

Tag names of languages are as follows:

APPNAME0:English

APPNAME1:Japanese

APPNAME5:Italian

APPNAME7:French

APPNAME9:German

APPNAME11:Spanish

APPNAME12:Chinese

APPNAME13:Russian

APPNAME14:Portuguese

Please always specify APPNAME0(English). The other languages are optional. Single quote cannot be used. The number of characters is up to 32. Character code must be UTF-8

O

M

Information of release

ROMSIZE (*1)

ROM size used for AdamApp. ROM size includes not only execution file of AdamApp but also the file size stored in data directory. Whether AdamApp can be installed or NOT is determined depending on these values.

M

RAMSIZE (*2)

RAM size used for AdamApp. Whether AdamApp can be installed or NOT is determined depending on these values. Whether AdamApp can be started or NOT is determined depending on these values when starting AdamApp.

M

CPURATE (*2)

AdamApp CPU usage.

M

AIACCRATE (*2)

Adam App AI Accelerator utilization. Whether AdamApp can be started or NOT is determined depending on these values when starting AdamApp.

AIMEMSIZE (*3)

AI Memory size used by AdamApp. Whether AdamApp can be started or NOT is determined depending on these values when starting AdamApp. Whether AdamApp can be started or NOT is determined depending on these values when starting AdamApp.

Information of script file

INSTALLER

Name of the shell script that is executed soon after the installation. Only in Bourne Shell format (Bourne Shell compatible ash should be used). Alpha-numeral, hyphen, under score, and period can be used. The number of characters should be within 256. When this shell script is not used, do not indicate any value or comment out this item.

UPDATER

The name of the shell script executed soon after an update. Only in Bourne Shell format (Bourne Shell compatible ash should be used). Alpha-numeral, hyphen, under score, and period can be used. The number of characters should be within 256. When this shell script is not used, do not indicate any value or comment out this item.

UNINSTALLER

Name of the shell script executed right before the uninstallation. Only in Bourne Shell format (Bourne Shell compatible ash should be used). Alpha-numeral, hyphen, under score, and period can be used. The number of characters should be within 256. When this shell script is not used, do not indicate any value or comment out this item.

Information of license

FUNCID

Function ID This is a unique value for each AdamApp which is normally assigned by i-PRO Co., Ltd. This value can link AdamApp to the function ID. The ID should be 8 digit and in hex.

Info

Use any value between 0000FF01 to 0000FFFF during the development. The ID should be different for each AdamApp. Installation error occurs if AdamApp had the same function ID with AdamApp that has been already installed.

M

*1: ROMSIZE
Sum of followings.
Size of executable file and shared libraries (sum of “text” and “data” field value obtained with the
Linux size command.)
Size of data directory.
Size of conf directory.

*2: RAMSIZE, CPURATE, AIACCRATE,
At first, set the same value as the sample application.
At last, set the value when running the application on the i-PRO camera.
How to see these parameters described in here★link★.
Available ROM/RAM resources described in here★link★.

*3: AIMEMSIZE

Set the same value as the sample application.

AIアクセラレーターの活用事例

...

Note

・AI アクセラレータは i-pro ambaCV2X モデル向けの AdamApp でのみ、利用可能です。

・ツール(cvtool)は AdamAppSDK には含まれていません。必要な場合には、i-PRO 株式会社にお問合せください。

...