|
1 | | -# Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved. |
| 1 | +# Copyright (c) 2023 - 2025 Advanced Micro Devices, Inc. All rights reserved. |
2 | 2 | # SPDX-License-Identifier: MIT |
3 | 3 |
|
4 | 4 | cmake_minimum_required(VERSION 3.5.0) |
|
54 | 54 | endif() |
55 | 55 |
|
56 | 56 | if(OS MATCHES "^(FreeRTOS)$") |
| 57 | + add_definitions(-DSDT) |
57 | 58 | set(CMAKE_C_COMPILER armr5-none-eabi-gcc) |
58 | 59 | set(CMAKE_SYSTEM_NAME Generic) |
59 | 60 | set(CMAKE_SYSTEM_PROCESSOR arm) |
@@ -147,14 +148,18 @@ else() |
147 | 148 | execute_process(COMMAND ./getVersion.sh smbus WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/device_drivers/smbus_driver ) |
148 | 149 |
|
149 | 150 | #adding static libraries |
150 | | - find_library(FREERTOS_LIB NAMES freertos PATHS amc_bsp/psv_cortexr5_0/freertos10_xilinx_domain/bsp/psv_cortexr5_0/lib) |
151 | | - find_library(XIL_LIB NAMES xil PATHS amc_bsp/psv_cortexr5_0/freertos10_xilinx_domain/bsp/psv_cortexr5_0/lib) |
152 | | - find_library(XIL_FPGA NAMES xilfpga PATHS amc_bsp/psv_cortexr5_0/freertos10_xilinx_domain/bsp/psv_cortexr5_0/lib) |
153 | | - find_library(XIL_MAILBOX NAMES xilmailbox PATHS amc_bsp/psv_cortexr5_0/freertos10_xilinx_domain/bsp/psv_cortexr5_0/lib) |
| 151 | + set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH};amc_bsp/amc_bsp/lib) |
| 152 | + find_library(FREERTOS_LIB NAMES freertos PATHS ${CMAKE_LIBRARY_PATH}) |
| 153 | + find_library(XIL_LIB NAMES xil PATHS ${CMAKE_LIBRARY_PATH}) |
| 154 | + find_library(XIL_TIMER NAMES xiltimer PATHS ${CMAKE_LIBRARY_PATH}) |
| 155 | + find_library(XIL_FPGA NAMES xilfpga PATHS ${CMAKE_LIBRARY_PATH}) |
| 156 | + find_library(XIL_MAILBOX NAMES xilmailbox PATHS ${CMAKE_LIBRARY_PATH}) |
| 157 | + find_library(XIL_STANDALONE NAMES xilstandalone PATHS ${CMAKE_LIBRARY_PATH}) |
154 | 158 |
|
155 | 159 | #Include directories |
156 | | - include_directories(amc_bsp/psv_cortexr5_0/freertos10_xilinx_domain/bsp/psv_cortexr5_0/include) |
157 | | - include_directories(amc_bsp/psv_cortexr5_0/freertos10_xilinx_domain/bsp/psv_cortexr5_0/lib) |
| 160 | + include_directories(amc_bsp/amc_bsp/include) |
| 161 | + include_directories(${CMAKE_LIBRARY_PATH}) |
| 162 | + include_directories(build) |
158 | 163 | include_directories(src/common/include) |
159 | 164 | include_directories(src/common/core_libs/pll) |
160 | 165 | include_directories(src/common/core_libs/evl) |
@@ -309,7 +314,7 @@ else() |
309 | 314 |
|
310 | 315 | #linking libraries with executable |
311 | 316 | if(OS MATCHES "^(FreeRTOS)$") |
312 | | - target_link_libraries(amc.elf "-Wl,-T -Wl,../src/lscript.ld" -Wl,--start-group,${XIL_LIB},${FREERTOS_LIB},-lgcc,-lc,--end-group -Wl,--start-group,${XIL_FPGA},${XIL_LIB},-lgcc,-lc,--end-group -Wl,--start-group,${XIL_MAILBOX},${XIL_LIB},-lgcc,-lc,--end-group) |
| 317 | + target_link_libraries(amc.elf "-Wl,-T -Wl,${amc_SOURCE_DIR}/src/lscript.ld" -Wl,--start-group,${XIL_TIMER},${XIL_STANDALONE},${XIL_LIB},${FREERTOS_LIB},-lgcc,-lc,--end-group -Wl,--start-group,${XIL_FPGA},${XIL_LIB},-lgcc,-lc,--end-group -Wl,--start-group,${XIL_TIMER},${XIL_STANDALONE},${XIL_MAILBOX},${XIL_LIB},-lgcc,-lc,--end-group) |
313 | 318 | target_compile_definitions(amc.elf PRIVATE $<$<CONFIG:Debug>:DEBUG_PRINT> GCQ_MAX_INSTANCES=1) |
314 | 319 | endif() |
315 | 320 |
|
|
0 commit comments