Makefile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #
  2. # Copyright (C) 2014 Pavel Kirienko <pavel.kirienko@gmail.com>
  3. #
  4. PROJECT = uavcan_test_stm32f107
  5. #
  6. # Test application
  7. #
  8. MAIN ?= main.cpp
  9. CPPSRC = src/$(MAIN) \
  10. src/dummy.cpp \
  11. src/board/board.cpp
  12. #
  13. # UAVCAN library
  14. #
  15. export LIBUAVCAN_REPO_ROOT := $(abspath ../../..)
  16. UDEFS = -DUAVCAN_STM32_CHIBIOS=1 \
  17. -DUAVCAN_STM32_TIMER_NUMBER=6 \
  18. -DUAVCAN_TINY=1 \
  19. -DUAVCAN_STM32_NUM_IFACES=2 \
  20. -DUAVCAN_MEM_POOL_BLOCK_SIZE=48
  21. include $(LIBUAVCAN_REPO_ROOT)/libuavcan/include.mk
  22. CPPSRC += $(LIBUAVCAN_SRC)
  23. UINCDIR += $(LIBUAVCAN_INC)
  24. include $(LIBUAVCAN_REPO_ROOT)/libuavcan_drivers/stm32/driver/include.mk
  25. CPPSRC += $(LIBUAVCAN_STM32_SRC)
  26. UINCDIR += $(LIBUAVCAN_STM32_INC)
  27. $(info $(shell $(LIBUAVCAN_DSDLC) $(UAVCAN_DSDL_DIR)))
  28. UINCDIR += dsdlc_generated
  29. #
  30. # Git commit hash
  31. #
  32. GIT_HASH := $(shell git rev-parse --short HEAD)
  33. UDEFS += -DGIT_HASH=0x$(GIT_HASH)
  34. #
  35. # Platform
  36. #
  37. UINCDIR += src/sys
  38. SERIAL_CLI_PORT_NUMBER = 2
  39. CPPWARN := -Wundef -Wno-error=undef
  40. RELEASE_OPT = -Os -fomit-frame-pointer
  41. DEBUG_OPT = -Os -g3
  42. #USE_OPT = -flto
  43. include zubax_chibios/rules_stm32f105_107.mk