Azure RTOSのGetting StartedをLinuxで実行してみました

この無線設備は、電波法に定める技術基準への適合が確認されておらず、法に定める特別な条件の下でのみ使用が認められています。この条件に違反して無線設備を使用することは、法に定める罰則その他の措置の対象となります。 

はじめに

readme.mdにはWindows PCが必要と書かれていましたが、バッチファイルのある場所にシェルスクリプトもあるのでビルドまではできると思っていました。

blog.logicdesign.jp


今週頭ごろのreadme.mdにはSTM32 ST-LINK Utilityで書き込む手順になっていたのですが、現在はMBED方式で書き込むようになっているので、Linuxでも環境を構築できるか試してみました。

必要なもの

  • Ubuntu 20.04がインストールされているPC

手順(差分)

ツールのインストール

% bash getting-started/tools/get-toolchain.sh

下記のようなエラーメッセージが出て止まります。

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 cmake : Depends: libssl1.0.0 (>= 1.0.2~beta3) but it is not installable
E: Unable to correct problems, you have held broken packages.

getting-started/tools/get-toolchain.shを見てみると...

sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'

という行にbionic(18.04 LTS)という文字列があるのでfocal(20.04 LTS)に置き換えます。

sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main'

再度シェルスクリプトを実行します。

% bash getting-started/tools/get-toolchain.sh

今度はうまくツールをインストールできました。

イメージのビルド

% sh getting-started/STMicroelectronics/STM32L4/tools/rebuild.sh

getting-started/STMicroelectronics/STM32L4/build/app/以下に.binファイルが出来上がります。

イメージの書き込み

基板をPCに接続して、USB Mass Strage Deviceとしてマウントされたら.binファイルをコピーします。

% cp getting-started/STMicroelectronics/STM32L4/build/app/stm32l475_azure_iot.bin /media/ytakeuch/DIS_L4IOT

ターミナル接続

screenでシリアル接続します。

% sudo screen /dev/ttyACM0 115200


Linuxでも環境を構築することができました。