CMakeLists.txt 1.1 KB

123456789101112131415161718192021222324252627
  1. SET(SOURCE_GROUP ${SOURCE_GROUP}\\eCos)
  2. ua_add_architecture("eCos")
  3. list (FIND UA_AMALGAMATION_ARCHITECUTRES "eCos" _index)
  4. if (${_index} GREATER -1 OR "${UA_ARCHITECTURE}" STREQUAL "eCos")
  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 "eCos")
  8. ua_include_directories(${CMAKE_CURRENT_SOURCE_DIR})
  9. ua_architecture_remove_definitions(-Wpedantic -Wno-static-in-inline -Wc++-compat)
  10. ua_architecture_add_definitions(-Wno-sign-conversion -fdata-sections -fno-exceptions -ffunction-sections -DSYSTEM_BUS_WIDTH=32 -mhw-mul -mno-hw-mulx -mhw-div -Wa,-relax-all -W -Wall -Wextra -D_KERNEL -D__ECOS -nostdlib -Wl,--gc-sections -Wl,-static)
  11. ua_architecture_append_to_library("-L${UA_ECOS_INCLUDES}/lib -Wl,-T,${UA_ECOS_INCLUDES}/lib/target.ld -nostartfiles") #for examples
  12. SET(UA_ECOS_INCLUDES "" CACHE STRING "Folders to include from the eCos OS")
  13. ua_include_directories(${UA_ECOS_INCLUDES}/include)
  14. endif()
  15. endif()