Advertisement
celem

Makefile works with SpenceKonde ATTinyCore

Jan 31st, 2017
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 2.82 KB | None | 0 0
  1. ### DISCLAIMER
  2. ### This Makefile is designed for use with the sudar Arduino.mk
  3. ### Refer to https://github.com/sudar/Arduino-Makefile
  4. ### Currently sudar version 1.5.2 (2017-01-11)
  5.  
  6. ### PROJECT_DIR
  7. ### This is the base path to where you have created/cloned your project
  8. PROJECT_DIR       = /home/username/Arduino
  9.  
  10. ### AVR_GCC_VERSION
  11. ### Check if the version is equal or higher than 4.9
  12. AVR_GCC_VERSION  := $(shell expr `avr-gcc -dumpversion | cut -f1` \>= 4.9)
  13.  
  14. ### ARDMK_DIR
  15. ### Path to the Arduino-Makefile directory.
  16. ARDMK_DIR         = $(PROJECT_DIR)/Arduino-Makefile
  17.  
  18. ### ARDUINO_DIR
  19. ### Path to the Arduino application and resources directory.
  20. ARDUINO_DIR       = /home/username/arduino-1.6.11
  21.  
  22. ### USER_LIB_PATH
  23. ### Path to where the your project's libraries are stored.
  24. USER_LIB_PATH     :=  $(realpath $(PROJECT_DIR)/lib)
  25.  
  26. ### BOARD_TAG & BOARD_SUB
  27. ### For Arduino IDE 1.0.x Only BOARD_TAG is needed.
  28. ### BOARD_TAG         = mega2560 (example)
  29. ### For Arduino IDE 1.6.x Both BOARD_TAG and BOARD_SUB are needed.
  30. ### They must be set to the board you are currently using.
  31. ### Note: for the Arduino Uno, only BOARD_TAG is mandatory
  32. ### BOARD_TAG         = mega (example)
  33. ### BOARD_SUB         = atmega2560 (example)
  34. BOARD_TAG         = attinyx5
  35. BOARD_SUB         = 85
  36. ### For ATTinyCore
  37. ALTERNATE_CORE    = ATTinyCore
  38. F_CPU=8000000L
  39.  
  40. ### MONITOR_BAUDRATE
  41. ### It must be set to Serial baudrate value you are using.
  42. MONITOR_BAUDRATE  = 115200
  43.  
  44. ### AVRDUDE
  45. ISP_PORT          = /dev/ttyS0
  46. AVRDUDE_ARD_PROGRAMMER = usbasp
  47. AVRDUDE_ARD_BAUDRATE = 9600
  48. ### Path to avrdude directory.
  49. AVRDUDE          = /usr/bin/avrdude
  50. ### Path to the AVR tools directory such as avr-gcc, avr-g++, etc.
  51. AVR_TOOLS_DIR     = /home/username/arduino-1.6.11/hardware/tools/avr
  52.  
  53. ### CFLAGS_STD
  54. ### Set the C standard to be used during compilation. Documentation (https://github.com/WeAreLeka/Arduino-Makefile/blob/std-flags/arduino-mk-vars.md#cflags_std)
  55. CFLAGS_STD        = -std=gnu11
  56.  
  57. ### CXXFLAGS_STD
  58. ### Set the C++ standard to be used during compilation. Documentation (https://github.com/WeAreLeka/Arduino-Makefile/blob/std-flags/arduino-mk-vars.md#cxxflags_std)
  59. CXXFLAGS_STD      = -std=gnu++11
  60.  
  61. ### CXXFLAGS
  62. ### Flags you might want to set for debugging purpose. Comment to stop.
  63. CXXFLAGS         += -pedantic -Wall -Wextra
  64.  
  65. ### MONITOR_PORT
  66. ### The port your board is connected to. Using an '*' tries all the ports and finds the right one.
  67. MONITOR_PORT      = /dev/ttyS0
  68.  
  69. ### CURRENT_DIR
  70. ### Do not touch - used for binaries path
  71. CURRENT_DIR       = $(shell basename $(CURDIR))
  72.  
  73. ### OBJDIR
  74. ### This is where you put the binaries you just compile using 'make'
  75. OBJDIR            = $(PROJECT_DIR)/$(CURRENT_DIR)/$(BOARD_TAG)/bin
  76.  
  77. ### Do not touch - the path to Arduino.mk, inside the ARDMK_DIR
  78. include $(ARDMK_DIR)/Arduino.mk
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement