0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Spresenseのマルチコアサンプルシステム動作確認環境の構築

Last updated at Posted at 2021-03-27

1年前に受講したAPSハンズオンワークショップ環境の自前環境の構築をしたので手順と気づいた点を記録

目次

1. MSYS2セットアップ

ソースコードダウンロード

//github.com/inscape-sa/spresense-aps-v1.git spresense

※上記コマンド実行時に"変更が多く反映できない"旨のエラーが出るため「spresense-aps-v1.git」、「spresense-nuttx-apps.git」を自分のGithubアカウントにForkして呼出した。(何か正式なやり方?などあるのか?)

1.1. msys2のgitコマンド実行結果

下記、「fatal: repository 'https://github.com/XXXXXXXX/spresense-nuttx-apps.git/' not found」が出力されダウンロードが失敗するところ、"sonydevworld/spresense-nuttx-apps.git"から自分のアカウントにForkし呼出した。

msys
XXXXX@DESKTOP-5NJ06HG MSYS ~
$ git clone --recursive https://github.com/XXXXXXXX/spresense-aps-v1.git spresense
Cloning into 'spresense'...
remote: Enumerating objects: 25214, done.
remote: Total 25214 (delta 0), reused 0 (delta 0), pack-reused 25214
Receiving objects: 100% (25214/25214), 140.89 MiB | 1.61 MiB/s, done.
Resolving deltas: 100% (16083/16083), done.
Checking out files: 100% (9920/9920), done.
Submodule 'externals/nnabla-c-runtime' (https://github.com/sony/nnabla-c-runtime) registered for path 'externals/nnablart/nnabla-c-runtime'
Submodule 'nuttx' (https://github.com/sonydevworld/spresense-nuttx.git) registered for path 'nuttx'
Submodule 'sdk/apps' (https://github.com/XXXXXXXX/spresense-nuttx-apps.git) registered for path 'sdk/apps'
Cloning into '/home/XXXXX/spresense/externals/nnablart/nnabla-c-runtime'...
remote: Enumerating objects: 261, done.
remote: Counting objects: 100% (261/261), done.
remote: Compressing objects: 100% (170/170), done.
remote: Total 5062 (delta 143), reused 166 (delta 82), pack-reused 4801
Receiving objects: 100% (5062/5062), 1.17 MiB | 535.00 KiB/s, done.
Resolving deltas: 100% (3004/3004), done.
Cloning into '/home/XXXXX/spresense/nuttx'...
remote: Enumerating objects: 177, done.
remote: Counting objects: 100% (177/177), done.
remote: Compressing objects: 100% (140/140), done.
remote: Total 443681 (delta 84), reused 79 (delta 37), pack-reused 443504
Receiving objects: 100% (443681/443681), 106.93 MiB | 980.00 KiB/s, done.
Resolving deltas: 100% (349186/349186), done.
Cloning into '/home/XXXXX/spresense/sdk/apps'...
Username for 'https://github.com':
Password for 'https://XXXXXXXX@github.com':
remote: Repository not found.
fatal: repository 'https://github.com/XXXXXXXX/spresense-nuttx-apps.git/' not found
fatal: clone of 'https://github.com/XXXXXXXX/spresense-nuttx-apps.git' into submodule path '/home/XXXXX/spresense/sdk/apps' failed
Failed to clone 'sdk/apps'. Retry scheduled
Cloning into '/home/XXXXX/spresense/sdk/apps'...
Username for 'https://github.com':
Password for 'https://XXXXXXXX@github.com':
fatal: The permissions on your socket directory are too loose; other
users may be able to read your cached credentials. Consider running:

        chmod 0700 /home/XXXXX/.cache/git/credential
fatal: cache daemon did not start:
remote: Enumerating objects: 211, done.
remote: Counting objects: 100% (211/211), done.
remote: Compressing objects: 100% (123/123), done.
remote: Total 51460 (delta 123), reused 131 (delta 86), pack-reused 51249
Receiving objects: 100% (51460/51460), 12.48 MiB | 746.00 KiB/s, done.
Resolving deltas: 100% (42091/42091), done.
Submodule path 'externals/nnablart/nnabla-c-runtime': checked out 'c58c11ddd182e8ed04eb931bbf2a82f190874c9d'
Submodule path 'nuttx': checked out '74f203ea59d99b2ccd8fe2b19c79b0eaadfc31ca'
Submodule path 'sdk/apps': checked out '4417563a634de189c360d83fee45f79adbe99ccb'
Submodule path 'sdk/apps': checked out '4417563a634de189c360d83fee45f79adbe99ccb'

2. VS codeセットアップ

  • ダウンロードソース内の .code-workspace ファイルを開く
  • ソース管理にてnuttxとspresenseのバージョンを設定
  • ポート設定・・・コマンドパレットで「Spresense:シリアルポートの選択」
  • ブートローダ・・・コマンドパレットで「Spresenes:ブートローダの書き込み」
  • ブートローダのダウンロード~書き込み

3. サンプルコードの実行

  1. 「Spresenes:ビルドと書き込み」を実行
  2. コンソールが起動したら実行する
  3. 測定値が出力されたらOK
  4. 終了するときは「Spresense本体のリセットボタン」

3.1. プログラム実行結果

マルチコア動作時
NuttShell (NSH) NuttX-7.22
nsh> aps_camera_asmp
|--|Multi Task Mode  (enable Dual-Buffering, 2TASKS)
alloc_buffer[0] <= 0x0d047080
alloc_buffer[1] <= 0x0d06c8a0
attached at CPU#1[local-id]  
attached at 00010000
attached at CPU#2[local-id]
attached at 00050000
nximage_initialize: Initializing LCD
nximage_initialize: Open NX
nximage_initialize: Screen resolution (320,240)
|--| 31.701616347 sec
|--| 61.623828514 sec
Worker exit status = 0
Worker exit status = 0
|--| DIFF = 29.922212167sec, 10.0260[FPS]
----------------------------
----- PROGRAM IS DONE. -----
- please push RESET button -
----------------------------
シングルコア動作時
NuttShell (NSH) NuttX-7.22
nsh> aps_camera_asmp
|--|Single Task Mode (only Single-Buffer) 
alloc_buffer[0] <= 0x0d047080
nximage_initialize: Initializing LCD      
nximage_initialize: Open NX
nximage_initialize: Screen resolution (320,240)
|--| 74.743333086 sec
|--| 114.306543265 sec
|--| DIFF = 39.563210179sec, 7.5828[FPS]
----------------------------
----- PROGRAM IS DONE. -----
- please push RESET button -
----------------------------

その他 LPC link2 デバッガ起動時のエラー対応

デバッガ設定後の初回使用時Timeoutエラーが出た。
2021-03-28-12-16-22.png

調べたら同じ症状の事例があった。

参考:
https://ja.stackoverflow.com/questions/62731/spresense-ide%E3%81%AE%E8%A8%AD%E5%AE%9A-%E3%83%87%E3%83%90%E3%83%83%E3%82%AC%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6

IDの確認①
2021-03-28-12-20-19.png

IDの確認②
2021-03-28-12-21-26.png

対策実行後のプロパティ情報
2021-03-28-12-24-32.png

上記確認後、デバッガの起動と動作が確認できた。

#参考

  • ハンズオンセミナー資料

0
0
0

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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?