MLECO-1860: Support for Arm GNU Embedded Toolchain

This patch enables compilation of ML use cases bare-metal applications
using Arm GNU Embedded Toolchain. The GNU toolchain can be used instead
of the Arm Compiler that was already supported.

The GNU toolchain is also set as the default toolchain when building
applications for the MPS3 target.

Note: The version of GNU toolchain must be 10.2.1 or higher.

Change-Id: I5fff242f0f52d2db6c75d292f9fa990df1aec978
Signed-off-by: Kshitij Sisodia <kshitij.sisodia@arm.com>
diff --git a/source/application/main/Classifier.cc b/source/application/main/Classifier.cc
index 9a47f3d..c5519fb 100644
--- a/source/application/main/Classifier.cc
+++ b/source/application/main/Classifier.cc
@@ -23,6 +23,7 @@
 #include <string>
 #include <set>
 #include <cstdint>
+#include <inttypes.h>
 
 namespace arm {
 namespace app {
@@ -125,7 +126,7 @@
 
         /* Sanity checks. */
         if (totalOutputSize < topNCount) {
-            printf_err("Output vector is smaller than %u\n", topNCount);
+            printf_err("Output vector is smaller than %" PRIu32 "\n", topNCount);
             return false;
         } else if (totalOutputSize != labels.size()) {
             printf_err("Output size doesn't match the labels' size\n");
diff --git a/source/application/main/Mfcc.cc b/source/application/main/Mfcc.cc
index 9ddcb5d..c8ad138 100644
--- a/source/application/main/Mfcc.cc
+++ b/source/application/main/Mfcc.cc
@@ -19,6 +19,7 @@
 #include "PlatformMath.hpp"
 
 #include <cfloat>
+#include <inttypes.h>
 
 namespace arm {
 namespace app {
@@ -49,16 +50,16 @@
         char strC[1024];
         snprintf(strC, sizeof(strC) - 1, "\n   \
             \n\t Sampling frequency:         %f\
-            \n\t Number of filter banks:     %u\
+            \n\t Number of filter banks:     %" PRIu32 "\
             \n\t Mel frequency limit (low):  %f\
             \n\t Mel frequency limit (high): %f\
-            \n\t Number of MFCC features:    %u\
-            \n\t Frame length:               %u\
-            \n\t Padded frame length:        %u\
+            \n\t Number of MFCC features:    %" PRIu32 "\
+            \n\t Frame length:               %" PRIu32 "\
+            \n\t Padded frame length:        %" PRIu32 "\
             \n\t Using HTK for Mel scale:    %s\n",
-                this->m_samplingFreq, this->m_numFbankBins, this->m_melLoFreq,
-                this->m_melHiFreq, this->m_numMfccFeatures, this->m_frameLen,
-                this->m_frameLenPadded, this->m_useHtkMethod ? "yes" : "no");
+            this->m_samplingFreq, this->m_numFbankBins, this->m_melLoFreq,
+            this->m_melHiFreq, this->m_numMfccFeatures, this->m_frameLen,
+            this->m_frameLenPadded, this->m_useHtkMethod ? "yes" : "no");
         return std::string{strC};
     }
 
diff --git a/source/application/main/Profiler.cc b/source/application/main/Profiler.cc
index 10a828a..5924414 100644
--- a/source/application/main/Profiler.cc
+++ b/source/application/main/Profiler.cc
@@ -208,7 +208,7 @@
     }
 
     void printStatisticsHeader(uint32_t samplesNum) {
-        info("Number of samples: %i\n", samplesNum);
+        info("Number of samples: %" PRIu32 "\n", samplesNum);
         info("%s\n", "Total / Avg./ Min / Max");
     }
 
@@ -224,7 +224,8 @@
 
             for (Statistics &stat: result.data) {
                 if (printFullStat) {
-                    info("%s %s: %llu / %.0f / %llu / %llu \n", stat.name.c_str(), stat.unit.c_str(),
+                    info("%s %s: %" PRIu64 "/ %.0f / %" PRIu64 " / %" PRIu64 " \n",
+                         stat.name.c_str(), stat.unit.c_str(),
                          stat.total, stat.avrg, stat.min, stat.max);
                 } else {
                     info("%s %s: %.0f\n", stat.name.c_str(), stat.unit.c_str(), stat.avrg);
diff --git a/source/application/main/UseCaseCommonUtils.cc b/source/application/main/UseCaseCommonUtils.cc
index 3acf53f..b3653d9 100644
--- a/source/application/main/UseCaseCommonUtils.cc
+++ b/source/application/main/UseCaseCommonUtils.cc
@@ -18,6 +18,8 @@
 
 #include "InputFiles.hpp"
 
+#include <inttypes.h>
+
 namespace arm {
 namespace app {
 
@@ -103,7 +105,7 @@
                                                  currentFilename.size(),
                                                  dataPsnTxtStartX, yVal, 0);
 
-            info("\t%u => %s\n", i, currentFilename.c_str());
+            info("\t%" PRIu32 " => %s\n", i, currentFilename.c_str());
         }
 #endif /* NUMBER_OF_FILES > 0 */