CMakeLists.txt 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. # Copyright (C) 2020 QUECTEL Technologies Limited and/or its affiliates("QUECTEL").
  2. # All rights reserved.
  3. #
  4. # Copyright (C) 2020 QUECTEL Technologies Limited and/or its affiliates("QUECTEL").
  5. # All rights reserved.
  6. #
  7. set(target boot_ex_ql_pin)
  8. add_app_libraries($<TARGET_FILE:${target}>)
  9. add_library(${target} STATIC)
  10. set_target_properties(${target} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${out_quec_lib_dir})
  11. target_compile_definitions(${target} PRIVATE OSI_LOG_TAG=LOG_TAG_QUEC)
  12. target_include_directories(${target} PUBLIC inc)
  13. target_include_directories(${target} PUBLIC petitfatfs)
  14. target_link_libraries(${target} PRIVATE calclib driver)
  15. target_include_targets(${target} PRIVATE hal fs sffs bdev driver fsmount nvm cpio_parser bootloader fupdate)
  16. if (CONFIG_QUEC_PROJECT_FEATURE_BOOT_NAND_FLASH OR CONFIG_QUEC_PROJECT_FEATURE_BOOT_SPI6_NAND)
  17. target_link_libraries(${target} PRIVATE ql_spi4_nand_prop)
  18. target_include_targets(${target} PRIVATE ql_spi4_nand_prop)
  19. endif()
  20. target_sources(${target} PRIVATE quec_boot_pin_map.c)
  21. set(target boot_ex_ql)
  22. include(core_ex_ql.cmake)
  23. if(CONFIG_QUEC_PROJECT_FEATURE_BOOT_SDMMC)
  24. set(target boot_ex_sdmmc)
  25. include(core_ex_sdmmc.cmake)
  26. endif()
  27. if(CONFIG_QUEC_PROJECT_FEATURE_BOOT_EMMC)
  28. set(target boot_ex_emmc)
  29. include(core_ex_emmc.cmake)
  30. endif()
  31. if(CONFIG_QUEC_PROJECT_FEATURE_BOOT_SDMMC2)
  32. set(target boot_ex_sdmmc2)
  33. include(core_ex_sdmmc2.cmake)
  34. endif()
  35. if(CONFIG_QUEC_PROJECT_FEATURE_BOOT_EMMC2)
  36. set(target boot_ex_emmc2)
  37. include(core_ex_emmc2.cmake)
  38. endif()
  39. if(CONFIG_QUEC_PROJECT_FEATURE_BOOT_FAT_RDONLY)
  40. set(target boot_ex_fat_rdonly)
  41. include(core_ex_fat_rdonly.cmake)
  42. endif()
  43. if(CONFIG_QUEC_PROJECT_FEATURE_BOOT_FAT_RW)
  44. set(target boot_ex_fat_rw)
  45. include(core_ex_fat_rw.cmake)
  46. endif()
  47. if(CONFIG_QUEC_PROJECT_FEATURE_SPI6_EXT_NOR)
  48. set(target boot_ex_spi6nor)
  49. include(core_ex_spi6nor.cmake)
  50. endif()
  51. if(CONFIG_QUEC_PROJECT_FEATURE_BOOT_SPI_FLASH)
  52. set(target boot_ex_spiflash)
  53. include(core_ex_spiflash.cmake)
  54. endif()
  55. if(CONFIG_QUEC_PROJECT_FEATURE_BOOT_LCD)
  56. set(target boot_ex_lcd)
  57. include(core_ex_lcd.cmake)
  58. endif()
  59. if (CONFIG_QUEC_PROJECT_FEATURE_BOOT_NAND_FLASH)
  60. set(target boot_ex_nandflash)
  61. include(core_ex_nandflash.cmake)
  62. endif()
  63. if (CONFIG_QUEC_PROJECT_FEATURE_BOOT_SPI6_NAND)
  64. set(target boot_ex_spi6nand)
  65. include(core_ex_spi6nand.cmake)
  66. endif()
  67. if(CONFIG_QUEC_PROJECT_FEATURE_BOOT_LED)
  68. set(target boot_ex_led)
  69. include(core_ex_led.cmake)
  70. endif()
  71. if (CONFIG_QUEC_PROJECT_FEATURE_BOOT_ADC)
  72. set(target boot_ex_adc)
  73. include(core_ex_adc.cmake)
  74. endif()
  75. if (CONFIG_QUEC_PROJECT_FEATURE_BOOT_SCATTER)
  76. set(target boot_ex_scatter)
  77. include(core_ex_scatter.cmake)
  78. endif()
  79. if(CONFIG_QUEC_PROJECT_FEATURE_BOOT_SPI4_EXTNSFFS)
  80. set(target boot_ex_spi)
  81. include(core_ex_spi.cmake)
  82. set(target boot_ex_spi4exnsffs)
  83. include(core_ex_spi4exnsffs.cmake)
  84. set(target boot_ex_spi4exnsffs_cfg)
  85. add_app_libraries($<TARGET_FILE:${target}>)
  86. add_library(${target} STATIC)
  87. set_target_properties(${target} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${out_quec_lib_dir})
  88. target_compile_definitions(${target} PRIVATE OSI_LOG_TAG=LOG_TAG_QUEC)
  89. target_include_directories(${target} PUBLIC inc)
  90. target_link_libraries(${target} PRIVATE calclib driver bootloader boot_ex_spi4exnsffs boot_ex_spi ql_spi4_nor_prop)
  91. target_include_targets(${target} PRIVATE hal driver bootloader boot_ex_spi4exnsffs boot_ex_spi ql_spi4_nor_prop)
  92. target_sources_if(CONFIG_QUEC_PROJECT_FEATURE_BOOT_SPI4_EXTNSFFS THEN ${target} PRIVATE
  93. ql_boot_spi4_exnsffs_cfg.c
  94. )
  95. endif()
  96. if(CONFIG_QUEC_PROJECT_FEATURE_BOOT_SPI4_NORFLASH)
  97. set(target boot_ex_spi4norflash)
  98. include(core_ex_spi4norflash.cmake)
  99. endif()
  100. relative_glob(srcs include/*.h src/*.c *.c inc/*.h)
  101. beautify_c_code(${target} ${srcs})