Skip to content
Fuminori OKUHARA edited this page Mar 1, 2022 · 3 revisions

FOTA

ファームウェアの更新ファイルをダウンロードし更新する機能です。

$$UNLOCKコマンドでロックを外し$$UPDATEコマンドで更新ファイルのダウンロードを実行します。
ダウンロード完了後にリブートし、直後の起動時にブートローダの機能でファームウェアの更新処理が実行されます。

v0.4.0以降

さくらのモノプラットフォームのプロジェクトにアップロードした更新イメージファイルでファームウェアを更新します。

$$UPDATE UPDATEを実行した場合、app_update.binという名前(FILE_ID)でアップロードしたファイルをダウンロードし更新を実行します。

別の名前(FILE_ID)で更新イメージファイルをアップロードした場合、$$UPDATE VERSION <FILE_ID>でダウンロードするファイルを選択できます。
複数のバージョンに対応したイメージファイルをアップロードしておき選択し更新することができます。

更新イメージファイルapp_update.bin, other_fw_image.binがアップロードされている状態での実行例です。

image

例: デフォルトのイメージファイル(app_update.bin)をダウンロードして更新

$$ UNLOCK UNLOCK
OK
$$UPDATE UPDATE
DOWNLOAD FILE: app_update.bin
FOTA DOWNLOAD START
  0% DOWNLOADED
  0% DOWNLOADED
  1% DOWNLOADED
  1% DOWNLOADED
  2% DOWNLOADED
  2% DOWNLOADED
  3% DOWNLOADED
  3% DOWNLOADED
       :
     (省略)
       :
 99% DOWNLOADED
 99% DOWNLOADED
FOTA DOWNLOAD FINISHED
REBOOT & RUN UPDATE
*** Booting Zephyr OS build v2.6.99-ncs1-1  ***
I: Starting bootloader
I: Primary image: magic=good, swap_type=0x2, copy_done=0x1, image_ok=0x1
I: Secondary image: magic=good, swap_type=0x2, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Swap type: test
       : (以下、ブートメッセージが出力される)

例: other_fw_image.binをダウンロードして更新

$$UNLOCK UNLOCK
OK
$$UPDATE VERSION other_fw_image.bin
DOWNLOAD FILE: other_fw_image.bin
FOTA DOWNLOAD START
  0% DOWNLOADED
  0% DOWNLOADED
  1% DOWNLOADED
  1% DOWNLOADED
  2% DOWNLOADED
  2% DOWNLOADED
  3% DOWNLOADED
  3% DOWNLOADED
       :
     (省略)
       :
 99% DOWNLOADED
 99% DOWNLOADED
FOTA DOWNLOAD FINISHED
REBOOT & RUN UPDATE
*** Booting Zephyr OS build v2.6.99-ncs1-1  ***
I: Starting bootloader
I: Primary image: magic=good, swap_type=0x2, copy_done=0x1, image_ok=0x1
I: Secondary image: magic=good, swap_type=0x2, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Swap type: test
       : (以下、ブートメッセージが出力される)

v0.3.1以前

さくらインターネットが用意している更新イメージファイルをダウンロードして更新します。

$$UNLOCK UNLOCK
OK
$$UPDATE UPDATE
FOTA DOWNLOAD START
  1% DOWNLOADED
  2% DOWNLOADED
  3% DOWNLOADED
  4% DOWNLOADED
  5% DOWNLOADED
       :
     (省略)
       :
 96% DOWNLOADED
 97% DOWNLOADED
 98% DOWNLOADED
 99% DOWNLOADED
100% DOWNLOADED
FOTA DOWNLOAD FINISHED
REBOOT & RUN UPDATE
・** Booting Zephyr OS build v2.4.99-ncs2  ***
I: Starting bootloader
I: Primary image: magic=good, swap_type=0x2, copy_done=0x1, image_ok=0x1
I: Secondary image: magic=good, swap_type=0x2, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Swap type: test
I: Bootloader chainload address offset: 0x10000
I: Jumping to the first image slot
*** Booting Zephyr OS build v2.4.99-ncs2  ***
Flash regions           Domain          Permissions
00 02 0x00000 0x18000   Secure          rwxl
03 31 0x18000 0x100000  Non-Secure      rwxl

Non-secure callable region 0 placed in flash region 2 with size 32.

SRAM region             Domain          Permissions
00 07 0x00000 0x10000   Secure          rwxl
08 31 0x10000 0x40000   Non-Secure      rwxl

Peripheral              Domain          Status
00 NRF_P0               Non-Secure      OK
01 NRF_CLOCK            Non-Secure      OK
02 NRF_RTC0             Non-Secure      OK
03 NRF_RTC1             Non-Secure      OK
04 NRF_NVMC             Non-Secure      OK
05 NRF_UARTE1           Non-Secure      OK
06 NRF_UARTE2           Secure          SKIP
07 NRF_TWIM2            Non-Secure      OK
08 NRF_SPIM3            Non-Secure      OK
09 NRF_TIMER0           Non-Secure      OK
10 NRF_TIMER1           Non-Secure      OK
11 NRF_TIMER2           Non-Secure      OK
12 NRF_SAADC            Non-Secure      OK
13 NRF_PWM0             Non-Secure      OK
14 NRF_PWM1             Non-Secure      OK
15 NRF_PWM2             Non-Secure      OK
16 NRF_PWM3             Non-Secure      OK
17 NRF_WDT              Non-Secure      OK
18 NRF_IPC              Non-Secure      OK
19 NRF_VMC              Non-Secure      OK
20 NRF_FPU              Non-Secure      OK
21 NRF_EGU1             Non-Secure      OK
22 NRF_EGU2             Non-Secure      OK
23 NRF_DPPIC            Non-Secure      OK
24 NRF_REGULATORS       Non-Secure      OK
25 NRF_GPIOTE1          Non-Secure      OK

SPM: NS image at 0x1c200
SPM: NS MSP at 0x2001deb8
SPM: NS reset vector at 0x2297d
SPM: prepare to jump to Non-Secure image.
*** SIPF Client(Type00) v.0.1.0 ***
Trying to attach to LTE network (TIMEOUT: 60000 ms)
SEARCHING
REGISTERD
ICCID: 8981040000000444740
+++ Ready +++