blob: a4d8d34716acb1790e9ac316f1622562075c927f [file] [log] [blame]
julhal01ffa98d82021-01-20 13:51:58 +00001#-------------------------------------------------------------------------------
2# Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6# Platform definition for the 'mock' platform. This platform provides
7# mock implementations for all platform driver dependences. This should
8# never be used for a production build but is useful build testing and for
9# running tests that don't rely on hardware backed peripherals.
10#-------------------------------------------------------------------------------
11if (NOT DEFINED TGT)
12 message(FATAL_ERROR "mandatory parameter TGT is not defined.")
13endif()
14
15get_property(_platform_driver_dependencies TARGET ${TGT}
16 PROPERTY TS_PLATFORM_DRIVER_DEPENDENCIES
17)
18
julhal012c18fbf2021-02-01 08:29:28 +000019# Map platform dependencies to suitable drivers for this platform
20if ("trng" IN_LIST _platform_driver_dependencies)
21 target_sources(${TGT} PRIVATE "${TS_ROOT}/platform/drivers/mock/mock_trng.c")
22endif()