From b42d3e431c15ac082b17a1725d639c4ee4980264 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 20 Apr 2023 16:42:13 +0700 Subject: [PATCH] board test running with cmake --- .idea/runConfigurations/rt1010.xml | 10 ++++++++++ examples/device/board_test/CMakeLists.txt | 2 +- hw/bsp/imxrt/family.cmake | 9 ++++----- 3 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 .idea/runConfigurations/rt1010.xml diff --git a/.idea/runConfigurations/rt1010.xml b/.idea/runConfigurations/rt1010.xml new file mode 100644 index 000000000..50659c95c --- /dev/null +++ b/.idea/runConfigurations/rt1010.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/examples/device/board_test/CMakeLists.txt b/examples/device/board_test/CMakeLists.txt index ac47bf0b4..847246453 100644 --- a/examples/device/board_test/CMakeLists.txt +++ b/examples/device/board_test/CMakeLists.txt @@ -11,7 +11,7 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake) # gets PROJECT name for the example (e.g. -) family_get_project_name(PROJECT ${CMAKE_CURRENT_LIST_DIR}) -project(${PROJECT}) +project(${PROJECT} C CXX ASM) # Checks this example is valid for the family and initializes the project family_initialize_project(${PROJECT} ${CMAKE_CURRENT_LIST_DIR}) diff --git a/hw/bsp/imxrt/family.cmake b/hw/bsp/imxrt/family.cmake index 1e095ebfb..399e2be92 100644 --- a/hw/bsp/imxrt/family.cmake +++ b/hw/bsp/imxrt/family.cmake @@ -26,13 +26,8 @@ else () target_link_options(${PROJECT} PUBLIC --specs=nosys.specs --specs=nano.specs - #-lgcc -lm -lnosys ) -# target_link_libraries(${PROJECT} PUBLIC -# -lgcc -lm -lnosys -# ) - target_sources(${PROJECT} PUBLIC # TinyUSB ${TOP}/src/portable/chipidea/ci_hs/dcd_ci_hs.c @@ -53,6 +48,10 @@ else () target_sources(${PROJECT} PUBLIC ${SDK_DIR}/devices/${MCU_VARIANT}/gcc/startup_${MCU_VARIANT}.S ) + + target_link_options(${PROJECT} PUBLIC + "LINKER:--script=${SDK_DIR}/devices/${MCU_VARIANT}/gcc/${MCU_VARIANT}xxxxx_flexspi_nor.ld" + ) endif () target_include_directories(${PROJECT} PUBLIC