julhal01 | ffa98d8 | 2021-01-20 13:51:58 +0000 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
| 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 | #------------------------------------------------------------------------------- |
| 11 | if (NOT DEFINED TGT) |
| 12 | message(FATAL_ERROR "mandatory parameter TGT is not defined.") |
| 13 | endif() |
| 14 | |
| 15 | get_property(_platform_driver_dependencies TARGET ${TGT} |
| 16 | PROPERTY TS_PLATFORM_DRIVER_DEPENDENCIES |
| 17 | ) |
| 18 | |
julhal01 | 2c18fbf | 2021-02-01 08:29:28 +0000 | [diff] [blame^] | 19 | # Map platform dependencies to suitable drivers for this platform |
| 20 | if ("trng" IN_LIST _platform_driver_dependencies) |
| 21 | target_sources(${TGT} PRIVATE "${TS_ROOT}/platform/drivers/mock/mock_trng.c") |
| 22 | endif() |