Skip to content

Commit

Permalink
samples: suit: smp_transfer: Images flashed separately to ext flash
Browse files Browse the repository at this point in the history
This commit adds configurations to the smp_transfer sample, which
allow separating the firmware images from the root envelope and
sending them separately to the external flash.

The manifests templates was modified so that such update works.

Signed-off-by: Artur Hadasz <artur.hadasz@nordicsemi.no>
  • Loading branch information
ahasztag authored and nordicjm committed Sep 5, 2024
1 parent 07fea6b commit 8926100
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
19 changes: 19 additions & 0 deletions samples/suit/smp_transfer/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,22 @@ tests:
- OVERLAY_CONFIG="sysbuild/smp_transfer_bt.conf"
- SB_OVERLAY_CONFIG="sysbuild_bt.conf"
tags: suit bluetooth ci_samples_suit

sample.suit.smp_transfer.full.extflash.extracted_cache:
extra_args:
- FILE_SUFFIX=extflash
- SUIT_DFU_CACHE_PARTITION_1_EB_SIZE=4096
extra_configs:
- CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE=y
tags: suit ci_samples_suit

sample.suit.smp_transfer.full.extflash.bt.extracted_cache:
extra_args:
- FILE_SUFFIX=extflash
- OVERLAY_CONFIG="sysbuild/smp_transfer_bt.conf"
- SB_OVERLAY_CONFIG="sysbuild_bt.conf"
- SUIT_DFU_CACHE_PARTITION_1_EB_SIZE=4096
- hci_ipc_CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE=y
extra_configs:
- CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE=y
tags: suit bluetooth ci_samples_suit
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,14 @@ SUIT_Envelope_Tagged:
suit-current-version: {{ DEFAULT_VERSION }}
{%- endif %}

{%- if 'CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE' not in application['config'] or application['config']['CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE'] == '' %}
suit-payload-fetch:
- suit-directive-set-component-index: 2
- suit-directive-override-parameters:
suit-parameter-uri: 'file://{{ application['filename'] }}'
- suit-directive-fetch:
- suit-send-record-failure
{%- endif %}
suit-install:
{%- if flash_companion is defined %}
- suit-directive-set-component-index: 1
Expand Down Expand Up @@ -123,7 +125,11 @@ SUIT_Envelope_Tagged:
{%- endif %}
- suit-directive-set-component-index: 1
- suit-directive-override-parameters:
{%- if 'CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI' in application['config'] and application['config']['CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI'] != '' %}
suit-parameter-uri: '{{ application['config']['CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI'] }}'
{%- else %}
suit-parameter-uri: 'file://{{ application['filename'] }}'
{%- endif %}
suit-parameter-image-digest:
suit-digest-algorithm-id: cose-alg-sha-256
suit-digest-bytes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,22 @@ SUIT_Envelope_Tagged:
suit-current-version: {{ DEFAULT_VERSION }}
{%- endif %}

{%- if 'CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE' not in radio['config'] or radio['config']['CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE'] == '' %}
suit-payload-fetch:
- suit-directive-set-component-index: 2
- suit-directive-override-parameters:
suit-parameter-uri: 'file://{{ radio['filename'] }}'
- suit-directive-fetch:
- suit-send-record-failure
{%- endif %}
suit-install:
- suit-directive-set-component-index: 1
- suit-directive-override-parameters:
{%- if 'CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI' in radio['config'] and radio['config']['CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI'] != '' %}
suit-parameter-uri: '{{ radio['config']['CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI'] }}'
{%- else %}
suit-parameter-uri: 'file://{{ radio['filename'] }}'
{%- endif %}
- suit-directive-fetch:
- suit-send-record-failure
- suit-condition-image-match:
Expand Down

0 comments on commit 8926100

Please sign in to comment.