@@ -285,14 +285,14 @@ def program_hex(self):
285285            if  self .build_conf .get ('CONFIG_BOARD_QUALIFIERS' ) ==  self .sysbuild_conf .get (
286286                'SB_CONFIG_BOARD_QUALIFIERS' 
287287            ):
288-                 mpi_hex_dir  =  Path (os .path .join (self .cfg .build_dir , 'zephyr' ))
288+                 mpi_hex_dir  =  Path (os .path .join (os . path . dirname ( self .cfg .build_dir ) , 'zephyr' ))
289289
290290                # Handle Manifest Provisioning Information 
291-                 if  self .build_conf .getboolean ('CONFIG_SUIT_MPI_GENERATE ' ):
291+                 if  self .sysbuild_conf .getboolean ('SB_CONFIG_SUIT_MPI_GENERATE ' ):
292292                    app_mpi_hex_file  =  os .fspath (
293-                         mpi_hex_dir  /  self .build_conf .get ('CONFIG_SUIT_MPI_APP_AREA_PATH ' ))
293+                         mpi_hex_dir  /  self .sysbuild_conf .get ('SB_CONFIG_SUIT_MPI_APP_AREA_PATH ' ))
294294                    rad_mpi_hex_file  =  os .fspath (
295-                         mpi_hex_dir  /  self .build_conf .get ('CONFIG_SUIT_MPI_RAD_AREA_PATH ' )
295+                         mpi_hex_dir  /  self .sysbuild_conf .get ('SB_CONFIG_SUIT_MPI_RAD_AREA_PATH ' )
296296                    )
297297                    self .op_program (
298298                        app_mpi_hex_file ,
@@ -313,8 +313,9 @@ def program_hex(self):
313313                # If an application firmware is built, the root envelope is merged 
314314                # with other application manifests as well as the output HEX file. 
315315                if  not  cpuapp  and  self .sysbuild_conf .get ('SB_CONFIG_SUIT_ENVELOPE' ):
316+                     storage_hex_dir  =  Path (os .path .join (self .cfg .build_dir , 'zephyr' ))
316317                    app_root_envelope_hex_file  =  os .fspath (
317-                         mpi_hex_dir  /  'suit_installed_envelopes_application_merged.hex' 
318+                         storage_hex_dir  /  'suit_installed_envelopes_application_merged.hex' 
318319                    )
319320                    self .op_program (
320321                        app_root_envelope_hex_file ,
0 commit comments