Skip to content

Commit

Permalink
suit: Manifest checks recovery button from companion
Browse files Browse the repository at this point in the history
This commit adds the possibility to run a companion image
which checks the need of entering foreground update mode
based on pressing a button.

Signed-off-by: Artur Hadasz <artur.hadasz@nordicsemi.no>
  • Loading branch information
ahasztag committed Nov 28, 2024
1 parent 9726bac commit 25c5c55
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ SUIT_Envelope_Tagged:
- suit-send-sysinfo-failure
suit-invoke:
- suit-directive-set-component-index: 0
{%- if 'CONFIG_SUIT_RECOVERY_BUTTON' in app_recovery_img['config'] and app_recovery_img['config'][CONFIG_SUIT_RECOVERY_BUTTON] != '' %}
- suit-directive-override-parameters:
suit-parameter-invoke-args:
suit-synchronous-invoke: True
suit-timeout: 1000
{%- endif %}
- suit-directive-invoke:
- suit-send-record-failure

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@
{%- else %}
{%- set nordic_top = False %}
{%- endif %}
{%- if 'SB_CONFIG_SUIT_RECOVERY_APPLICATION_IMAGE_MANIFEST_APP_LOCAL_3' in sysbuild['config'] and sysbuild['config']['SB_CONFIG_SUIT_RECOVERY_APPLICATION_IMAGE_MANIFEST_APP_LOCAL_3'] != '' %}
{%- set mpi_app_recovery_local_vendor_name = main_config['config']['CONFIG_SUIT_MPI_APP_LOCAL_3_VENDOR_NAME']|default('nordicsemi.com') %}
{%- set mpi_app_recovery_local_class_name = main_config['config']['CONFIG_SUIT_MPI_APP_LOCAL_3_CLASS_NAME']|default('nRF54H20_sample_app_3') %}
{%- endif %}
{%- if app_recovery_img is defined and 'CONFIG_SUIT_RECOVERY_BUTTON' in app_recovery_img['config'] and app_recovery_img['config'][CONFIG_SUIT_RECOVERY_BUTTON] != '' %}
{%- set recovery_button_check_on_invoke = True %}
{%- else %}
{%- set recovery_button_check_on_invoke = False %}
{%- endif %}
SUIT_Envelope_Tagged:
suit-authentication-wrapper:
SuitDigest:
Expand All @@ -33,14 +42,14 @@ SUIT_Envelope_Tagged:
suit-components:
- - CAND_MFST
- 0
{%- if radio is defined %}
{% if recovery_button_check_on_invoke %}
{%- set component_index = component_index + 1 %}
{%- set rad_component_index = component_index %}
{{- component_list.append( rad_component_index ) or ""}}
{%- set app_recovery_local_component_index = component_index %}
{{- component_list.append( app_recovery_local_component_index ) or ""}}
- - INSTLD_MFST
- RFC4122_UUID:
namespace: {{ mpi_radio_vendor_name }}
name: {{ mpi_radio_class_name }}
namespace: {{ mpi_app_recovery_local_vendor_name }}
name: {{ mpi_app_recovery_local_class_name }}
{%- endif %}
{%- if application is defined %}
{%- set component_index = component_index + 1 %}
Expand All @@ -51,6 +60,15 @@ SUIT_Envelope_Tagged:
namespace: {{ mpi_application_vendor_name }}
name: {{ mpi_application_class_name }}
{%- endif %}
{%- if radio is defined %}
{%- set component_index = component_index + 1 %}
{%- set rad_component_index = component_index %}
{{- component_list.append( rad_component_index ) or ""}}
- - INSTLD_MFST
- RFC4122_UUID:
namespace: {{ mpi_radio_vendor_name }}
name: {{ mpi_radio_class_name }}
{%- endif %}

{%- set component_list_without_top = component_list[:] %}
{%- if nordic_top %}
Expand Down
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ manifest:
upstream-sha: c6eaeda5a1c1c5dbb24dce7e027340cb8893a77b
compare-by-default: false
- name: suit-generator
revision: 9c5e8f16ef49e5ffbdeabc87ffd60b82b1fd72b0
revision: pull/154/head
path: modules/lib/suit-generator
- name: suit-processor
revision: c97fbb352687383378d9ee2f5017668ebaac9fc7
Expand Down

0 comments on commit 25c5c55

Please sign in to comment.