CMakeLists.txt 1.2 KB

123456789101112131415161718192021222324252627
  1. SET(SOURCE_GROUP ${SOURCE_GROUP}\\freertosLWIP)
  2. ua_add_architecture("freertosLWIP")
  3. list (FIND UA_AMALGAMATION_ARCHITECUTRES "freertosLWIP" _index)
  4. if (${_index} GREATER -1 OR "${UA_ARCHITECTURE}" STREQUAL "freertosLWIP")
  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 "freertosLWIP")
  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(-mthumb -mcpu=cortex-m3) #CPU dependant
  13. ua_architecture_add_definitions(-ffunction-sections -fdata-sections -fstack-usage -Wall -specs=nano.specs
  14. -fno-exceptions -Wno-unused-variable -Wno-format -Wno-format-security -Wno-format-nonliteral)
  15. set(UA_FREERTOS_HOSTNAME "freertosLWIP-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()