CMakeLists.txt 1.2 KB

123456789101112131415161718192021222324252627
  1. SET(SOURCE_GROUP ${SOURCE_GROUP}\\freertos)
  2. ua_add_architecture("freertos")
  3. list (FIND UA_AMALGAMATION_ARCHITECUTRES "freertos" _index)
  4. if (${_index} GREATER -1 OR "${UA_ARCHITECTURE}" STREQUAL "freertos")
  5. ua_add_architecture_file(${CMAKE_CURRENT_SOURCE_DIR}/ua_clock.c)
  6. ua_add_architecture_file(${CMAKE_CURRENT_SOURCE_DIR}/ua_architecture_functions.c)
  7. if("${UA_ARCHITECTURE}" STREQUAL "freertos")
  8. ua_include_directories(${CMAKE_CURRENT_SOURCE_DIR})
  9. SET(UA_FREERTOS_INCLUDES "" CACHE STRING "Folders to include from the freeRTOS OS")
  10. ua_include_directories(${UA_FREERTOS_INCLUDES})
  11. ua_architecture_remove_definitions(-Wconversion )
  12. ua_architecture_add_definitions(-DUA_FREERTOS -mcpu=cortex-m3 -mthumb -g -Wall -O0 -specs=nano.specs
  13. -ffunction-sections -fdata-sections -fno-exceptions -fstack-usage -Wno-unused-variable -Wno-format -Wno-format-security -Wno-format-nonliteral)
  14. ua_architecture_append_to_library(c m stdc++ supc++)
  15. set(UA_FREERTOS_HOSTNAME "freertos-host" CACHE STRING "Define a custom hostname/ip for the endpoint.")
  16. ua_architecture_add_definitions(-DUA_FREERTOS_HOSTNAME="${UA_FREERTOS_HOSTNAME}")
  17. endif()
  18. endif()