MLECO-3296 Override the AXI Burst Length for Ethos-U65

Signed-off-by: Eanna O Cathain <eanna.ocathain@arm.com>
Change-Id: Ia0d349ea0014ee10f275731f3c1de4f9287839e1
diff --git a/source/hal/source/components/npu/CMakeLists.txt b/source/hal/source/components/npu/CMakeLists.txt
index 299fe45..31f50ae 100644
--- a/source/hal/source/components/npu/CMakeLists.txt
+++ b/source/hal/source/components/npu/CMakeLists.txt
@@ -125,6 +125,18 @@
     target_compile_definitions(ethosu_core_driver PRIVATE
         NPU_REGIONCFG_1=0)   # AXI0=M0 for U55/U65
 endif()
+
+# Ethos-U55 supports a maximum burst length of 64 bytes while Ethos-U65 supports up to 128 bytes.
+# Although, this is system implementation dependent the platforms we build for should support the
+# maximum burst length for both NPU configurations.
+if (ETHOS_U_NPU_ID STREQUAL U65)
+    target_compile_definitions(ethosu_core_driver PRIVATE
+            AXI_LIMIT0_MAX_BEATS_BYTES=1
+            AXI_LIMIT1_MAX_BEATS_BYTES=1
+            AXI_LIMIT2_MAX_BEATS_BYTES=1
+            AXI_LIMIT3_MAX_BEATS_BYTES=1) # 0 = 64 byte burst & 1 = 128 byte burst
+endif()
+
 # Create static library
 add_library(${ETHOS_U_NPU_COMPONENT} STATIC)