CMakeLists.txt 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. #############################################################[Chinese Manual]###################################################################
  2. # *****工程路径不要包含中文字符和空格,否则可能会报错!*****
  3. # 第一步: 确认机器上已经安装了MRS的工具链(假设当前平台为Linux,工具链路径为"/path/to/toolchain/RISC-V Embedded GCC12",工具链相关前缀为"riscv-wch-elf-")
  4. # 第二步: 设置工具链路径,例如修改替换下方的set(TOOLCHAIN_FOLDER "/path/to/toolchain/RISC-V Embedded GCC12")
  5. # 第三步: 设置工具链中相关可执行文件的前缀,例如修改替换下方的set(TOOLCHAIN_PREFIX "riscv-wch-elf-")
  6. # 第四步: 执行 cd your/path/of/project
  7. # 第五步: 执行 cmake -B build -G "Unix Makefiles"
  8. # 第六步: 执行 cmake --build build
  9. # 注意: 在Windows平台运行,需要a.安装GNU MAKE并将其路径(bin目录)添加到系统环境变量,之后执行cmake -B build -G "Unix Makefiles"(推荐)
  10. # 或者b.安装MinGW,将其路径(bin目录)添加到系统环境变量,之后执行cmake -B build -G "MinGW Makefiles"
  11. # 如有相关疑问,可通过support@mounriver.com联系我们
  12. #################################################################################################################################################
  13. #############################################################[English Manual]###################################################################
  14. # Step 1: Confirm that the MRS toolchain has been installed on the machine. Assuming the current platform is Linux,
  15. # the toolchain path is "/path/to/toolchain/RISC-V Embedded GCC12", and the toolchain-related prefix is "riscv-wch-elf-"
  16. # Step 2: Set the toolchain path, for example, modify and replace the following "set (TOOLCHAIN_FOLDER "/path/to/toolchain/RISC-V Embedded GCC12")"
  17. # Step 3: Set the prefix of the executable files in the toolchain,for example, modify and replace the following "set(TOOLCHAIN_PREFIX "riscv-wch-elf-")"
  18. # Step 4: Call "cd your/path/of/project"
  19. # Step 5: Call "cmake -B build -G "Unix Makefiles""
  20. # Step 6: Call "cmake --build build"
  21. # Note: To run on Windows, you need: a. Install GNU MAKE and add its path (the bin directory) to the system environment PATH.
  22. # Then call the execution of "cmake -B build -G "Unix Makefiles""(Recommanded).
  23. # or b. Install MinGW and add its path (the bin directory) to the system environment PATH.
  24. # Then call the execution of "cmake -B build -G "MinGW Makefiles"".
  25. # If you have any questions, please contact us at support@mounriver.com
  26. #################################################################################################################################################
  27. # Set CMake minimum require
  28. cmake_minimum_required(VERSION 3.16)
  29. # Set CMake sysytem name
  30. set(CMAKE_SYSTEM_NAME Generic)
  31. # Skipping compiler detection and use custom toolchain
  32. SET(CMAKE_C_COMPILER_WORKS TRUE)
  33. SET(CMAKE_CXX_COMPILER_WORKS TRUE)
  34. SET(CMAKE_ASM_COMPILER_WORKS TRUE)
  35. # Use MRS toolchian to compile
  36. set(TOOLCHAIN_FOLDER "e:/MounRiver/MounRiver_Studio2/resources/app/resources/win32/components/WCH/Toolchain/RISC-V Embedded GCC12")
  37. set(TOOLCHAIN_PREFIX "riscv-wch-elf-")
  38. set(CMAKE_C_COMPILER "${TOOLCHAIN_FOLDER}/bin/riscv-wch-elf-gcc.exe")
  39. set(CMAKE_CXX_COMPILER "${TOOLCHAIN_FOLDER}/bin/riscv-wch-elf-g++.exe")
  40. set(CMAKE_ASM_COMPILER "${TOOLCHAIN_FOLDER}/bin/riscv-wch-elf-gcc.exe")
  41. set(CMAKE_OBJCOPY "${TOOLCHAIN_FOLDER}/bin/${TOOLCHAIN_PREFIX}objcopy.exe")
  42. set(CMAKE_OBJDUMP "${TOOLCHAIN_FOLDER}/bin/riscv-wch-elf-objdump.exe")
  43. set(CMAKE_SIZE "${TOOLCHAIN_FOLDER}/bin/${TOOLCHAIN_PREFIX}size.exe")
  44. set(CMAKE_AR "${TOOLCHAIN_FOLDER}/bin/${TOOLCHAIN_PREFIX}ar.exe")
  45. set(PROJECT_NAME "test2")
  46. set(TARGET_ARTIFACT "test2.elf")
  47. # mylib_c(灯棒动画/指令引擎)已抽成静态库,源码不再参与本工程编译。
  48. # 两个变体,用 -DMYLIB_VARIANT=<lite|full> 选:
  49. # lite(默认)—— 精简版:基本模式 + 跳频相位同步 + colordb,无几何。
  50. # 工程在 ../../mylib_c_lite_lib/,产出 lib/libmylib_c_lite.a
  51. # full —— 完整版:含 beat/simple_graphic/follow_path 与全部几何。
  52. # 工程在 ../../mylib_c_lib/,产出 lib/libmylib_c.a
  53. #
  54. # ⚠ 切变体请用**新的 build 目录**(或删掉 build/ 重新 configure):
  55. # 旧的 CMakeCache.txt 里缓存着上一次的 MYLIB_C_LIB_DIR。
  56. set(MYLIB_VARIANT "lite" CACHE STRING "mylib_c 变体:lite(默认,无几何) 或 full")
  57. set_property(CACHE MYLIB_VARIANT PROPERTY STRINGS lite full)
  58. if(MYLIB_VARIANT STREQUAL "lite")
  59. set(_mylib_proj "mylib_c_lite_lib")
  60. set(_mylib_libname "mylib_c_lite")
  61. set(_mylib_hdr_root "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../../mylib_c_lite_lib")
  62. elseif(MYLIB_VARIANT STREQUAL "full")
  63. set(_mylib_proj "mylib_c_lib")
  64. set(_mylib_libname "mylib_c")
  65. set(_mylib_hdr_root "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/APP/mylib_c")
  66. else()
  67. message(FATAL_ERROR "MYLIB_VARIANT must be 'lite' or 'full', got: '${MYLIB_VARIANT}'")
  68. endif()
  69. if(NOT DEFINED MYLIB_C_LIB_DIR)
  70. set(MYLIB_C_LIB_DIR "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../../${_mylib_proj}/lib")
  71. endif()
  72. if(NOT EXISTS "${MYLIB_C_LIB_DIR}/lib${_mylib_libname}.a")
  73. message(FATAL_ERROR
  74. "lib${_mylib_libname}.a not found in: ${MYLIB_C_LIB_DIR}\n"
  75. "Build it first (variant '${MYLIB_VARIANT}'):\n"
  76. " cmake -S ../../${_mylib_proj} -B ../../${_mylib_proj}/build -G \"Unix Makefiles\"\n"
  77. " <make> -C ../../${_mylib_proj}/build -j8\n"
  78. "Or point elsewhere with -DMYLIB_C_LIB_DIR=<dir containing lib${_mylib_libname}.a>")
  79. endif()
  80. set(CMAKE_C_OUTPUT_EXTENSION .o)
  81. set(CMAKE_CXX_OUTPUT_EXTENSION .o)
  82. project("${PROJECT_NAME}" LANGUAGES C ASM CXX)
  83. # Use relative path
  84. add_compile_options(-fmacro-prefix-map=${CMAKE_SOURCE_DIR}=..)
  85. set(SRC_FILES
  86. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../SRC/StdPeriphDriver/CH58x_adc.c"
  87. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../SRC/StdPeriphDriver/CH58x_clk.c"
  88. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../SRC/StdPeriphDriver/CH58x_flash.c"
  89. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../SRC/StdPeriphDriver/CH58x_gpio.c"
  90. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../SRC/StdPeriphDriver/CH58x_i2c.c"
  91. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../SRC/StdPeriphDriver/CH58x_lcd.c"
  92. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../SRC/StdPeriphDriver/CH58x_pwm.c"
  93. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../SRC/StdPeriphDriver/CH58x_pwr.c"
  94. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../SRC/StdPeriphDriver/CH58x_spi0.c"
  95. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../SRC/StdPeriphDriver/CH58x_spi1.c"
  96. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../SRC/StdPeriphDriver/CH58x_sys.c"
  97. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../SRC/StdPeriphDriver/CH58x_timer0.c"
  98. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../SRC/StdPeriphDriver/CH58x_timer1.c"
  99. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../SRC/StdPeriphDriver/CH58x_timer2.c"
  100. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../SRC/StdPeriphDriver/CH58x_timer3.c"
  101. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../SRC/StdPeriphDriver/CH58x_uart0.c"
  102. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../SRC/StdPeriphDriver/CH58x_uart1.c"
  103. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../SRC/StdPeriphDriver/CH58x_uart2.c"
  104. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../SRC/StdPeriphDriver/CH58x_uart3.c"
  105. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../SRC/StdPeriphDriver/CH58x_usbdev.c"
  106. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../SRC/StdPeriphDriver/CH58x_usbhostBase.c"
  107. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../SRC/StdPeriphDriver/CH58x_usbhostClass.c"
  108. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../SRC/Startup/startup_CH585.S"
  109. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/APP/ble/profile/devinfoservice.c"
  110. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/APP/ble/profile/gattprofile.c"
  111. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../LIB/ble_task_scheduler.S"
  112. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../HAL/MCU.c"
  113. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../HAL/RTC.c"
  114. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../HAL/SLEEP.c"
  115. # mylib_c/*.c 不再在此编译 —— 见 ../mylib_c_lib/ 静态库工程,链接 libmylib_c.a
  116. "${CMAKE_CURRENT_SOURCE_DIR}/APP/hw_config.c"
  117. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/APP/hal_irq.c"
  118. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/APP/src/ledx.c"
  119. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/APP/ble/peripheral.c"
  120. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/APP/src/RF_main.c"
  121. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/APP/src/RF_PHY.c"
  122. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/APP/src/rx_hop.c"
  123. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/APP/src/sir24drv.c"
  124. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/APP/src/ukey.c"
  125. )
  126. set(CMAKE_C_FLAGS " -march=rv32imc_zba_zbb_zbc_zbs_xw -mabi=ilp32 -mcmodel=medany -msmall-data-limit=8 -mno-save-restore -fmax-errors=20 -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common --param=highcode-gen-section-name=1 -g -I\"${_mylib_hdr_root}/include\" -I\"${_mylib_hdr_root}\" -I\"${_mylib_hdr_root}/lwpkt/lwpkt/src/include\" -I\"I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../SRC/Startup\" -I\"I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/APP/include\" -I\"I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/APP\" -I\"I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/APP/ble\" -I\"I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/APP/ble/profile/include\" -I\"I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../SRC/StdPeriphDriver/inc\" -I\"I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../HAL/include\" -I\"I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../SRC/Ld\" -I\"I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../LIB\" -I\"I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../SRC/RVMSIS\" -DBLE_BUFF_MAX_LEN=512 -DMCU_ENVIRONMENT=1 -DUSE_MEMORY_POOL=1 -std=gnu99")
  127. set(CMAKE_CXX_FLAGS " -march=rv32imc_zba_zbb_zbc_zbs_xw -mabi=ilp32 -mcmodel=medany -msmall-data-limit=8 -mno-save-restore -fmax-errors=20 -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common --param=highcode-gen-section-name=1 -g -std=gnu++11 -fabi-version=0")
  128. set(CMAKE_ASM_FLAGS " -march=rv32imc_zba_zbb_zbc_zbs_xw -mabi=ilp32 -mcmodel=medany -msmall-data-limit=8 -mno-save-restore -fmax-errors=20 -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common --param=highcode-gen-section-name=1 -g -x assembler-with-cpp")
  129. add_executable("${TARGET_ARTIFACT}" ${SRC_FILES})
  130. set_target_properties("${TARGET_ARTIFACT}" PROPERTIES LINK_FLAGS " -march=rv32imc_zba_zbb_zbc_zbs_xw -mabi=ilp32 -mcmodel=medany -msmall-data-limit=8 -mno-save-restore -fmax-errors=20 -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common --param=highcode-gen-section-name=1 -g -T \"I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../SRC/Ld/Link.ld\" -L\"I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0\" -L\"I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../LIB\" -L\"I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/../SRC/StdPeriphDriver\" -L\"${MYLIB_C_LIB_DIR}\" -nostartfiles -Xlinker --gc-sections -Xlinker --print-memory-usage -Wl,-Map,\"test2.map\" --specs=nano.specs --specs=nosys.specs -o \"lrg_mogai_dianchi-new-2-0813-tiaopin-tpl.elf\" ")
  131. target_link_libraries(
  132. "${TARGET_ARTIFACT}"
  133. ISP585
  134. CH58xBLE
  135. ${_mylib_libname}
  136. m
  137. )
  138. add_custom_command(TARGET "${TARGET_ARTIFACT}"
  139. POST_BUILD
  140. COMMAND ${CMAKE_OBJCOPY} ARGS -O ihex "test2.elf" "test2.hex"
  141. COMMAND ${CMAKE_OBJDUMP} ARGS --source --all-headers --demangle -M xw --line-numbers --wide "test2.elf" > "test2.lst"
  142. COMMAND ${CMAKE_SIZE} ARGS --format=berkeley "test2.elf"
  143. )
  144. # ---- App-specific source files ----
  145. target_sources("${TARGET_ARTIFACT}" PRIVATE
  146. "${CMAKE_CURRENT_SOURCE_DIR}/APP/hw_config.c"
  147. )
  148. # ---- Mixed-compilation include paths ----
  149. # App headers first (override template), template APP/ as fallback
  150. set(CMAKE_C_FLAGS "-I\"${CMAKE_CURRENT_SOURCE_DIR}/APP/include\" -I\"${CMAKE_CURRENT_SOURCE_DIR}/APP\" -I\"${CMAKE_CURRENT_SOURCE_DIR}\" ${CMAKE_C_FLAGS}")
  151. target_include_directories("${TARGET_ARTIFACT}" PRIVATE
  152. "I:/temp/lowenergyscanner/CH585EVTx0729/CH585EVTx/EVT/EXAM/BLE/lrg_mogai_dianchi-new-2-0813-tiaopin-tpl/v1.0.0/APP"
  153. )