Build: Unify build artefacts naming

In case of NO_SWAP upgrade strategy the build artefacts
get a postfix (_0 or _1) to indicate which memory slot are
they intended. This patch remove the _0 postfix (but _1 still
exists) to be the same name of artefacts regardless the build
config.

Change-Id: I3a71c1212bd2f4120930e2cf033596b02c83f193
Signed-off-by: Tamas Ban <tamas.ban@arm.com>
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index 0d1f2d8..7fc564b 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -299,8 +299,7 @@
 					 S_TARGET      tfm_s
 					 FULL_BIN      tfm_full
 					 SIGN_BIN      tfm_sign
-					 VENEER_NAME   s_veneers
-					 POSTFIX       "_0")
+					 VENEER_NAME   s_veneers)
 
 	#Link to secondary memory region(add extra linker flag)
 	set_up_app_build(NS_TARGET     ${PROJECT_NAME}
@@ -334,10 +333,6 @@
 	embedded_project_end(${PROJECT_NAME})
 endif()
 
-if (TARGET ${PROJECT_NAME}_0)
-	embedded_project_end(${PROJECT_NAME}_0)
-endif()
-
 if (TARGET ${PROJECT_NAME}_1)
 	embedded_project_end(${PROJECT_NAME}_1)
 endif()
diff --git a/bl2/ext/mcuboot/MCUBoot.cmake b/bl2/ext/mcuboot/MCUBoot.cmake
index 7c2caba..c880f78 100644
--- a/bl2/ext/mcuboot/MCUBoot.cmake
+++ b/bl2/ext/mcuboot/MCUBoot.cmake
@@ -30,10 +30,10 @@
 	endif()
 
 	if (DEFINED _MY_PARAMS_POSTFIX)
-		if (${_MY_PARAMS_POSTFIX} STREQUAL "_0")
-			set(MY_POSTFIX "0")
-		else()
+		if (${_MY_PARAMS_POSTFIX} STREQUAL "_1")
 			set(MY_POSTFIX "1")
+		else()
+			message(FATAL_ERROR "Unknown artefacts postfix: ${_MY_PARAMS_POSTFIX}")
 		endif()
 	endif()
 
diff --git a/docs/user_guides/tfm_secure_boot.rst b/docs/user_guides/tfm_secure_boot.rst
index d37b775..c1119d7 100644
--- a/docs/user_guides/tfm_secure_boot.rst
+++ b/docs/user_guides/tfm_secure_boot.rst
@@ -139,7 +139,7 @@
 
 At build time automatically two binaries are generated::
 
-    <build_dir>/install/outputs/fvp/tfm_s_ns_signed_0.bin : Image linked for slot 0 memory partition
+    <build_dir>/install/outputs/fvp/tfm_s_ns_signed.bin : Image linked for slot 0 memory partition
 
     <build_dir>/install/outputs/fvp/tfm_s_ns_signed_1.bin : Image linked for slot 1 memory partition
 
@@ -402,7 +402,7 @@
     --parameter fvp_mps2.telnetterminal1.quiet=1 \
     --parameter fvp_mps2.telnetterminal2.quiet=1 \
     --application cpu0=<build_dir>/bl2/ext/mcuboot/mcuboot.axf \
-    --data cpu0=<default_build_dir>/install/outputs/fvp/tfm_s_ns_signed_0.bin@0x10080000 \
+    --data cpu0=<default_build_dir>/install/outputs/fvp/tfm_s_ns_signed.bin@0x10080000 \
     --data cpu0=<regresssion_build_dir>/install/outputs/fvp/tfm_s_ns_signed_1.bin@0x10180000
 
 Executing firmware upgrade on SSE 200 FPGA on MPS2 board
@@ -416,7 +416,7 @@
     IMAGE0ADDRESS: 0x00000000
     IMAGE0FILE: \Software\mcuboot.axf  ; BL2 bootloader
     IMAGE1ADDRESS: 0x10080000
-    IMAGE1FILE: \Software\tfm_sig0.bin ; TF-M default test binary blob
+    IMAGE1FILE: \Software\tfm_sign.bin ; TF-M default test binary blob
     IMAGE2ADDRESS: 0x10180000
     IMAGE2FILE: \Software\tfm_sig1.bin ; TF-M regression test binary blob
 
@@ -427,11 +427,11 @@
 
 - Linux::
 
-    srec_cat bl2/ext/mcuboot/mcuboot.bin -Binary -offset 0xA000000 tfm_sign_0.bin -Binary -offset 0xA020000 tfm_sign_1.bin -Binary -offset 0xA0E0000 -o tfm.hex -Intel
+    srec_cat bl2/ext/mcuboot/mcuboot.bin -Binary -offset 0xA000000 tfm_sign.bin -Binary -offset 0xA020000 tfm_sign_1.bin -Binary -offset 0xA0E0000 -o tfm.hex -Intel
 
 - Windows::
 
-    srec_cat.exe bl2\ext\mcuboot\mcuboot.bin -Binary -offset 0xA000000 tfm_sign_0.bin -Binary -offset 0xA020000 tfm_sign_1.bin -Binary -offset 0xA0E0000 -o tfm.hex -Intel
+    srec_cat.exe bl2\ext\mcuboot\mcuboot.bin -Binary -offset 0xA000000 tfm_sign.bin -Binary -offset 0xA020000 tfm_sign_1.bin -Binary -offset 0xA0E0000 -o tfm.hex -Intel
 
 The following message will be shown in case of successful firmware upgrade,
 notice that image with higher version number (``version=1.2.3.5``) is executed:
diff --git a/secure_fw/CMakeLists.txt b/secure_fw/CMakeLists.txt
index 73dcc29..6b33ff5 100644
--- a/secure_fw/CMakeLists.txt
+++ b/secure_fw/CMakeLists.txt
@@ -327,8 +327,7 @@
 if (LINK_TO_BOTH_MEMORY_REGION)
 	#Link to primary memory region
 	set_up_secure_fw_build(S_TARGET      ${PROJECT_NAME}
-						   VENEER_NAME   s_veneers
-						   POSTFIX       "_0")
+						   VENEER_NAME   s_veneers)
 
 	#Link to secondary memory region(add extra linker flag)
 	set_up_secure_fw_build(S_TARGET      ${PROJECT_NAME}
@@ -346,10 +345,6 @@
 	embedded_project_end(${PROJECT_NAME})
 endif()
 
-if (TARGET ${PROJECT_NAME}_0)
-	embedded_project_end(${PROJECT_NAME}_0)
-endif()
-
 if (TARGET ${PROJECT_NAME}_1)
 	embedded_project_end(${PROJECT_NAME}_1)
 endif()