CMakeLists.txt 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. if(${CONFIG_HAS_SEMTECH_RADIO_DRIVERS})
  2. set(ZEPHYR_CURRENT_LIBRARY loramac-node)
  3. zephyr_library_include_directories(
  4. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/boards
  5. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/system
  6. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/radio
  7. )
  8. zephyr_library_sources(
  9. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/boards/mcu/utilities.c
  10. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/system/systime.c
  11. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/system/timer.c
  12. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/system/delay.c
  13. )
  14. zephyr_library_sources_ifdef(CONFIG_HAS_SEMTECH_SX1272
  15. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/radio/sx1272/sx1272.c
  16. )
  17. zephyr_library_sources_ifdef(CONFIG_HAS_SEMTECH_SX1276
  18. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/radio/sx1276/sx1276.c
  19. )
  20. zephyr_library_sources_ifdef(CONFIG_HAS_SEMTECH_SX126X
  21. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/radio/sx126x/sx126x.c
  22. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/radio/sx126x/radio.c
  23. )
  24. if(${CONFIG_HAS_SEMTECH_LORAMAC})
  25. zephyr_library_include_directories(
  26. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac
  27. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region
  28. )
  29. endif()
  30. zephyr_library_compile_definitions_ifdef(CONFIG_HAS_SEMTECH_SOFT_SE SOFT_SE)
  31. zephyr_library_sources_ifdef(CONFIG_HAS_SEMTECH_SOFT_SE
  32. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/peripherals/soft-se/aes.c
  33. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/peripherals/soft-se/cmac.c
  34. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/peripherals/soft-se/soft-se.c
  35. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/peripherals/soft-se/soft-se-hal.c
  36. )
  37. zephyr_library_sources_ifdef(CONFIG_HAS_SEMTECH_LORAMAC
  38. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/LoRaMac.c
  39. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/LoRaMacAdr.c
  40. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/LoRaMacClassB.c
  41. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/LoRaMacCommands.c
  42. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/LoRaMacConfirmQueue.c
  43. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/LoRaMacCrypto.c
  44. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/LoRaMacParser.c
  45. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/LoRaMacSerializer.c
  46. )
  47. zephyr_library_sources_ifdef(CONFIG_HAS_SEMTECH_LORAMAC
  48. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/Region.c
  49. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/RegionCommon.c
  50. )
  51. zephyr_library_sources_ifdef(CONFIG_LORAMAC_REGION_EU868
  52. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/RegionEU868.c
  53. )
  54. zephyr_library_sources_ifdef(CONFIG_LORAMAC_REGION_US915
  55. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/RegionUS915.c
  56. )
  57. zephyr_library_sources_ifdef(CONFIG_LORAMAC_REGION_CN779
  58. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/RegionCN779.c
  59. )
  60. zephyr_library_sources_ifdef(CONFIG_LORAMAC_REGION_EU433
  61. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/RegionEU433.c
  62. )
  63. zephyr_library_sources_ifdef(CONFIG_LORAMAC_REGION_AU915
  64. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/RegionAU915.c
  65. )
  66. zephyr_library_sources_ifdef(CONFIG_LORAMAC_REGION_AS923
  67. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/RegionAS923.c
  68. )
  69. zephyr_library_sources_ifdef(CONFIG_LORAMAC_REGION_CN470
  70. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/RegionCN470.c
  71. )
  72. zephyr_library_sources_ifdef(CONFIG_LORAMAC_REGION_KR920
  73. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/RegionKR920.c
  74. )
  75. zephyr_library_sources_ifdef(CONFIG_LORAMAC_REGION_IN865
  76. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/RegionIN865.c
  77. )
  78. zephyr_library_sources_ifdef(CONFIG_LORAMAC_REGION_RU864
  79. ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/RegionRU864.c
  80. )
  81. endif()