LoginSignup
1
1

More than 3 years have passed since last update.

SafeG-Mを実行してみよう

Last updated at Posted at 2020-08-22

はじめに

ARMv-8M TrustZoneを用いてTOPPERS/ASP3とFreeRTOSを実行可能なSafeG-Mの実行方法について説明します.

機材

オプションバイトの設定(1回のみ)

  • ボードをPCに接続
  • STM32CubeProgrammerを起動.
  • 右上のConnectボタンを押して接続
  • 左のOB(Option Byte)をクリック

image.png

  • User Configurationのタブを開いて,以下の項目を設定
    • DBANK : 選択しない
    • TZEN : 選択
  • Applyを押す.
  • 次にSecure Area1のタブを開いて以下の項目を設定
    • SECWM1_PSTRT : 0x0
    • SECWM1_PEND : 0x3F
  • Applyを押す.
  • STM32CubeProgrammerを終了

ビルド&実行

  • TOPPERSのサイトからパッケージをダウンロードして展開
  • STM32CubeIDEを起動
  • ワークスペースに safeg-m-1.0.0/target/stm32l552 を指定 image.png
  • File -> Importを選択 image.png
  • Existing Projects into Workspace を選択 image.png
  • Browseを選択してOK.
  • Finishを押す.

image.png

  • sample_Secure -> configure.launchで右クリックして,Run As -> configure を選択. image.png
  • sample_Secure -> Build Projectを選択
    • ビルドが開始されます. image.png
  • sample_Secure -> sample.launchで右クリックして,Debug As -> sample を選択 image.png
  • Non-Secure側もビルドされてターゲットにダウンロードされます.
    • 途中何か聞かれたらNo以外を選択
    • STLINKのファームウェア更新の場合は再度sample.launch を選択
  • プログラムが実行されます
    • 実行されない場合は実行ボタンを押す
  • コンソールに次のように表示される image.png
  • コンソールに1t2t3tと入力してSecure側のタスクを終了させるとNon-Secure側のタスクが実行される image.png

変更履歴

  • 2020/10/06
    • オプションバイトの設定を追加.
  • 2020/09/04
    • Typeの修正
  • 2020/08/23
    • 最初の投稿

image.png

1
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1