Sync VAD example with TF-M

- The FWU API has been changed, so the example had to be aligned.
- Added project_config.h because of the changed configuration system.

Change-Id: Id3eaad458e9b0b98424a0373a65b4b0a8bc86206
Signed-off-by: Bence Balogh <bence.balogh@arm.com>
diff --git a/examples/vad_an552/ns_side/main_ns.c b/examples/vad_an552/ns_side/main_ns.c
index c77f530..881dcf7 100644
--- a/examples/vad_an552/ns_side/main_ns.c
+++ b/examples/vad_an552/ns_side/main_ns.c
@@ -50,7 +50,6 @@
 static void* prvCalloc(size_t xNmemb, size_t xSize);
 static bool is_first_boot(void);
 static void write_boot_pattern(void);
-static void accept_primary_slot_image(void);
 
 /*
  * Semihosting is a mechanism that enables code running on an ARM target
@@ -77,17 +76,6 @@
 
 psa_key_handle_t xOTACodeVerifyKeyHandle = 0xAA;
 
-static void accept_primary_slot_image(void)
-{
-    psa_image_id_t running_image = \
-                (psa_image_id_t)FWU_CALCULATE_IMAGE_ID(FWU_IMAGE_ID_SLOT_ACTIVE,
-                                                    FWU_IMAGE_TYPE_FULL,
-                                                    0);
-    vLoggingPrintf("Accepting image by setting image_ok flag to 0x1 in MCUBOOT trailer");
-    if (psa_fwu_accept(running_image) != PSA_SUCCESS) {
-        vLoggingPrintf("Accept failed");
-    }
-}
 
 static bool is_first_boot(void)
 {
@@ -226,8 +214,7 @@
     stdio_init();
     vUARTLockInit();
     tfm_ns_interface_init();
-
-    GetImageVersionPSA(FWU_IMAGE_TYPE_FULL);
+    GetImageVersionPSA(FWU_COMPONENT_ID_FULL);
     vLoggingPrintf("Application firmware version: %d.%d.%d",
                    appFirmwareVersion.u.x.major,
                    appFirmwareVersion.u.x.minor,
@@ -240,7 +227,6 @@
     mbedtls_platform_set_calloc_free(prvCalloc, vPortFree);
 
     if(is_first_boot()) {
-        accept_primary_slot_image();
         vDevModeKeyProvisioning();
         ota_privision_code_signing_key(&xOTACodeVerifyKeyHandle);
         write_boot_pattern();