@@ -411,31 +411,37 @@ int wolfBoot_set_encrypt_key(const uint8_t *key, const uint8_t *nonce);
411411int wolfBoot_get_encrypt_key (uint8_t * key , uint8_t * nonce );
412412int wolfBoot_erase_encrypt_key (void );
413413
414- #ifndef __WOLFBOOT
414+ #if !defined( __WOLFBOOT ) && defined( WOLFCRYPT_SECURE_MODE )
415415
416416/* Applications can access update success/trigger and flash erase/write
417417 * via non-secure callable, to facilitate updates
418418 */
419419
420420/* Call wolfBoot_success from non-secure application */
421+
422+ __attribute__((cmse_nonsecure_entry ))
421423void wolfBoot_nsc_success (void );
422424
423425/* Call wolfBoot_update_trigger from non-secure application */
426+ __attribute__((cmse_nonsecure_entry ))
424427void wolfBoot_nsc_update_trigger (void );
425428
426429/* Erase one or more sectors in the update partition.
427430 * - address: offset within the update partition ('0' corresponds to PARTITION_UPDATE_ADDRESS)
428431 * - len: size, in bytes
429432 */
433+ __attribute__((cmse_nonsecure_entry ))
430434int wolfBoot_nsc_erase_update (uint32_t address , uint32_t len );
431435
432436/* Write the content of buffer `buf` and size `len` to the update partition,
433437 * at offset address, from non-secure application
434438 * - address: offset within the update partition ('0' corresponds to PARTITION_UPDATE_ADDRESS)
435439 * - len: size, in bytes
436440 */
441+ __attribute__((cmse_nonsecure_entry ))
437442int wolfBoot_nsc_write_update (uint32_t address , const uint8_t * buf , uint32_t len );
438- #endif /* !__WOLFBOOT */
443+
444+ #endif /* !__WOLFBOOT && WOLFCRYPT_SECURE_MODE */
439445
440446
441447#ifdef __cplusplus
0 commit comments