Example: Use the correct log API of example partition
The secure partition should use the log APIs defined in tfm_sp_log.h,
rather than 'LOG_MSG'.
Signed-off-by: Shawn Shan <Shawn.Shan@arm.com>
Change-Id: If610566a9b5c1f15ad437ae4a78001d814175711
diff --git a/example_partition/CMakeLists.txt b/example_partition/CMakeLists.txt
index 5fd777a..80e35b6 100644
--- a/example_partition/CMakeLists.txt
+++ b/example_partition/CMakeLists.txt
@@ -33,6 +33,7 @@
tfm_secure_api
psa_interface
platform_s
+ tfm_sprt
)
############################ Secure API ########################################
diff --git a/example_partition/tfm_example_partition.c b/example_partition/tfm_example_partition.c
index ffaea85..4c1f00d 100644
--- a/example_partition/tfm_example_partition.c
+++ b/example_partition/tfm_example_partition.c
@@ -9,9 +9,9 @@
#include "psa/service.h"
#include "psa_manifest/tfm_example_partition.h"
-#include "log/tfm_log.h"
#include "tfm/tfm_spm_services.h"
#include "tfm_plat_test.h"
+#include "tfm_sp_log.h"
/**
* \brief An example service implementation that prints out an argument from the
@@ -46,13 +46,13 @@
/* Print arg from client */
psa_read(msg.handle, 0, &arg, sizeof(arg));
- LOG_MSG("[Example partition] Service called! arg=%p\r\n", arg);
+ LOG_INFFMT("[Example partition] Service called! arg=%p\r\n", arg);
/* Start timer. The interrupt triggered when it expires will be handled
* by tfm_example_timer_handler().
*/
tfm_plat_test_secure_timer_start();
- LOG_MSG("[Example partition] Timer started...\r\n");
+ LOG_INFFMT("[Example partition] Timer started...\r\n");
status = PSA_SUCCESS;
break;