Yulia Garbovich | f61ea35 | 2021-11-11 14:16:57 +0200 | [diff] [blame] | 1 | # |
| 2 | # Copyright (c) 2020-2021 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 | if (NOT TARGET freertos_kernel) |
| 20 | message("Not building ethosu_message_dispatcher, required freertos not built.") |
| 21 | return() |
| 22 | endif() |
| 23 | |
| 24 | set(MESSAGE_HANDLER_ARENA_SIZE 2000000 CACHE STRING "Size of message handler tensor arena") |
| 25 | |
| 26 | ethosu_add_executable(message_handler |
| 27 | SOURCES |
| 28 | main.cpp |
| 29 | message_handler.cpp |
| 30 | message_queue.cpp |
| 31 | LIBRARIES |
| 32 | cmsis_device |
| 33 | $<$<TARGET_EXISTS:ethosu_core_driver>:ethosu_core_driver> |
| 34 | ethosu_mailbox |
| 35 | freertos_kernel |
| 36 | inference_process) |
| 37 | |
| 38 | target_include_directories(message_handler PRIVATE |
| 39 | ${LINUX_DRIVER_STACK_PATH}/kernel) |
| 40 | |
| 41 | target_compile_definitions(message_handler PRIVATE |
| 42 | TENSOR_ARENA_SIZE=${MESSAGE_HANDLER_ARENA_SIZE}) |