diff --git a/apps/microtvm/cmsisnn/Makefile b/apps/microtvm/cmsisnn/Makefile index 2fc4d4fa06c9..00c4893317e1 100644 --- a/apps/microtvm/cmsisnn/Makefile +++ b/apps/microtvm/cmsisnn/Makefile @@ -35,15 +35,14 @@ PKG_CFLAGS = ${PKG_COMPILE_OPTS} \ -I${STANDALONE_CRT_PATH}/include \ -I${STANDALONE_CRT_PATH}/src/runtime/crt/include \ -I${PWD}/include \ - -I${CORSTONE_300_PATH} \ + -I${ETHOSU_PLATFORM_PATH}/drivers/uart/include \ -I${CMSIS_PATH}/Device/ARM/${ARM_CPU}/Include/ \ -I${CMSIS_PATH}/CMSIS/Core/Include \ -I${CMSIS_PATH}/CMSIS-NN/Include \ -I${CMSIS_PATH}/CMSIS/DSP/Include \ -I$(abspath $(BUILD_DIR))/codegen/host/include -CMSIS_NN_CMAKE_FLAGS = -DCMAKE_TOOLCHAIN_FILE=$(abspath $(BUILD_DIR))/../arm-none-eabi-gcc.cmake \ - -DTARGET_CPU=cortex-m55 \ - -DBUILD_CMSIS_NN_FUNCTIONS=YES +CMAKE_FLAGS = -DCMAKE_TOOLCHAIN_FILE=$(abspath $(BUILD_DIR))/../arm-none-eabi-gcc.cmake \ + -DTARGET_CPU=cortex-m55 PKG_LDFLAGS = -lm -specs=nosys.specs -static -T corstone300.ld $(ifeq VERBOSE,1) @@ -57,7 +56,7 @@ CODEGEN_SRCS = $(wildcard $(abspath $(BUILD_DIR))/codegen/host/src/*.c) CODEGEN_OBJS = $(subst .c,.o,$(CODEGEN_SRCS)) CMSIS_STARTUP_SRCS = $(wildcard ${CMSIS_PATH}/Device/ARM/${ARM_CPU}/Source/*.c) CMSIS_NN_SRCS = $(shell find ${CMSIS_PATH}/CMSIS-NN/Source/*/*.c) -UART_SRCS = $(wildcard ${CORSTONE_300_PATH}/*.c) +CORSTONE_300_SRCS = $(wildcard ${CORSTONE_300_PATH}/*.c) demo: $(BUILD_DIR)/demo @@ -89,9 +88,15 @@ ${BUILD_DIR}/libcmsis_nn.a: $(CMSIS_NN_SRCS) $(QUIET)$(AR) -cr $(abspath $(BUILD_DIR)/libcmsis_nn.a) $(abspath $(BUILD_DIR))/libcmsis_nn/*.o $(QUIET)$(RANLIB) $(abspath $(BUILD_DIR)/libcmsis_nn.a) +# Build UART driver +${BUILD_DIR}/ethosu_core_platform/libethosu_uart_cmsdk_apb.a: + $(QUIET)mkdir -p $(@D) + $(QUIET)cd ${ETHOSU_PLATFORM_PATH}/drivers/uart && $(CMAKE) -B $(abspath $(BUILD_DIR)/ethosu_core_platform) $(CMAKE_FLAGS) + $(QUIET)cd $(abspath $(BUILD_DIR)/ethosu_core_platform) && $(MAKE) + # Build demo application -$(BUILD_DIR)/demo: $(DEMO_MAIN) $(UART_SRCS) $(BUILD_DIR)/stack_allocator.o $(BUILD_DIR)/crt_backend_api.o \ - ${BUILD_DIR}/libcodegen.a ${BUILD_DIR}/libcmsis_startup.a ${BUILD_DIR}/libcmsis_nn.a +$(BUILD_DIR)/demo: $(DEMO_MAIN) $(CORSTONE_300_SRCS) $(BUILD_DIR)/stack_allocator.o $(BUILD_DIR)/crt_backend_api.o \ + ${BUILD_DIR}/libcodegen.a ${BUILD_DIR}/libcmsis_startup.a ${BUILD_DIR}/libcmsis_nn.a ${BUILD_DIR}/ethosu_core_platform/libethosu_uart_cmsdk_apb.a $(QUIET)mkdir -p $(@D) $(QUIET)$(CC) $(PKG_CFLAGS) $(FREERTOS_FLAGS) -o $@ -Wl,--whole-archive $^ -Wl,--no-whole-archive $(PKG_LDFLAGS) diff --git a/apps/microtvm/cmsisnn/src/demo_bare_metal.c b/apps/microtvm/cmsisnn/src/demo_bare_metal.c index f17fe859f219..80b298d8b2d8 100644 --- a/apps/microtvm/cmsisnn/src/demo_bare_metal.c +++ b/apps/microtvm/cmsisnn/src/demo_bare_metal.c @@ -21,14 +21,14 @@ #include #include -#include "uart.h" +#include "uart_stdout.h" // Header files generated by convert_image.py #include "inputs.h" #include "outputs.h" int main(int argc, char** argv) { - uart_init(); + UartStdOutInit(); printf("Starting Demo\n"); printf("Running detection inference\n"); diff --git a/apps/microtvm/ethosu/Makefile b/apps/microtvm/ethosu/Makefile index 630a2082473d..5a20efc5db26 100644 --- a/apps/microtvm/ethosu/Makefile +++ b/apps/microtvm/ethosu/Makefile @@ -36,20 +36,18 @@ PKG_CFLAGS = ${PKG_COMPILE_OPTS} \ -I${STANDALONE_CRT_PATH}/include \ -I${STANDALONE_CRT_PATH}/src/runtime/crt/include \ -I${PWD}/include \ - -I${CORSTONE_300_PATH} \ - -I${ETHOSU_PATH}/core_driver/include \ + -I${ETHOSU_DRIVER_PATH}/include \ + -I${ETHOSU_PLATFORM_PATH}/drivers/uart/include \ -I${CMSIS_PATH}/Device/ARM/${ARM_CPU}/Include/ \ -I${CMSIS_PATH}/CMSIS/Core/Include \ -I${CMSIS_PATH}/CMSIS-NN/Include \ -I${CMSIS_PATH}/CMSIS/DSP/Include \ -I$(abspath $(BUILD_DIR))/codegen/host/include \ -DETHOSU_TEST_RUNNER_TOL=${ETHOSU_TEST_RUNNER_TOL} -DRIVER_CMAKE_FLAGS = -DCMAKE_TOOLCHAIN_FILE=$(abspath $(BUILD_DIR))/../arm-none-eabi-gcc.cmake \ - -DETHOSU_LOG_SEVERITY=debug \ - -DCMAKE_SYSTEM_PROCESSOR=cortex-m55 -CMSIS_NN_CMAKE_FLAGS = -DCMAKE_TOOLCHAIN_FILE=$(abspath $(BUILD_DIR))/../arm-none-eabi-gcc.cmake \ - -DTARGET_CPU=cortex-m55 \ - -DBUILD_CMSIS_NN_FUNCTIONS=YES +CMAKE_FLAGS = -DCMAKE_TOOLCHAIN_FILE=$(abspath $(BUILD_DIR))/../arm-none-eabi-gcc.cmake \ + -DTARGET_CPU=cortex-m55 +DRIVER_CMAKE_FLAGS = $(CMAKE_FLAGS) \ + -DETHOSU_LOG_SEVERITY=debug PKG_LDFLAGS = -lm -specs=nosys.specs -static -T corstone300.ld $(ifeq VERBOSE,1) @@ -79,7 +77,7 @@ CODEGEN_SRCS = $(wildcard $(abspath $(BUILD_DIR))/codegen/host/src/*.c) CODEGEN_OBJS = $(subst .c,.o,$(CODEGEN_SRCS)) CMSIS_STARTUP_SRCS = $(wildcard ${CMSIS_PATH}/Device/ARM/${ARM_CPU}/Source/*.c) CMSIS_NN_SOFTMAX_SRCS = $(shell find ${CMSIS_PATH}/CMSIS-NN/Source/SoftmaxFunctions/*.c) -UART_SRCS = $(wildcard ${CORSTONE_300_PATH}/*.c) +CORSTONE_300_SRCS = $(wildcard ${CORSTONE_300_PATH}/*.c) demo: $(BUILD_DIR)/demo @@ -117,7 +115,13 @@ ${BUILD_DIR}/libcmsis_nn_softmax.a: $(CMSIS_NN_SOFTMAX_SRCS) $(QUIET)$(AR) -cr $(abspath $(BUILD_DIR)/libcmsis_nn_softmax.a) $(abspath $(BUILD_DIR))/libcmsis_nn/*.o $(QUIET)$(RANLIB) $(abspath $(BUILD_DIR)/libcmsis_nn_softmax.a) -$(BUILD_DIR)/demo: $(DEMO_MAIN) src/tvm_ethosu_runtime.c $(FREERTOS_SOURCES) $(UART_SRCS) $(BUILD_DIR)/stack_allocator.o $(BUILD_DIR)/crt_backend_api.o ${BUILD_DIR}/libcodegen.a ${BUILD_DIR}/libcmsis_startup.a ${BUILD_DIR}/ethosu_core_driver/libethosu_core_driver.a ${BUILD_DIR}/libcmsis_nn_softmax.a +# Build UART driver +${BUILD_DIR}/ethosu_core_platform/libethosu_uart_cmsdk_apb.a: + $(QUIET)mkdir -p $(@D) + $(QUIET)cd ${ETHOSU_PLATFORM_PATH}/drivers/uart && $(CMAKE) -B $(abspath $(BUILD_DIR)/ethosu_core_platform) $(CMAKE_FLAGS) + $(QUIET)cd $(abspath $(BUILD_DIR)/ethosu_core_platform) && $(MAKE) + +$(BUILD_DIR)/demo: $(DEMO_MAIN) src/tvm_ethosu_runtime.c $(FREERTOS_SOURCES) $(CORSTONE_300_SRCS) $(BUILD_DIR)/stack_allocator.o $(BUILD_DIR)/crt_backend_api.o ${BUILD_DIR}/libcodegen.a ${BUILD_DIR}/libcmsis_startup.a ${BUILD_DIR}/ethosu_core_driver/libethosu_core_driver.a ${BUILD_DIR}/libcmsis_nn_softmax.a ${BUILD_DIR}/ethosu_core_platform/libethosu_uart_cmsdk_apb.a $(QUIET)mkdir -p $(@D) $(QUIET)$(CC) $(PKG_CFLAGS) $(FREERTOS_FLAGS) -o $@ $^ $(PKG_LDFLAGS) diff --git a/apps/microtvm/ethosu/src/demo_bare_metal.c b/apps/microtvm/ethosu/src/demo_bare_metal.c index febc2121299f..1bef90cfb301 100644 --- a/apps/microtvm/ethosu/src/demo_bare_metal.c +++ b/apps/microtvm/ethosu/src/demo_bare_metal.c @@ -21,7 +21,7 @@ #include #include "ethosu_mod.h" -#include "uart.h" +#include "uart_stdout.h" // Header files generated by convert_image.py and convert_labels.py #include "inputs.h" @@ -31,7 +31,7 @@ int abs(int v) { return v * ((v > 0) - (v < 0)); } int main(int argc, char** argv) { - uart_init(); + UartStdOutInit(); printf("Starting Demo\n"); EthosuInit(); diff --git a/apps/microtvm/ethosu/src/demo_freertos.c b/apps/microtvm/ethosu/src/demo_freertos.c index 4fa363a50e4d..e59d7aeaccf5 100644 --- a/apps/microtvm/ethosu/src/demo_freertos.c +++ b/apps/microtvm/ethosu/src/demo_freertos.c @@ -24,7 +24,7 @@ #include #include "ethosu_mod.h" -#include "uart.h" +#include "uart_stdout.h" // Header files generated by convert_image.py and convert_labels.py #include "inputs.h" @@ -46,7 +46,7 @@ static QueueHandle_t xQueue = NULL; int main(void) { // Platform UART - uart_init(); + UartStdOutInit(); // NPU EthosuInit(); diff --git a/ci/jenkins/docker-images.ini b/ci/jenkins/docker-images.ini index d1e34487bd61..53ad2092ea4f 100644 --- a/ci/jenkins/docker-images.ini +++ b/ci/jenkins/docker-images.ini @@ -18,7 +18,7 @@ # This data file is read during when Jenkins runs job to determine docker images. [jenkins] ci_arm: tlcpack/ci-arm:20221013-060115-61c9742ea -ci_cortexm: tlcpack/ci-cortexm:20230111-165944-a9c6f137d +ci_cortexm: tlcpack/ci-cortexm:20230116-133924-dad13d1c1 ci_cpu: tlcpack/ci-cpu:20230110-070003-d00168ffb ci_gpu: tlcpack/ci-gpu:20221128-070141-ae4fd7df7 ci_hexagon: tlcpack/ci-hexagon:20221013-060115-61c9742ea diff --git a/docker/install/ubuntu_install_ethosu_driver_stack.sh b/docker/install/ubuntu_install_ethosu_driver_stack.sh index 8bc6b733edc8..6f4598258eee 100755 --- a/docker/install/ubuntu_install_ethosu_driver_stack.sh +++ b/docker/install/ubuntu_install_ethosu_driver_stack.sh @@ -23,7 +23,7 @@ set -o pipefail fvp_dir="/opt/arm/FVP_Corstone_SSE-300" cmake_dir="/opt/arm/cmake" ethosu_dir="/opt/arm/ethosu" -ethosu_driver_ver="21.11" +ethosu_driver_ver="22.08" mkdir -p /opt/arm @@ -80,9 +80,13 @@ git clone --branch ${ethosu_driver_ver} "https://review.mlplatform.org/ml/ethos- git clone --branch ${ethosu_driver_ver} "https://review.mlplatform.org/ml/ethos-u/ethos-u-core-platform" core_platform # Build Driver -mkdir ${ethosu_dir}/core_driver/build && cd ${ethosu_dir}/core_driver/build -cmake -DCMAKE_TOOLCHAIN_FILE=${ethosu_dir}/core_platform/cmake/toolchain/arm-none-eabi-gcc.cmake -DETHOSU_LOG_SEVERITY=debug -DTARGET_CPU=cortex-m55 .. -make +NPU_VARIANTS=("u55" "u65") +for i in ${NPU_VARIANTS[*]} +do + mkdir ${ethosu_dir}/core_driver/build_${i} && cd ${ethosu_dir}/core_driver/build_${i} + cmake -DCMAKE_TOOLCHAIN_FILE=${ethosu_dir}/core_platform/cmake/toolchain/arm-none-eabi-gcc.cmake -DETHOSU_LOG_SEVERITY=debug -DTARGET_CPU=cortex-m55 -DETHOSU_TARGET_NPU_CONFIG=ethos-${i}-128 .. + make +done # Build NN Library mkdir ${CMSIS_PATH}/CMSIS-NN/build/ && cd ${CMSIS_PATH}/CMSIS-NN/build/ diff --git a/gallery/how_to/work_with_microtvm/micro_ethosu.py b/gallery/how_to/work_with_microtvm/micro_ethosu.py index f257507bb5a5..74a9d59d77c1 100644 --- a/gallery/how_to/work_with_microtvm/micro_ethosu.py +++ b/gallery/how_to/work_with_microtvm/micro_ethosu.py @@ -380,7 +380,7 @@ # #include # # #include "ethosu_mod.h" -# #include "uart.h" +# #include "uart_stdout.h" # # // Header files generated by convert_image.py and convert_labels.py # #include "inputs.h" @@ -390,7 +390,7 @@ # int abs(int v) { return v * ((v > 0) - (v < 0)); } # # int main(int argc, char** argv) { -# uart_init(); +# UartStdOutInit(); # printf("Starting Demo\n"); # EthosuInit(); # diff --git a/python/tvm/micro/testing/aot_test_utils.py b/python/tvm/micro/testing/aot_test_utils.py index 89c08395deb7..06cd0f1c9ea4 100644 --- a/python/tvm/micro/testing/aot_test_utils.py +++ b/python/tvm/micro/testing/aot_test_utils.py @@ -41,9 +41,9 @@ AOT_CORSTONE300_RUNNER = AOTTestRunner( makefile="corstone300", prologue=""" - uart_init(); + UartStdOutInit(); """, - includes=["uart.h"], + includes=["uart_stdout.h"], pass_config={ "relay.ext.cmsisnn.options": { "mcpu": "cortex-m55", @@ -54,9 +54,9 @@ AOT_USMP_CORSTONE300_RUNNER = AOTTestRunner( makefile="corstone300", prologue=""" - uart_init(); + UartStdOutInit(); """, - includes=["uart.h"], + includes=["uart_stdout.h"], pass_config={ "relay.ext.cmsisnn.options": { "mcpu": "cortex-m55", diff --git a/tests/python/contrib/test_cmsisnn/utils.py b/tests/python/contrib/test_cmsisnn/utils.py index 1ec3e609f1a3..74d9686a784e 100644 --- a/tests/python/contrib/test_cmsisnn/utils.py +++ b/tests/python/contrib/test_cmsisnn/utils.py @@ -274,9 +274,9 @@ def create_test_runner(compiler_cpu="cortex-m55", cpu_flags=""): return AOTTestRunner( makefile="corstone300", prologue=""" - uart_init(); + UartStdOutInit(); """, - includes=["uart.h"], + includes=["uart_stdout.h"], pass_config={ "relay.ext.cmsisnn.options": { "mcpu": compiler_cpu + cpu_flags, diff --git a/tests/python/contrib/test_ethosu/infra.py b/tests/python/contrib/test_ethosu/infra.py index b2bbcd377b84..efab6e6911b9 100644 --- a/tests/python/contrib/test_ethosu/infra.py +++ b/tests/python/contrib/test_ethosu/infra.py @@ -133,7 +133,7 @@ def create_test_runner( ethosu_variant = ethosu_variant.upper() prologue = """ - uart_init(); + UartStdOutInit(); EthosuInit(); struct ethosu_driver* ethos_u = ethosu_reserve_driver(); @@ -158,7 +158,7 @@ def create_test_runner( epilogue=""" ethosu_release_driver(ethos_u); """, - includes=["uart.h", "ethosu_55.h", "ethosu_mod.h", "hard_fault.h"], + includes=["uart_stdout.h", "ethosu_55.h", "ethosu_mod.h", "hard_fault.h"], parameters={ "ETHOSU_TEST_ROOT": test_root, "NPU_MACS": ethosu_macs, diff --git a/tests/python/relay/aot/corstone300.mk b/tests/python/relay/aot/corstone300.mk index 45d93ab493ed..61373ec3efba 100644 --- a/tests/python/relay/aot/corstone300.mk +++ b/tests/python/relay/aot/corstone300.mk @@ -41,7 +41,8 @@ DMLC_CORE=${TVM_ROOT}/3rdparty/dmlc-core ETHOSU_PATH=/opt/arm/ethosu DRIVER_PATH=${ETHOSU_PATH}/core_driver CMSIS_PATH=${ETHOSU_PATH}/cmsis -PLATFORM_PATH=${ETHOSU_PATH}/core_platform/targets/corstone-300 +ETHOSU_PLATFORM_PATH=/opt/arm/ethosu/core_platform +CORSTONE_300_PATH = ${ETHOSU_PLATFORM_PATH}/targets/corstone-300 PKG_COMPILE_OPTS = -g -Wall -O2 -Wno-incompatible-pointer-types -Wno-format -Werror-implicit-function-declaration -mcpu=${MCPU}${MCPU_FLAGS} -mthumb -mfloat-abi=${MFLOAT_ABI} -std=gnu99 CMAKE = /opt/arm/cmake/bin/cmake CC = arm-none-eabi-gcc @@ -53,16 +54,15 @@ PKG_CFLAGS = ${PKG_COMPILE_OPTS} \ -I$(build_dir)/../include \ -I${TVM_ROOT}/src/runtime/contrib/ethosu/bare_metal \ -I$(CODEGEN_ROOT)/host/include \ - -I${PLATFORM_PATH} \ + -I${ETHOSU_PLATFORM_PATH}/drivers/uart/include \ -I${DRIVER_PATH}/include \ -I${CMSIS_PATH}/Device/ARM/${ARM_CPU}/Include/ \ -I${CMSIS_PATH}/CMSIS/Core/Include \ -I${CMSIS_PATH}/CMSIS-NN/Include \ -I${CMSIS_PATH}/CMSIS/DSP/Include \ -isystem$(STANDALONE_CRT_DIR)/include -DRIVER_CMAKE_FLAGS = -DCMAKE_TOOLCHAIN_FILE=$(ETHOSU_TEST_ROOT)/arm-none-eabi-gcc.cmake \ - -DETHOSU_LOG_SEVERITY=debug \ - -DCMAKE_SYSTEM_PROCESSOR=cortex-m55 +CMAKE_FLAGS = -DCMAKE_TOOLCHAIN_FILE=${TVM_ROOT}/tests/python/contrib/test_ethosu/reference_system/arm-none-eabi-gcc.cmake \ + -DCMAKE_SYSTEM_PROCESSOR=${MCPU} PKG_LDFLAGS = -lm -specs=nosys.specs -static -T ${AOT_TEST_ROOT}/corstone300.ld @@ -79,10 +79,11 @@ C_CODEGEN_OBJS = $(subst .c,.o,$(C_CODEGEN_SRCS)) CC_CODEGEN_OBJS = $(subst .cc,.o,$(CC_CODEGEN_SRCS)) CMSIS_STARTUP_SRCS = $(shell find ${CMSIS_PATH}/Device/ARM/${ARM_CPU}/Source/*.c) CMSIS_NN_SRCS = $(shell find ${CMSIS_PATH}/CMSIS-NN/Source/*/*.c) -UART_SRCS = $(shell find ${PLATFORM_PATH}/*.c) +CORSTONE_300_SRCS = $(shell find ${CORSTONE_300_PATH}/*.c) ifdef ETHOSU_TEST_ROOT -ETHOSU_DRIVER_LIBS = $(wildcard ${DRIVER_PATH}/build/*.a) +NPU=$(shell echo "${NPU_VARIANT}" | tr '[:upper:]' '[:lower:]') +ETHOSU_DRIVER_LIBS = ${DRIVER_PATH}/build_${NPU}/*.a ETHOSU_RUNTIME=$(build_dir)/tvm_ethosu_runtime.o ETHOSU_INCLUDE=-I$(ETHOSU_TEST_ROOT) endif @@ -118,13 +119,19 @@ ${build_dir}/libcmsis_nn.a: $(CMSIS_NN_SRCS) $(QUIET)$(AR) -cr $(abspath $(build_dir)/libcmsis_nn.a) $(abspath $(build_dir))/libcmsis_nn/*.o $(QUIET)$(RANLIB) $(abspath $(build_dir)/libcmsis_nn.a) -${build_dir}/libuart.a: $(UART_SRCS) - $(QUIET)mkdir -p $(abspath $(build_dir)/libuart) - $(QUIET)cd $(abspath $(build_dir)/libuart) && $(CC) -c $(PKG_CFLAGS) $^ - $(QUIET)$(AR) -cr $(abspath $(build_dir)/libuart.a) $(abspath $(build_dir))/libuart/*.o - $(QUIET)$(RANLIB) $(abspath $(build_dir)/libuart.a) +${build_dir}/libcorstone.a: $(CORSTONE_300_SRCS) + $(QUIET)mkdir -p $(abspath $(build_dir)/libcorstone) + $(QUIET)cd $(abspath $(build_dir)/libcorstone) && $(CC) -c $(PKG_CFLAGS) $^ + $(QUIET)$(AR) -cr $(abspath $(build_dir)/libcorstone.a) $(abspath $(build_dir))/libcorstone/*.o + $(QUIET)$(RANLIB) $(abspath $(build_dir)/libcorstone.a) -$(build_dir)/aot_test_runner: $(build_dir)/test.c $(build_dir)/crt_backend_api.o $(build_dir)/stack_allocator.o $(build_dir)/libcodegen.a ${build_dir}/libcmsis_startup.a ${build_dir}/libcmsis_nn.a ${build_dir}/libuart.a $(ETHOSU_DRIVER_LIBS) $(ETHOSU_RUNTIME) +# Build UART driver +${build_dir}/ethosu_core_platform/libethosu_uart_cmsdk_apb.a: + $(QUIET)mkdir -p $(@D) + $(QUIET)cd ${ETHOSU_PLATFORM_PATH}/drivers/uart && $(CMAKE) -B $(abspath $(build_dir)/ethosu_core_platform) $(CMAKE_FLAGS) + $(QUIET)cd $(abspath $(build_dir)/ethosu_core_platform) && $(MAKE) + +$(build_dir)/aot_test_runner: $(build_dir)/test.c $(build_dir)/crt_backend_api.o $(build_dir)/stack_allocator.o $(build_dir)/libcodegen.a ${build_dir}/libcmsis_startup.a ${build_dir}/libcmsis_nn.a ${build_dir}/libcorstone.a ${build_dir}/ethosu_core_platform/libethosu_uart_cmsdk_apb.a $(ETHOSU_DRIVER_LIBS) $(ETHOSU_RUNTIME) $(QUIET)mkdir -p $(@D) $(QUIET)$(CC) $(PKG_CFLAGS) $(ETHOSU_INCLUDE) -o $@ -Wl,--whole-archive $^ -Wl,--no-whole-archive $(PKG_LDFLAGS)