Build: Add macro for enabling code coverage flag

Add TFM_CODE_COVERAGE for GNU compiler to output more symbol info
by the parameter "-g".

The code coverage will be disabled by default.
Define TFM_CODE_COVERAGE=True to enable the code coverage flag when
build.

This is a preparation for code coverage analysis after the binary run.
And the code coverage report will rely on the symbol info for
calculating.

Change-Id: I4d5c8ebd7fd0777c49ab06cbdf1b9e2e2efb3d1e
Signed-off-by: Karl Zhang <karl.zhang@arm.com>
diff --git a/toolchain_GNUARM.cmake b/toolchain_GNUARM.cmake
index 716a2cc..92acbf9 100644
--- a/toolchain_GNUARM.cmake
+++ b/toolchain_GNUARM.cmake
@@ -43,6 +43,7 @@
         -mthumb
         -nostdlib
         -std=c99
+        $<$<BOOL:${TFM_CODE_COVERAGE}>:-g>
         $<$<NOT:$<BOOL:${TFM_SYSTEM_FP}>>:-msoft-float>
     )
 endmacro()