blob: b141ac97ab54f82f6bb60439cb601a17962d2e2d [file] [log] [blame]
Kristofer Jonsson43ce4912020-11-20 09:42:53 +01001#
2# Copyright (c) 2020 Arm Limited. All rights reserved.
3#
4# SPDX-License-Identifier: Apache-2.0
5#
6# Licensed under the Apache License, Version 2.0 (the License); you may
7# not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an AS IS BASIS, WITHOUT
14# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17#
18
19#############################################################################
20# Toolchain
21#############################################################################
22
23set(TARGET_CPU "cortex-m55")
24
25if (NOT CMAKE_TOOLCHAIN_FILE)
26 set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/toolchain/armclang.cmake")
27endif()
28
29#############################################################################
30# Project
31#############################################################################
32
33cmake_minimum_required(VERSION 3.15.6)
34
35project(ethos-u-corstone-300 VERSION 0.0.1)
36
37include(${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/helpers.cmake)
38
39#############################################################################
40# Configuration
41#############################################################################
42
43set(ETHOS_U_CORE_SOFTWARE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../core_software" CACHE PATH "Path to Arm Ethos-U Core Software")
44
45#############################################################################
46# Core software
47#############################################################################
48
49set(CORE_SOFTWARE_RTOS "FreeRTOS" CACHE STRING "")
50
51add_subdirectory(${ETHOS_U_CORE_SOFTWARE_PATH} core_software)
52
53#############################################################################
54# Corstone-300
55#############################################################################
56
57add_executable(ethosu_corstone_300)
58
59target_sources(ethosu_corstone_300 PRIVATE
60 main.cpp
61 retarget.c
62 uart.c)
63
64target_link_libraries(ethosu_corstone_300 PRIVATE
65 ethosu_core
66 $<TARGET_OBJECTS:cmsis_startup>
67 cmsis_device)
68
69add_dependencies(ethosu_corstone_300 cmsis_startup)
70
71target_link_options(ethosu_corstone_300 PRIVATE
72 --entry Reset_Handler)
73
74ethosu_link_options(ethosu_corstone_300 PRIVATE
75 LINK_FILE platform)