Implement a secure ICS protocol targeting LoRa Node151 microcontroller for controlling irrigation.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

51 lines
2.2 KiB

  1. ##
  2. ## ______ _
  3. ## / _____) _ | |
  4. ## ( (____ _____ ____ _| |_ _____ ____| |__
  5. ## \____ \| ___ | (_ _) ___ |/ ___) _ \
  6. ## _____) ) ____| | | || |_| ____( (___| | | |
  7. ## (______/|_____)_|_|_| \__)_____)\____)_| |_|
  8. ## (C)2013-2017 Semtech
  9. ## ___ _____ _ ___ _ _____ ___ ___ ___ ___
  10. ## / __|_ _/_\ / __| |/ / __/ _ \| _ \/ __| __|
  11. ## \__ \ | |/ _ \ (__| ' <| _| (_) | / (__| _|
  12. ## |___/ |_/_/ \_\___|_|\_\_| \___/|_|_\\___|___|
  13. ## embedded.connectivity.solutions.==============
  14. ##
  15. ## License: Revised BSD License, see LICENSE.TXT file included in the project
  16. ## Authors: Johannes Bruder ( STACKFORCE ), Miguel Luis ( Semtech )
  17. ##
  18. ##
  19. ## CMake arm-none-eabi binutils integration and helper functions
  20. ##
  21. #---------------------------------------------------------------------------------------
  22. # Set tools
  23. #---------------------------------------------------------------------------------------
  24. set(CMAKE_OBJCOPY ${TOOLCHAIN_BIN_DIR}/${TOOLCHAIN}-objcopy${TOOLCHAIN_EXT})
  25. set(CMAKE_OBJDUMP ${TOOLCHAIN_BIN_DIR}/${TOOLCHAIN}-objdump${TOOLCHAIN_EXT})
  26. set(CMAKE_SIZE ${TOOLCHAIN_BIN_DIR}/${TOOLCHAIN}-size${TOOLCHAIN_EXT})
  27. #---------------------------------------------------------------------------------------
  28. # Prints the section sizes
  29. #---------------------------------------------------------------------------------------
  30. function(print_section_sizes TARGET)
  31. add_custom_command(TARGET ${TARGET} POST_BUILD COMMAND ${CMAKE_SIZE} ${TARGET})
  32. endfunction()
  33. #---------------------------------------------------------------------------------------
  34. # Creates output in hex format
  35. #---------------------------------------------------------------------------------------
  36. function(create_hex_output TARGET)
  37. add_custom_target(${TARGET}.hex ALL DEPENDS ${TARGET} COMMAND ${CMAKE_OBJCOPY} -Oihex ${TARGET} ${TARGET}.hex)
  38. endfunction()
  39. #---------------------------------------------------------------------------------------
  40. # Creates output in binary format
  41. #---------------------------------------------------------------------------------------
  42. function(create_bin_output TARGET)
  43. add_custom_target(${TARGET}.bin ALL DEPENDS ${TARGET} COMMAND ${CMAKE_OBJCOPY} -Obinary ${TARGET} ${TARGET}.bin)
  44. endfunction()