MLECO-1933, MLECO-1914, MLECO-1885: Update to 21.05-rc2 components

Core driver and sofware dependencies updated to latest release
candidate revisions. Note: TensorFlow Lite Micro has not been
updated.

Also, gcc warnings for simple_platform target and ad use case have
been fixed.

Change-Id: I455b421f34375a719a941e6e220fe292a57613f5
diff --git a/source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/include/stubs_fvp.h b/source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/include/stubs_simple_platform.h
similarity index 95%
rename from source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/include/stubs_fvp.h
rename to source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/include/stubs_simple_platform.h
index aec0be1..9977cd2 100644
--- a/source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/include/stubs_fvp.h
+++ b/source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/include/stubs_simple_platform.h
@@ -14,15 +14,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#ifndef BSP_PACK_FASTMODEL_H
-#define BSP_PACK_FASTMODEL_H
+#ifndef STUBS_SIMPLE_PLATFORM_H
+#define STUBS_SIMPLE_PLATFORM_H
 
 #include "cmsis.h"                  /* device specific header file    */
 #include "peripheral_memmap.h"      /* peripheral memory map definitions */
 
 /****************************************************************************/
 /*              Definitions and stub functions for modules currently        */
-/*              unavailable on the model                                    */
+/*              unavailable on this target platform                         */
 /****************************************************************************/
 #define GLCD_WIDTH      320
 #define GLCD_HEIGHT     240
@@ -113,4 +113,4 @@
             unsigned int w, unsigned int h,
             unsigned short color);
 
-#endif /* BSP_PACK_FASTMODEL_H */
+#endif /* STUBS_SIMPLE_PLATFORM_H */
diff --git a/source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/include/timer_fvp.h b/source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/include/timer_simple_platform.h
similarity index 76%
rename from source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/include/timer_fvp.h
rename to source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/include/timer_simple_platform.h
index c07a4eb..320a57a 100644
--- a/source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/include/timer_fvp.h
+++ b/source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/include/timer_simple_platform.h
@@ -14,15 +14,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#ifndef TIMER_FVP_H
-#define TIMER_FVP_H
+#ifndef TIMER_SIMPLE_PLATFORM_H
+#define TIMER_SIMPLE_PLATFORM_H
 
-#include "stubs_fvp.h"
+#include "stubs_simple_platform.h"
 
-/* Container for timestamp for fastmodel. */
-typedef struct _fvp_time_counter {
+/* Container for timestamp for simple platform. */
+typedef struct _generic_time_counter {
     uint64_t    counter_systick;
-} fvp_time_counter;
+} generic_time_counter;
 
 /**
  * @brief   Resets the counters.
@@ -33,13 +33,13 @@
  * @brief   Gets the current counter values.
  * @returns counter struct.
  **/
-fvp_time_counter get_time_counter(void);
+generic_time_counter get_time_counter(void);
 
 /**
  * @brief   Gets the cycle counts elapsed between start and end.
  * @return  difference in counter values as 32 bit unsigned integer.
  */
-uint64_t get_cycle_count_diff(fvp_time_counter *start, fvp_time_counter *end);
+uint64_t get_cycle_count_diff(generic_time_counter *start, generic_time_counter *end);
 
 /**
  * @brief   Enables or triggers cycle counting mechanism, if required
@@ -52,4 +52,4 @@
  */
 void stop_cycle_counter(void);
 
-#endif /* TIMER_FVP_H */
+#endif /* TIMER_SIMPLE_PLATFORM_H */
diff --git a/source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/stubs_fvp.c b/source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/stubs_simple_platform.c
similarity index 86%
rename from source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/stubs_fvp.c
rename to source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/stubs_simple_platform.c
index e5b2969..df11adb 100644
--- a/source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/stubs_fvp.c
+++ b/source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/stubs_simple_platform.c
@@ -14,10 +14,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include "stubs_fvp.h"
+#include "stubs_simple_platform.h"
 
 #include "bsp_core_log.h"
 
+#include <inttypes.h>
+
 uint32_t GetCoreClock(void)
 {
     return 1;
@@ -46,9 +48,10 @@
     UNUSED(height);
     UNUSED(channels);
     UNUSED(downsample_factor);
-    debug("image display: (x, y, w, h) = (%u, %u, %u, %u)\n",
+    debug("image display: (x, y, w, h) = "
+        "(%" PRIu32 ", %" PRIu32 ", %" PRIu32 ", %" PRIu32 ")\n",
         pos_x, pos_y, width, height);
-    debug("image display: channels = %u, downsample factor = %u\n",
+    debug("image display: channels = %" PRIu32 ", downsample factor = %" PRIu32 "\n",
         channels, downsample_factor);
 }
 
@@ -100,12 +103,12 @@
 {
     UNUSED(num);
     UNUSED(port);
-    debug("LED %u ON\n", num);
+    debug("LED %" PRIu32 " ON\n", num);
 }
 
 void LED_Off(uint32_t num, uint32_t port)
 {
     UNUSED(num);
     UNUSED(port);
-    debug("LED %u OFF\n", num);
+    debug("LED %" PRIu32 " OFF\n", num);
 }
diff --git a/source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/timer_fvp.c b/source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/timer_simple_platform.c
similarity index 80%
rename from source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/timer_fvp.c
rename to source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/timer_simple_platform.c
index b7a7232..6914209 100644
--- a/source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/timer_fvp.c
+++ b/source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/timer_simple_platform.c
@@ -14,17 +14,19 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include "timer_fvp.h"
+#include "timer_simple_platform.h"
 
 #include "irqs.h"
 #include "bsp_core_log.h"
 
-fvp_time_counter get_time_counter(void)
+#include <inttypes.h>
+
+generic_time_counter get_time_counter(void)
 {
-    fvp_time_counter t = {
+    generic_time_counter t = {
         .counter_systick = Get_SysTick_Cycle_Count()
     };
-    debug("counter_systick: %llu\n", t.counter_systick);
+    debug("counter_systick: %" PRIu64 "\n", t.counter_systick);
     return t;
 }
 
@@ -36,8 +38,8 @@
     debug("system tick config ready\n");
 }
 
-uint64_t get_cycle_count_diff(fvp_time_counter *start,
-                              fvp_time_counter *end)
+uint64_t get_cycle_count_diff(generic_time_counter *start,
+                              generic_time_counter *end)
 {
     if (start->counter_systick > end->counter_systick) {
         warn("start > end; counter might have overflown\n");
diff --git a/source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/uart_pl011.c b/source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/uart_pl011.c
index 5c1ee06..b2dee14 100644
--- a/source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/uart_pl011.c
+++ b/source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/uart_pl011.c
@@ -199,11 +199,12 @@
             case 0:
                 *lp = 0;                       /* ESC - stop editing line.       */
                 return false;
-            case CR:                           /* CR - done, stop editing line.  */
-                *lp = c;
-                lp++;                          /* increment line pointer.        */
-                cnt++;                         /* and count.                     */
+            case CR:                            /* CR - done, stop editing line.  */
+                UartPutc (*lp = c);             /* Echo and store character.      */
+                lp++;                           /* Increment line pointer         */
+                cnt++;                          /* and count.                     */
                 c = LF;
+                break;
             default:
                 UartPutc (*lp = c);            /* echo and store character.      */
                 fflush (stdout);
diff --git a/source/application/hal/platforms/bare-metal/bsp/include/bsp.h b/source/application/hal/platforms/bare-metal/bsp/include/bsp.h
index fbe1ff6..20052ef 100644
--- a/source/application/hal/platforms/bare-metal/bsp/include/bsp.h
+++ b/source/application/hal/platforms/bare-metal/bsp/include/bsp.h
@@ -30,8 +30,8 @@
 
 #else /* MPS3_PLATFORM */
 
-#include "stubs_fvp.h"      /* Stubs for FVP. */
-#include "timer_fvp.h"      /* Timer API for FVP. */
+#include "stubs_simple_platform.h"      /* Stubs for simple_platform. */
+#include "timer_simple_platform.h"      /* Timer API for simple_platform. */
 
 #endif /* MPS3_PLATFORM */
 
diff --git a/source/application/hal/platforms/bare-metal/timer/baremetal_timer.c b/source/application/hal/platforms/bare-metal/timer/baremetal_timer.c
index cd17a60..00028bd 100644
--- a/source/application/hal/platforms/bare-metal/timer/baremetal_timer.c
+++ b/source/application/hal/platforms/bare-metal/timer/baremetal_timer.c
@@ -260,7 +260,7 @@
         printf_err("EthosU PMU axi0 read counter overflow.\n");
         return 0;
     }
-    return (uint64_t)(end->npu_axi0_read_ccnt - st->npu_axi0_read_ccnt);
+    return (uint64_t)(end->npu_axi0_read_beats - st->npu_axi0_read_beats);
 }
 
 static uint64_t bm_get_npu_axi0_write_cycle_diff(time_counter *st, time_counter *end)
@@ -269,7 +269,7 @@
         printf_err("EthosU PMU axi0 write counter overflow.\n");
         return 0;
     }
-    return (uint64_t)(end->npu_axi0_write_ccnt - st->npu_axi0_write_ccnt);
+    return (uint64_t)(end->npu_axi0_write_beats - st->npu_axi0_write_beats);
 }
 
 static uint64_t bm_get_npu_axi1_read_cycle_diff(time_counter *st, time_counter *end)
@@ -278,7 +278,7 @@
         printf_err("EthosU PMU axi1 read counter overflow.\n");
         return 0;
     }
-    return (uint64_t)(end->npu_axi1_read_ccnt - st->npu_axi1_read_ccnt);
+    return (uint64_t)(end->npu_axi1_read_beats - st->npu_axi1_read_beats);
 }
 
 #endif /* defined (ARM_NPU) */
@@ -300,9 +300,9 @@
 #if defined (ARM_NPU)
             .npu_total_ccnt = ETHOSU_PMU_Get_CCNTR(),
             .npu_idle_ccnt = ETHOSU_PMU_Get_EVCNTR(0),
-            .npu_axi0_read_ccnt = ETHOSU_PMU_Get_EVCNTR(1),
-            .npu_axi0_write_ccnt = ETHOSU_PMU_Get_EVCNTR(2),
-            .npu_axi1_read_ccnt = ETHOSU_PMU_Get_EVCNTR(3)
+            .npu_axi0_read_beats = ETHOSU_PMU_Get_EVCNTR(1),
+            .npu_axi0_write_beats = ETHOSU_PMU_Get_EVCNTR(2),
+            .npu_axi1_read_beats = ETHOSU_PMU_Get_EVCNTR(3)
 #endif /* defined (ARM_NPU) */
 
     };
@@ -310,14 +310,14 @@
 #if defined (ARM_NPU)
     debug("NPU total cc: %" PRIu64
         "; NPU idle cc: %" PRIu32
-        "; NPU axi0 read cc: %" PRIu32
-        "; NPU axi0 write cc: %" PRIu32
-        "; NPU axi1 read cc: %" PRIu32 "\n",
+        "; NPU axi0 read beats: %" PRIu32
+        "; NPU axi0 write beats: %" PRIu32
+        "; NPU axi1 read beats: %" PRIu32 "\n",
         t.npu_total_ccnt,
         t.npu_idle_ccnt,
-        t.npu_axi0_read_ccnt,
-        t.npu_axi0_write_ccnt,
-        t.npu_axi1_read_ccnt);
+        t.npu_axi0_read_beats,
+        t.npu_axi0_write_beats,
+        t.npu_axi1_read_beats);
 #endif /* defined (ARM_NPU) */
 
     return t;
diff --git a/source/application/hal/platforms/bare-metal/timer/include/baremetal_timer.h b/source/application/hal/platforms/bare-metal/timer/include/baremetal_timer.h
index 3020dac..0d23a05 100644
--- a/source/application/hal/platforms/bare-metal/timer/include/baremetal_timer.h
+++ b/source/application/hal/platforms/bare-metal/timer/include/baremetal_timer.h
@@ -22,10 +22,10 @@
 
 #if defined (MPS3_PLATFORM)
     #include "timer_mps3.h"
-    typedef mps3_time_counter   base_time_counter;
+    typedef mps3_time_counter       base_time_counter;
 #else /* defined (MPS3_PLATFORM) */
-    #include "timer_fvp.h"
-    typedef fvp_time_counter    base_time_counter;
+    #include "timer_simple_platform.h"
+    typedef generic_time_counter    base_time_counter;
 #endif  /* defined (MPS3_PLATFORM) */
 
 typedef struct bm_time_counter {
@@ -34,9 +34,9 @@
 #if defined (ARM_NPU)
     uint64_t                npu_total_ccnt;
     uint32_t                npu_idle_ccnt;
-    uint32_t                npu_axi0_read_ccnt;
-    uint32_t                npu_axi0_write_ccnt;
-    uint32_t                npu_axi1_read_ccnt;
+    uint32_t                npu_axi0_read_beats;
+    uint32_t                npu_axi0_write_beats;
+    uint32_t                npu_axi1_read_beats;
 #endif /* ARM_NPU */
 
 } time_counter;
diff --git a/source/application/hal/platforms/bare-metal/utils/system_init.c b/source/application/hal/platforms/bare-metal/utils/system_init.c
index f95f214..376f08b 100644
--- a/source/application/hal/platforms/bare-metal/utils/system_init.c
+++ b/source/application/hal/platforms/bare-metal/utils/system_init.c
@@ -96,7 +96,7 @@
     }
 #else /* MPS3_PLATFORM */
 
-    info("ARM model environment ready..\n");
+    info("%s: complete\n", __FUNCTION__);
     return 0;
 #endif /* MPS3_PLATFORM */