@@ -412,6 +412,38 @@ int wolfBoot_set_encrypt_key(const uint8_t *key, const uint8_t *nonce);
412412int wolfBoot_get_encrypt_key (uint8_t * key , uint8_t * nonce );
413413int wolfBoot_erase_encrypt_key (void );
414414
415+ #if !defined(__WOLFBOOT ) && defined(WOLFCRYPT_SECURE_MODE )
416+
417+ /* Applications can access update success/trigger and flash erase/write
418+ * via non-secure callable, to facilitate updates
419+ */
420+
421+ /* Call wolfBoot_success from non-secure application */
422+
423+ __attribute__((cmse_nonsecure_entry ))
424+ void wolfBoot_nsc_success (void );
425+
426+ /* Call wolfBoot_update_trigger from non-secure application */
427+ __attribute__((cmse_nonsecure_entry ))
428+ void wolfBoot_nsc_update_trigger (void );
429+
430+ /* Erase one or more sectors in the update partition.
431+ * - address: offset within the update partition ('0' corresponds to PARTITION_UPDATE_ADDRESS)
432+ * - len: size, in bytes
433+ */
434+ __attribute__((cmse_nonsecure_entry ))
435+ int wolfBoot_nsc_erase_update (uint32_t address , uint32_t len );
436+
437+ /* Write the content of buffer `buf` and size `len` to the update partition,
438+ * at offset address, from non-secure application
439+ * - address: offset within the update partition ('0' corresponds to PARTITION_UPDATE_ADDRESS)
440+ * - len: size, in bytes
441+ */
442+ __attribute__((cmse_nonsecure_entry ))
443+ int wolfBoot_nsc_write_update (uint32_t address , const uint8_t * buf , uint32_t len );
444+
445+ #endif /* !__WOLFBOOT && WOLFCRYPT_SECURE_MODE */
446+
415447
416448#ifdef __cplusplus
417449}
0 commit comments