blob: d41a7d3899afef6f3544d8077d9656fb19f14d7a [file] [log] [blame]
#
# Copyright (c) 2020 Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the License); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an AS IS BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#############################################################################
# Default parameters
#############################################################################
set(TARGET_CPU "cortex-m55")
if (NOT CMAKE_TOOLCHAIN_FILE)
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/toolchain/armclang.cmake")
endif()
set(ETHOSU_COMMAND_DEFAULT ${CMAKE_CURRENT_SOURCE_DIR}/../../scripts/run_ctest.py -t corstone-300)
#############################################################################
# Project
#############################################################################
cmake_minimum_required(VERSION 3.15.6)
project(ethos-u-corstone-300 VERSION 0.0.1)
include(CTest)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/helpers.cmake)
#############################################################################
# Corstone-300
#############################################################################
get_filename_component(ETHOSU_TARGET ${CMAKE_CURRENT_SOURCE_DIR} NAME)
message("Configuring target ${ETHOSU_TARGET}")
# Enable trustzone support in core_software
set(TRUSTZONE_BUILD ON)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../common target)
# Linker script
ethosu_target_link_options(ethosu_target_link INTERFACE
LINK_FILE platform
ENTRY Reset_Handler)
# Add drivers
target_sources(ethosu_target_startup INTERFACE
retarget.c
uart.c
target.cpp)
target_compile_definitions(ethosu_core_driver PUBLIC ETHOSU)
target_link_libraries(ethosu_target_startup INTERFACE ethosu_core_driver)
###############################################################################
# Applications
###############################################################################
# Add all applications
add_subdirectory(../../applications applications)