1#-------------------------------------------------------------------------------
2# Copyright (c) 2023-2024, Arm Limited. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6#-------------------------------------------------------------------------------
7
8# This file is exported to NS side during CMake installation phase and renamed
9# to CMakeLists.txt. It instructs how to build a platform on non-secture side.
10# The structure and sources list are fully platform specific.
11
12add_library(platform_ns)
13
14target_sources(platform_ns
15    PUBLIC
16        ${CMAKE_CURRENT_LIST_DIR}/Device/Source/startup_stm32l5xx_ns.c
17    PRIVATE
18        hal/Src/stm32l5xx_hal.c
19        Device/Source/system_stm32l5xx.c
20        CMSIS_Driver/low_level_com.c
21        hal/Src/stm32l5xx_hal_dma.c
22        hal/Src/stm32l5xx_hal_pwr.c
23        hal/Src/stm32l5xx_hal_pwr_ex.c
24        hal/Src/stm32l5xx_hal_rcc.c
25        hal/Src/stm32l5xx_hal_gpio.c
26        hal/Src/stm32l5xx_hal_uart.c
27        hal/Src/stm32l5xx_hal_uart_ex.c
28        hal/Src/stm32l5xx_hal_cortex.c
29)
30
31target_include_directories(platform_ns
32    PUBLIC
33        include
34        ext/cmsis/Include
35        ext/cmsis/Include/m-profile
36        ext/common
37        Device/Include
38        hal/Inc
39)
40
41# Include region_defs.h and flash_layout.h
42target_include_directories(platform_region_defs
43    INTERFACE
44        partition
45)
46