2018-04-01 23:21:33 +00:00
|
|
|
# Marlin Firmware Arduino Project Makefile
|
2013-06-06 22:49:25 +00:00
|
|
|
#
|
2012-01-24 02:18:54 +00:00
|
|
|
# Makefile Based on:
|
|
|
|
# Arduino 0011 Makefile
|
|
|
|
# Arduino adaptation by mellis, eighthave, oli.keller
|
2012-11-11 10:05:52 +00:00
|
|
|
# Marlin adaption by Daid
|
2018-04-03 00:36:27 +00:00
|
|
|
# Marlin 2.0 support and RELOC_WORKAROUND by @marcio-ao
|
2012-01-24 02:18:54 +00:00
|
|
|
#
|
|
|
|
# This has been tested with Arduino 0022.
|
2013-06-06 22:49:25 +00:00
|
|
|
#
|
2012-01-24 02:18:54 +00:00
|
|
|
# This makefile allows you to build sketches from the command line
|
|
|
|
# without the Arduino environment (or Java).
|
|
|
|
#
|
|
|
|
# Detailed instructions for using the makefile:
|
|
|
|
#
|
2016-03-06 04:41:15 +00:00
|
|
|
# 1. Modify the line containing "ARDUINO_INSTALL_DIR" to point to the directory that
|
2020-05-22 20:40:15 +00:00
|
|
|
# contains the Arduino installation (for example, under macOS, this
|
2014-01-16 15:58:35 +00:00
|
|
|
# might be /Applications/Arduino.app/Contents/Resources/Java).
|
2012-01-24 02:18:54 +00:00
|
|
|
#
|
2012-11-11 10:05:52 +00:00
|
|
|
# 2. Modify the line containing "UPLOAD_PORT" to refer to the filename
|
2012-01-24 02:18:54 +00:00
|
|
|
# representing the USB or serial connection to your Arduino board
|
2012-11-11 10:05:52 +00:00
|
|
|
# (e.g. UPLOAD_PORT = /dev/tty.USB0). If the exact name of this file
|
2016-03-06 04:41:15 +00:00
|
|
|
# changes, you can use * as a wild card (e.g. UPLOAD_PORT = /dev/tty.usb*).
|
2012-01-24 02:18:54 +00:00
|
|
|
#
|
2020-10-08 23:40:54 +00:00
|
|
|
# 3. Set the line containing "MCU" to match your board's processor. Set
|
|
|
|
# "PROG_MCU" as the AVR part name corresponding to "MCU". You can use the
|
|
|
|
# following command to get a list of correspondences: `avrdude -c alf -p x`
|
|
|
|
# Older boards are atmega8 based, newer ones like Arduino Mini, Bluetooth
|
2012-01-24 02:18:54 +00:00
|
|
|
# or Diecimila have the atmega168. If you're using a LilyPad Arduino,
|
2012-03-07 23:05:10 +00:00
|
|
|
# change F_CPU to 8000000. If you are using Gen7 electronics, you
|
|
|
|
# probably need to use 20000000. Either way, you must regenerate
|
|
|
|
# the speed lookup table with create_speed_lookuptable.py.
|
2012-01-24 02:18:54 +00:00
|
|
|
#
|
|
|
|
# 4. Type "make" and press enter to compile/verify your program.
|
|
|
|
#
|
|
|
|
# 5. Type "make upload", reset your Arduino board, and press enter to
|
|
|
|
# upload your program to the Arduino board.
|
|
|
|
#
|
2020-10-08 23:40:54 +00:00
|
|
|
# Note that all settings at the top of this file can be overridden from
|
2016-08-31 20:10:53 +00:00
|
|
|
# the command line with, for example, "make HARDWARE_MOTHERBOARD=71"
|
|
|
|
#
|
|
|
|
# To compile for RAMPS (atmega2560) with Arduino 1.6.9 at root/arduino you would use...
|
|
|
|
#
|
|
|
|
# make ARDUINO_VERSION=10609 AVR_TOOLS_PATH=/root/arduino/hardware/tools/avr/bin/ \
|
2020-10-08 23:40:54 +00:00
|
|
|
# HARDWARE_MOTHERBOARD=1200 ARDUINO_INSTALL_DIR=/root/arduino
|
2016-08-31 20:10:53 +00:00
|
|
|
#
|
|
|
|
# To compile and upload simply add "upload" to the end of the line...
|
|
|
|
#
|
|
|
|
# make ARDUINO_VERSION=10609 AVR_TOOLS_PATH=/root/arduino/hardware/tools/avr/bin/ \
|
2020-10-08 23:40:54 +00:00
|
|
|
# HARDWARE_MOTHERBOARD=1200 ARDUINO_INSTALL_DIR=/root/arduino upload
|
2017-03-18 08:17:39 +00:00
|
|
|
#
|
2016-08-31 20:10:53 +00:00
|
|
|
# If uploading doesn't work try adding the parameter "AVRDUDE_PROGRAMMER=wiring" or
|
|
|
|
# start upload manually (using stk500) like so:
|
|
|
|
#
|
|
|
|
# avrdude -C /root/arduino/hardware/tools/avr/etc/avrdude.conf -v -p m2560 -c stk500 \
|
|
|
|
# -U flash:w:applet/Marlin.hex:i -P /dev/ttyUSB0
|
|
|
|
#
|
|
|
|
# Or, try disconnecting USB to power down and then reconnecting before running avrdude.
|
|
|
|
#
|
2012-01-24 02:18:54 +00:00
|
|
|
|
2016-08-31 20:10:53 +00:00
|
|
|
# This defines the board to compile for (see boards.h for your board's ID)
|
2020-10-08 23:40:54 +00:00
|
|
|
HARDWARE_MOTHERBOARD ?= 1020
|
|
|
|
|
|
|
|
ifeq ($(OS),Windows_NT)
|
|
|
|
# Windows
|
|
|
|
ARDUINO_INSTALL_DIR ?= ${HOME}/Arduino
|
|
|
|
ARDUINO_USER_DIR ?= ${HOME}/Arduino
|
|
|
|
else
|
|
|
|
UNAME_S := $(shell uname -s)
|
|
|
|
ifeq ($(UNAME_S),Linux)
|
|
|
|
# Linux
|
|
|
|
ARDUINO_INSTALL_DIR ?= /usr/share/arduino
|
|
|
|
ARDUINO_USER_DIR ?= ${HOME}/Arduino
|
|
|
|
endif
|
|
|
|
ifeq ($(UNAME_S),Darwin)
|
|
|
|
# Darwin (macOS)
|
|
|
|
ARDUINO_INSTALL_DIR ?= /Applications/Arduino.app/Contents/Java
|
|
|
|
ARDUINO_USER_DIR ?= ${HOME}/Documents/Arduino
|
|
|
|
AVR_TOOLS_PATH ?= /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/
|
|
|
|
endif
|
|
|
|
endif
|
2012-01-25 09:46:27 +00:00
|
|
|
|
2012-11-11 10:05:52 +00:00
|
|
|
# Arduino source install directory, and version number
|
2015-01-13 05:01:43 +00:00
|
|
|
# On most linuxes this will be /usr/share/arduino
|
2016-03-06 19:12:01 +00:00
|
|
|
ARDUINO_INSTALL_DIR ?= ${HOME}/Arduino
|
|
|
|
ARDUINO_VERSION ?= 106
|
2012-03-22 13:48:10 +00:00
|
|
|
|
2018-04-13 01:14:01 +00:00
|
|
|
# The installed Libraries are in the User folder
|
|
|
|
ARDUINO_USER_DIR ?= ${HOME}/Arduino
|
|
|
|
|
2020-10-08 23:40:54 +00:00
|
|
|
# You can optionally set a path to the avr-gcc tools.
|
|
|
|
# Requires a trailing slash. For example, /usr/local/avr-gcc/bin/
|
2013-06-06 22:49:25 +00:00
|
|
|
AVR_TOOLS_PATH ?=
|
2012-11-11 10:05:52 +00:00
|
|
|
|
2020-10-08 23:40:54 +00:00
|
|
|
# Programmer configuration
|
2016-03-06 19:12:01 +00:00
|
|
|
UPLOAD_RATE ?= 57600
|
|
|
|
AVRDUDE_PROGRAMMER ?= arduino
|
2020-10-08 23:40:54 +00:00
|
|
|
# On most linuxes this will be /dev/ttyACM0 or /dev/ttyACM1
|
2016-03-06 19:12:01 +00:00
|
|
|
UPLOAD_PORT ?= /dev/ttyUSB0
|
2012-11-11 10:05:52 +00:00
|
|
|
|
2020-10-08 23:40:54 +00:00
|
|
|
# Directory used to build files in, contains all the build files, from object
|
|
|
|
# files to the final hex file on linux it is best to put an absolute path
|
|
|
|
# like /home/username/tmp .
|
2012-11-11 10:05:52 +00:00
|
|
|
BUILD_DIR ?= applet
|
|
|
|
|
2013-07-24 10:09:53 +00:00
|
|
|
# This defines whether Liquid_TWI2 support will be built
|
2014-02-05 09:47:12 +00:00
|
|
|
LIQUID_TWI2 ?= 0
|
|
|
|
|
2020-10-08 23:40:54 +00:00
|
|
|
# This defines if Wire is needed
|
2014-02-05 09:47:12 +00:00
|
|
|
WIRE ?= 0
|
2013-07-24 10:09:53 +00:00
|
|
|
|
2020-10-08 23:40:54 +00:00
|
|
|
# This defines if Tone is needed (i.e SPEAKER is defined in Configuration.h)
|
|
|
|
# Disabling this (and SPEAKER) saves approximatively 350 bytes of memory.
|
|
|
|
TONE ?= 1
|
|
|
|
|
|
|
|
# This defines if U8GLIB is needed (may require RELOC_WORKAROUND)
|
|
|
|
U8GLIB ?= 0
|
2017-07-27 13:46:27 +00:00
|
|
|
|
2020-10-08 23:40:54 +00:00
|
|
|
# This defines whether to include the Trinamic TMCStepper library
|
|
|
|
TMC ?= 0
|
2018-04-03 00:36:27 +00:00
|
|
|
|
2020-10-08 23:40:54 +00:00
|
|
|
# This defines whether to include the AdaFruit NeoPixel library
|
2019-11-24 12:08:05 +00:00
|
|
|
NEOPIXEL ?= 0
|
|
|
|
|
2018-04-03 00:36:27 +00:00
|
|
|
############
|
|
|
|
# Try to automatically determine whether RELOC_WORKAROUND is needed based
|
|
|
|
# on GCC versions:
|
2020-07-23 03:20:14 +00:00
|
|
|
# https://www.avrfreaks.net/comment/1789106#comment-1789106
|
2018-04-03 00:36:27 +00:00
|
|
|
|
|
|
|
CC_MAJ:=$(shell $(CC) -dM -E - < /dev/null | grep __GNUC__ | cut -f3 -d\ )
|
|
|
|
CC_MIN:=$(shell $(CC) -dM -E - < /dev/null | grep __GNUC_MINOR__ | cut -f3 -d\ )
|
|
|
|
CC_PATCHLEVEL:=$(shell $(CC) -dM -E - < /dev/null | grep __GNUC_PATCHLEVEL__ | cut -f3 -d\ )
|
|
|
|
CC_VER:=$(shell echo $$(( $(CC_MAJ) * 10000 + $(CC_MIN) * 100 + $(CC_PATCHLEVEL) )))
|
|
|
|
ifeq ($(shell test $(CC_VER) -lt 40901 && echo 1),1)
|
|
|
|
@echo This version of GCC is likely broken. Enabling relocation workaround.
|
2018-10-05 21:06:11 +00:00
|
|
|
RELOC_WORKAROUND = 1
|
2018-04-03 00:36:27 +00:00
|
|
|
endif
|
2017-07-27 13:46:27 +00:00
|
|
|
|
2012-11-11 10:05:52 +00:00
|
|
|
############################################################################
|
|
|
|
# Below here nothing should be changed...
|
|
|
|
|
|
|
|
# Here the Arduino variant is selected by the board type
|
|
|
|
# HARDWARE_VARIANT = "arduino", "Sanguino", "Gen7", ...
|
|
|
|
# MCU = "atmega1280", "Mega2560", "atmega2560", "atmega644p", ...
|
|
|
|
|
2018-04-20 21:09:52 +00:00
|
|
|
ifeq ($(HARDWARE_MOTHERBOARD),0)
|
2012-11-11 10:05:52 +00:00
|
|
|
|
2018-04-20 21:09:52 +00:00
|
|
|
# No motherboard selected
|
2018-04-01 23:21:33 +00:00
|
|
|
|
2018-04-20 21:09:52 +00:00
|
|
|
#
|
|
|
|
# RAMPS 1.3 / 1.4 - ATmega1280, ATmega2560
|
|
|
|
#
|
2012-11-11 10:05:52 +00:00
|
|
|
|
2018-04-20 21:09:52 +00:00
|
|
|
# MEGA/RAMPS up to 1.2
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1000)
|
2018-04-20 21:09:52 +00:00
|
|
|
|
|
|
|
# RAMPS 1.3 (Power outputs: Hotend, Fan, Bed)
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1010)
|
2018-04-20 21:09:52 +00:00
|
|
|
# RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Bed)
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1011)
|
2018-04-20 21:09:52 +00:00
|
|
|
# RAMPS 1.3 (Power outputs: Hotend, Fan0, Fan1)
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1012)
|
2018-04-20 21:09:52 +00:00
|
|
|
# RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Fan)
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1013)
|
2018-04-20 21:09:52 +00:00
|
|
|
# RAMPS 1.3 (Power outputs: Spindle, Controller Fan)
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1014)
|
2018-04-20 21:09:52 +00:00
|
|
|
|
|
|
|
# RAMPS 1.4 (Power outputs: Hotend, Fan, Bed)
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1020)
|
2018-04-20 21:09:52 +00:00
|
|
|
# RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Bed)
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1021)
|
2018-04-20 21:09:52 +00:00
|
|
|
# RAMPS 1.4 (Power outputs: Hotend, Fan0, Fan1)
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1022)
|
2018-04-20 21:09:52 +00:00
|
|
|
# RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Fan)
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1023)
|
2018-04-20 21:09:52 +00:00
|
|
|
# RAMPS 1.4 (Power outputs: Spindle, Controller Fan)
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1024)
|
2018-04-20 21:09:52 +00:00
|
|
|
|
|
|
|
# RAMPS Plus 3DYMY (Power outputs: Hotend, Fan, Bed)
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1030)
|
2018-04-20 21:09:52 +00:00
|
|
|
# RAMPS Plus 3DYMY (Power outputs: Hotend0, Hotend1, Bed)
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1031)
|
2018-04-20 21:09:52 +00:00
|
|
|
# RAMPS Plus 3DYMY (Power outputs: Hotend, Fan0, Fan1)
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1032)
|
2018-04-20 21:09:52 +00:00
|
|
|
# RAMPS Plus 3DYMY (Power outputs: Hotend0, Hotend1, Fan)
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1033)
|
2018-04-20 21:09:52 +00:00
|
|
|
# RAMPS Plus 3DYMY (Power outputs: Spindle, Controller Fan)
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1034)
|
2018-04-01 23:21:33 +00:00
|
|
|
|
2018-04-20 21:09:52 +00:00
|
|
|
#
|
|
|
|
# RAMPS Derivatives - ATmega1280, ATmega2560
|
|
|
|
#
|
|
|
|
|
|
|
|
# 3Drag Controller
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1100)
|
2018-04-20 21:09:52 +00:00
|
|
|
# Velleman K8200 Controller (derived from 3Drag Controller)
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1101)
|
2018-04-20 21:09:52 +00:00
|
|
|
# Velleman K8400 Controller (derived from 3Drag Controller)
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1102)
|
2020-09-10 22:06:37 +00:00
|
|
|
# Velleman K8600 Controller (Vertex Nano)
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1103)
|
2020-09-10 22:06:37 +00:00
|
|
|
# Velleman K8800 Controller (Vertex Delta)
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1104)
|
2020-09-10 22:06:37 +00:00
|
|
|
# 2PrintBeta BAM&DICE with STK drivers
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1105)
|
2020-09-10 22:06:37 +00:00
|
|
|
# 2PrintBeta BAM&DICE Due with STK drivers
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1106)
|
2020-09-10 22:06:37 +00:00
|
|
|
# MKS BASE v1.0
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1107)
|
2020-09-10 22:06:37 +00:00
|
|
|
# MKS v1.4 with A4982 stepper drivers
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1108)
|
2020-09-10 22:06:37 +00:00
|
|
|
# MKS v1.5 with Allegro A4982 stepper drivers
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1109)
|
2020-09-10 22:06:37 +00:00
|
|
|
# MKS v1.6 with Allegro A4982 stepper drivers
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1110)
|
2020-09-10 22:06:37 +00:00
|
|
|
# MKS BASE 1.0 with Heroic HR4982 stepper drivers
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1111)
|
2020-09-10 22:06:37 +00:00
|
|
|
# MKS GEN v1.3 or 1.4
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1112)
|
2020-09-10 22:06:37 +00:00
|
|
|
# MKS GEN L
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1113)
|
2021-03-29 08:32:34 +00:00
|
|
|
# zrib V2.0 control board (Chinese RAMPS replica)
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1114)
|
2020-09-10 22:06:37 +00:00
|
|
|
# BigTreeTech or BIQU KFB2.0
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1115)
|
2020-09-10 22:06:37 +00:00
|
|
|
# Felix 2.0+ Electronics Board (RAMPS like)
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1116)
|
2020-09-10 22:06:37 +00:00
|
|
|
# Invent-A-Part RigidBoard
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1117)
|
2020-09-10 22:06:37 +00:00
|
|
|
# Invent-A-Part RigidBoard V2
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1118)
|
2020-09-10 22:06:37 +00:00
|
|
|
# Sainsmart 2-in-1 board
|
2020-02-05 05:21:05 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1119)
|
2020-09-10 22:06:37 +00:00
|
|
|
# Ultimaker
|
2020-06-12 01:43:28 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1120)
|
2020-09-10 22:06:37 +00:00
|
|
|
# Ultimaker (Older electronics. Pre 1.5.4. This is rare)
|
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1121)
|
2020-10-08 23:40:54 +00:00
|
|
|
MCU ?= atmega1280
|
|
|
|
PROG_MCU ?= m1280
|
2019-01-20 05:41:19 +00:00
|
|
|
|
2018-04-20 21:09:52 +00:00
|
|
|
# Azteeg X3
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1122)
|
2020-09-10 22:06:37 +00:00
|
|
|
# Azteeg X3 Pro
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1123)
|
2020-09-10 22:06:37 +00:00
|
|
|
# Ultimainboard 2.x (Uses TEMP_SENSOR 20)
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1124)
|
2020-09-10 22:06:37 +00:00
|
|
|
# Rumba
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1125)
|
2020-09-10 22:06:37 +00:00
|
|
|
# Raise3D Rumba
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1126)
|
2020-09-10 22:06:37 +00:00
|
|
|
# Rapide Lite RL200 Rumba
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1127)
|
2020-09-10 22:06:37 +00:00
|
|
|
# Formbot T-Rex 2 Plus
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1128)
|
2020-09-10 22:06:37 +00:00
|
|
|
# Formbot T-Rex 3
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1129)
|
2020-09-10 22:06:37 +00:00
|
|
|
# Formbot Raptor
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1130)
|
2020-09-10 22:06:37 +00:00
|
|
|
# Formbot Raptor 2
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1131)
|
2020-09-10 22:06:37 +00:00
|
|
|
# bq ZUM Mega 3D
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1132)
|
2020-09-10 22:06:37 +00:00
|
|
|
# MakeBoard Mini v2.1.2 is a control board sold by MicroMake
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1133)
|
2020-09-10 22:06:37 +00:00
|
|
|
# TriGorilla Anycubic version 1.3 based on RAMPS EFB
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1134)
|
2020-09-10 22:06:37 +00:00
|
|
|
# TriGorilla Anycubic version 1.4 based on RAMPS EFB
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1135)
|
2020-09-10 22:06:37 +00:00
|
|
|
# TriGorilla Anycubic version 1.4 Rev 1.1
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1136)
|
2020-09-10 22:06:37 +00:00
|
|
|
# Creality: Ender-4, CR-8
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1137)
|
2020-09-10 22:06:37 +00:00
|
|
|
# Creality: CR10S, CR20, CR-X
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1138)
|
2020-09-10 22:06:37 +00:00
|
|
|
# Dagoma F5
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1139)
|
2020-09-10 22:06:37 +00:00
|
|
|
# FYSETC F6 1.3
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1140)
|
2020-09-10 22:06:37 +00:00
|
|
|
# FYSETC F6 1.5
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1141)
|
2020-09-10 22:06:37 +00:00
|
|
|
# Duplicator i3 Plus
|
2019-08-01 02:15:36 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1142)
|
2020-09-10 22:06:37 +00:00
|
|
|
# VORON
|
2019-08-01 02:15:36 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1143)
|
2020-09-10 22:06:37 +00:00
|
|
|
# TRONXY V3 1.0
|
2019-08-10 16:18:27 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1144)
|
2020-09-10 22:06:37 +00:00
|
|
|
# Z-Bolt X Series
|
2019-08-21 15:36:15 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1145)
|
2020-09-10 22:06:37 +00:00
|
|
|
# TT OSCAR
|
2019-11-07 08:14:40 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1146)
|
2020-09-10 22:06:37 +00:00
|
|
|
# Overlord/Overlord Pro
|
2019-11-07 08:14:40 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1147)
|
2020-09-10 22:06:37 +00:00
|
|
|
# ADIMLab Gantry v1
|
2020-02-05 05:21:05 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1148)
|
2020-09-10 22:06:37 +00:00
|
|
|
# ADIMLab Gantry v2
|
2020-02-05 05:21:05 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1149)
|
2020-09-10 22:06:37 +00:00
|
|
|
# BIQU Tango V1
|
2020-03-17 20:25:10 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1150)
|
2020-09-10 22:06:37 +00:00
|
|
|
# MKS GEN L V2
|
2020-06-12 01:43:28 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1151)
|
2020-09-10 22:06:37 +00:00
|
|
|
# MKS GEN L V2.1
|
2020-06-12 01:43:28 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1152)
|
2020-09-10 22:06:37 +00:00
|
|
|
# Copymaster 3D
|
2020-06-12 01:43:28 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1153)
|
2020-09-10 22:06:37 +00:00
|
|
|
# Ortur 4
|
2020-09-10 02:48:42 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1154)
|
2020-09-10 22:06:37 +00:00
|
|
|
# Tenlog D3 Hero
|
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1155)
|
2012-11-11 10:05:52 +00:00
|
|
|
|
2019-07-11 07:32:24 +00:00
|
|
|
#
|
|
|
|
# RAMBo and derivatives
|
|
|
|
#
|
|
|
|
|
|
|
|
# Rambo
|
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1200)
|
|
|
|
# Mini-Rambo
|
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1201)
|
|
|
|
# Mini-Rambo 1.0a
|
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1202)
|
|
|
|
# Einsy Rambo
|
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1203)
|
|
|
|
# Einsy Retro
|
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1204)
|
|
|
|
# abee Scoovo X9H
|
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1205)
|
2021-02-25 15:14:24 +00:00
|
|
|
# Rambo ThinkerV2
|
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1206)
|
2019-07-11 07:32:24 +00:00
|
|
|
|
2018-04-20 21:09:52 +00:00
|
|
|
#
|
|
|
|
# Other ATmega1280, ATmega2560
|
|
|
|
#
|
|
|
|
|
|
|
|
# Cartesio CN Controls V11
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1300)
|
2018-04-20 21:09:52 +00:00
|
|
|
# Cartesio CN Controls V12
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1301)
|
2019-08-20 08:40:48 +00:00
|
|
|
# Cartesio CN Controls V15
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1302)
|
2019-08-20 08:40:48 +00:00
|
|
|
# Cheaptronic v1.0
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1303)
|
2019-08-20 08:40:48 +00:00
|
|
|
# Cheaptronic v2.0
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1304)
|
2019-08-20 08:40:48 +00:00
|
|
|
# Makerbot Mightyboard Revision E
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1305)
|
2019-08-20 08:40:48 +00:00
|
|
|
# Megatronics
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1306)
|
2019-08-20 08:40:48 +00:00
|
|
|
# Megatronics v2.0
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1307)
|
2019-08-20 08:40:48 +00:00
|
|
|
# Megatronics v3.0
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1308)
|
2019-08-20 08:40:48 +00:00
|
|
|
# Megatronics v3.1
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1309)
|
2019-08-20 08:40:48 +00:00
|
|
|
# Megatronics v3.2
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1310)
|
2019-08-20 08:40:48 +00:00
|
|
|
# Elefu Ra Board (v3)
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1311)
|
2019-08-20 08:40:48 +00:00
|
|
|
# Leapfrog
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1312)
|
2019-08-20 08:40:48 +00:00
|
|
|
# Mega controller
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1313)
|
2019-08-20 08:40:48 +00:00
|
|
|
# Geeetech GT2560 Rev B for Mecreator2
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1314)
|
2019-08-20 08:40:48 +00:00
|
|
|
# Geeetech GT2560 Rev. A
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1315)
|
2019-08-20 08:40:48 +00:00
|
|
|
# Geeetech GT2560 Rev. A+ (with auto level probe)
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1316)
|
2019-08-20 08:40:48 +00:00
|
|
|
# Geeetech GT2560 Rev B for A10(M/D)
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1317)
|
2019-08-20 08:40:48 +00:00
|
|
|
# Geeetech GT2560 Rev B for A20(M/D)
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1318)
|
2019-08-20 08:40:48 +00:00
|
|
|
# Einstart retrofit
|
2019-07-11 09:36:51 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1319)
|
2019-08-20 08:40:48 +00:00
|
|
|
# Wanhao 0ne+ i3 Mini
|
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1320)
|
2018-04-20 21:09:52 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# ATmega1281, ATmega2561
|
|
|
|
#
|
|
|
|
|
2019-08-01 02:15:36 +00:00
|
|
|
# Minitronics v1.0/1.1
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1400)
|
2018-10-05 21:06:11 +00:00
|
|
|
MCU ?= atmega1281
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= m1281
|
2019-08-01 02:15:36 +00:00
|
|
|
# Silvergate v1.0
|
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1401)
|
2018-10-05 21:06:11 +00:00
|
|
|
MCU ?= atmega1281
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= m1281
|
2018-04-20 21:09:52 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Sanguinololu and Derivatives - ATmega644P, ATmega1284P
|
|
|
|
#
|
|
|
|
|
|
|
|
# Sanguinololu < 1.2
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1500)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= Sanguino
|
|
|
|
MCU ?= atmega644p
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= m644p
|
2018-04-20 21:09:52 +00:00
|
|
|
# Sanguinololu 1.2 and above
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1501)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= Sanguino
|
|
|
|
MCU ?= atmega644p
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= m644p
|
2018-04-20 21:09:52 +00:00
|
|
|
# Melzi
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1502)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= Sanguino
|
|
|
|
MCU ?= atmega644p
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= m644p
|
2020-06-05 00:55:39 +00:00
|
|
|
# Melzi V2.0
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1503)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= Sanguino
|
|
|
|
MCU ?= atmega1284p
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= m1284p
|
2020-06-05 00:55:39 +00:00
|
|
|
# Melzi with ATmega1284 (MaKr3d version)
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1504)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= Sanguino
|
|
|
|
MCU ?= atmega1284p
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= m1284p
|
2020-06-05 00:55:39 +00:00
|
|
|
# Melzi Creality3D board (for CR-10 etc)
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1505)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= Sanguino
|
|
|
|
MCU ?= atmega1284p
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= m1284p
|
2020-06-05 00:55:39 +00:00
|
|
|
# Melzi Malyan M150 board
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1506)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= Sanguino
|
|
|
|
MCU ?= atmega1284p
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= m1284p
|
2020-06-05 00:55:39 +00:00
|
|
|
# Tronxy X5S
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1507)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= Sanguino
|
|
|
|
MCU ?= atmega1284p
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= m1284p
|
2020-06-05 00:55:39 +00:00
|
|
|
# STB V1.1
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1508)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= Sanguino
|
|
|
|
MCU ?= atmega1284p
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= m1284p
|
2020-06-05 00:55:39 +00:00
|
|
|
# Azteeg X1
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1509)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= Sanguino
|
|
|
|
MCU ?= atmega1284p
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= m1284p
|
2020-06-05 00:55:39 +00:00
|
|
|
# Anet 1.0 (Melzi clone)
|
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1510)
|
|
|
|
HARDWARE_VARIANT ?= Sanguino
|
|
|
|
MCU ?= atmega1284p
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= m1284p
|
2018-04-20 21:09:52 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Other ATmega644P, ATmega644, ATmega1284P
|
|
|
|
#
|
|
|
|
|
|
|
|
# Gen3 Monolithic Electronics
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1600)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= Sanguino
|
|
|
|
MCU ?= atmega644p
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= m644p
|
2018-04-20 21:09:52 +00:00
|
|
|
# Gen3+
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1601)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= Sanguino
|
|
|
|
MCU ?= atmega644p
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= m644p
|
2018-04-20 21:09:52 +00:00
|
|
|
# Gen6
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1602)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= Gen6
|
|
|
|
MCU ?= atmega644p
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= m644p
|
2018-04-20 21:09:52 +00:00
|
|
|
# Gen6 deluxe
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1603)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= Gen6
|
|
|
|
MCU ?= atmega644p
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= m644p
|
2018-04-20 21:09:52 +00:00
|
|
|
# Gen7 custom (Alfons3 Version)
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1604)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= Gen7
|
|
|
|
MCU ?= atmega644
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= m644
|
2018-10-05 21:06:11 +00:00
|
|
|
F_CPU ?= 20000000
|
2018-04-20 21:09:52 +00:00
|
|
|
# Gen7 v1.1, v1.2
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1605)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= Gen7
|
|
|
|
MCU ?= atmega644p
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= m644p
|
2018-10-05 21:06:11 +00:00
|
|
|
F_CPU ?= 20000000
|
2018-04-20 21:09:52 +00:00
|
|
|
# Gen7 v1.3
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1606)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= Gen7
|
|
|
|
MCU ?= atmega644p
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= m644p
|
2018-10-05 21:06:11 +00:00
|
|
|
F_CPU ?= 20000000
|
2018-04-20 21:09:52 +00:00
|
|
|
# Gen7 v1.4
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1607)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= Gen7
|
|
|
|
MCU ?= atmega1284p
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= m1284p
|
2018-10-05 21:06:11 +00:00
|
|
|
F_CPU ?= 20000000
|
2018-04-20 21:09:52 +00:00
|
|
|
# Alpha OMCA board
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1608)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= SanguinoA
|
|
|
|
MCU ?= atmega644
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= m644
|
2018-04-20 21:09:52 +00:00
|
|
|
# Final OMCA board
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1609)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= Sanguino
|
|
|
|
MCU ?= atmega644p
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= m644p
|
2018-04-20 21:09:52 +00:00
|
|
|
# Sethi 3D_1
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1610)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= Sanguino
|
|
|
|
MCU ?= atmega644p
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= m644p
|
2012-11-11 10:05:52 +00:00
|
|
|
|
2018-04-20 21:09:52 +00:00
|
|
|
#
|
|
|
|
# Teensyduino - AT90USB1286, AT90USB1286P
|
|
|
|
#
|
2018-04-01 23:21:33 +00:00
|
|
|
|
2018-04-20 21:09:52 +00:00
|
|
|
# Teensylu
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1700)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= Teensy
|
|
|
|
MCU ?= at90usb1286
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= usb1286
|
2018-04-20 21:09:52 +00:00
|
|
|
# Printrboard (AT90USB1286)
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1701)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= Teensy
|
|
|
|
MCU ?= at90usb1286
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= usb1286
|
2018-04-20 21:09:52 +00:00
|
|
|
# Printrboard Revision F (AT90USB1286)
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1702)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= Teensy
|
|
|
|
MCU ?= at90usb1286
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= usb1286
|
2018-04-20 21:09:52 +00:00
|
|
|
# Brainwave (AT90USB646)
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1703)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= Teensy
|
|
|
|
MCU ?= at90usb646
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= usb646
|
2018-04-20 21:09:52 +00:00
|
|
|
# Brainwave Pro (AT90USB1286)
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1704)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= Teensy
|
|
|
|
MCU ?= at90usb1286
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= usb1286
|
2018-04-20 21:09:52 +00:00
|
|
|
# SAV Mk-I (AT90USB1286)
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1705)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= Teensy
|
|
|
|
MCU ?= at90usb1286
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= usb1286
|
2018-04-20 21:09:52 +00:00
|
|
|
# Teensy++2.0 (AT90USB1286)
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1706)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= Teensy
|
|
|
|
MCU ?= at90usb1286
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= usb1286
|
2018-04-20 21:09:52 +00:00
|
|
|
# 5DPrint D8 Driver Board
|
2019-07-11 07:32:24 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),1707)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= Teensy
|
|
|
|
MCU ?= at90usb1286
|
2020-10-08 23:40:54 +00:00
|
|
|
PROG_MCU ?= usb1286
|
2018-10-05 21:06:11 +00:00
|
|
|
|
2018-11-14 06:27:39 +00:00
|
|
|
# UltiMachine Archim1 (with DRV8825 drivers)
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),3023)
|
2018-11-14 06:27:39 +00:00
|
|
|
HARDWARE_VARIANT ?= archim
|
|
|
|
MCPU = cortex-m3
|
2020-10-08 23:40:54 +00:00
|
|
|
F_CPU = 84000000
|
2018-11-14 06:27:39 +00:00
|
|
|
IS_MCU = 0
|
2018-10-05 21:06:11 +00:00
|
|
|
# UltiMachine Archim2 (with TMC2130 drivers)
|
2019-07-01 11:58:14 +00:00
|
|
|
else ifeq ($(HARDWARE_MOTHERBOARD),3024)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_VARIANT ?= archim
|
|
|
|
MCPU = cortex-m3
|
2020-10-08 23:40:54 +00:00
|
|
|
F_CPU = 84000000
|
2018-10-05 21:06:11 +00:00
|
|
|
IS_MCU = 0
|
2012-11-11 10:05:52 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
# Be sure to regenerate speed_lookuptable.h with create_speed_lookuptable.py
|
|
|
|
# if you are setting this to something other than 16MHz
|
2020-10-08 23:40:54 +00:00
|
|
|
# Do not put the UL suffix, it's done later on.
|
2012-11-11 10:05:52 +00:00
|
|
|
# Set to 16Mhz if not yet set.
|
|
|
|
F_CPU ?= 16000000
|
2012-03-22 13:48:10 +00:00
|
|
|
|
2018-10-05 21:06:11 +00:00
|
|
|
# Set to microcontroller if IS_MCU not yet set
|
|
|
|
IS_MCU ?= 1
|
|
|
|
|
|
|
|
ifeq ($(IS_MCU),1)
|
|
|
|
# Set to arduino, ATmega2560 if not yet set.
|
|
|
|
HARDWARE_VARIANT ?= arduino
|
2020-10-08 23:40:54 +00:00
|
|
|
MCU ?= atmega2560
|
|
|
|
PROG_MCU ?= m2560
|
2018-10-05 21:06:11 +00:00
|
|
|
|
|
|
|
TOOL_PREFIX = avr
|
|
|
|
MCU_FLAGS = -mmcu=$(MCU)
|
|
|
|
SIZE_FLAGS = --mcu=$(MCU) -C
|
|
|
|
else
|
|
|
|
TOOL_PREFIX = arm-none-eabi
|
|
|
|
CPU_FLAGS = -mthumb -mcpu=$(MCPU)
|
|
|
|
SIZE_FLAGS = -A
|
|
|
|
endif
|
2018-04-20 21:09:52 +00:00
|
|
|
|
2016-03-06 04:41:15 +00:00
|
|
|
# Arduino contained the main source code for the Arduino
|
2012-03-22 13:48:10 +00:00
|
|
|
# Libraries, the "hardware variant" are for boards
|
|
|
|
# that derives from that, and their source are present in
|
|
|
|
# the main Marlin source directory
|
2012-12-13 10:41:27 +00:00
|
|
|
|
2012-01-25 09:46:27 +00:00
|
|
|
TARGET = $(notdir $(CURDIR))
|
|
|
|
|
2012-03-22 13:48:10 +00:00
|
|
|
# VPATH tells make to look into these directory for source files,
|
|
|
|
# there is no need to specify explicit pathnames as long as the
|
|
|
|
# directory is added here
|
|
|
|
|
2018-04-03 00:36:27 +00:00
|
|
|
# The Makefile for previous versions of Marlin used VPATH for all
|
|
|
|
# source files, but for Marlin 2.0, we use VPATH only for arduino
|
|
|
|
# library files.
|
|
|
|
|
2012-03-22 13:48:10 +00:00
|
|
|
VPATH = .
|
2012-11-11 10:05:52 +00:00
|
|
|
VPATH += $(BUILD_DIR)
|
2018-04-13 01:14:01 +00:00
|
|
|
VPATH += $(HARDWARE_SRC)
|
|
|
|
|
|
|
|
ifeq ($(HARDWARE_VARIANT), $(filter $(HARDWARE_VARIANT),arduino Teensy Sanguino))
|
2020-10-08 23:40:54 +00:00
|
|
|
# Old libraries (avr-core 1.6.21 < / Arduino < 1.6.8)
|
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI
|
|
|
|
# New libraries (avr-core >= 1.6.21 / Arduino >= 1.6.8)
|
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI/src
|
2018-04-13 01:14:01 +00:00
|
|
|
endif
|
|
|
|
|
2018-10-05 21:06:11 +00:00
|
|
|
ifeq ($(IS_MCU),1)
|
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/cores/arduino
|
|
|
|
|
2020-10-08 23:40:54 +00:00
|
|
|
# Old libraries (avr-core 1.6.21 < / Arduino < 1.6.8)
|
2018-10-05 21:06:11 +00:00
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI
|
2020-10-08 23:40:54 +00:00
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SoftwareSerial
|
|
|
|
# New libraries (avr-core >= 1.6.21 / Arduino >= 1.6.8)
|
2018-10-05 21:06:11 +00:00
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI/src
|
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SoftwareSerial/src
|
|
|
|
endif
|
2017-03-08 03:11:21 +00:00
|
|
|
|
2016-08-31 20:10:53 +00:00
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidCrystal/src
|
2020-10-08 23:40:54 +00:00
|
|
|
|
2013-07-24 10:09:53 +00:00
|
|
|
ifeq ($(LIQUID_TWI2), 1)
|
2020-10-08 23:40:54 +00:00
|
|
|
WIRE = 1
|
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidTWI2
|
2013-07-24 10:09:53 +00:00
|
|
|
endif
|
2014-02-05 09:47:12 +00:00
|
|
|
ifeq ($(WIRE), 1)
|
2020-10-08 23:40:54 +00:00
|
|
|
# Old libraries (avr-core 1.6.21 / Arduino < 1.6.8)
|
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/Wire
|
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/Wire/utility
|
|
|
|
# New libraries (avr-core >= 1.6.21 / Arduino >= 1.6.8)
|
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/Wire/src
|
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/Wire/src/utility
|
2014-02-05 09:47:12 +00:00
|
|
|
endif
|
2017-07-13 15:01:21 +00:00
|
|
|
ifeq ($(NEOPIXEL), 1)
|
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Adafruit_NeoPixel
|
|
|
|
endif
|
2017-07-27 13:46:27 +00:00
|
|
|
ifeq ($(U8GLIB), 1)
|
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/U8glib
|
2018-10-05 21:06:11 +00:00
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/U8glib/csrc
|
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/U8glib/cppsrc
|
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/U8glib/fntsrc
|
2018-04-03 00:36:27 +00:00
|
|
|
endif
|
2018-10-05 21:06:11 +00:00
|
|
|
ifeq ($(TMC), 1)
|
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/TMCStepper/src
|
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/TMCStepper/src/source
|
2017-07-27 13:46:27 +00:00
|
|
|
endif
|
2017-03-08 03:11:21 +00:00
|
|
|
|
2012-11-24 10:46:31 +00:00
|
|
|
ifeq ($(HARDWARE_VARIANT), arduino)
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_SUB_VARIANT ?= mega
|
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/variants/$(HARDWARE_SUB_VARIANT)
|
|
|
|
else ifeq ($(HARDWARE_VARIANT), Sanguino)
|
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/marlin/avr/variants/sanguino
|
|
|
|
else ifeq ($(HARDWARE_VARIANT), archim)
|
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/system/libsam
|
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/system/CMSIS/CMSIS/Include/
|
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/system/CMSIS/Device/ATMEL/
|
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/cores/arduino
|
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/cores/arduino/avr
|
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/cores/arduino/USB
|
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/libraries/Wire/src
|
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/libraries/SPI/src
|
2018-11-18 04:21:44 +00:00
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/libraries/U8glib/src/clib
|
2018-10-05 21:06:11 +00:00
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/variants/archim
|
|
|
|
LDSCRIPT = $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/variants/archim/linker_scripts/gcc/flash.ld
|
|
|
|
LDLIBS = $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/variants/archim/libsam_sam3x8e_gcc_rel.a
|
2016-03-06 19:12:01 +00:00
|
|
|
else
|
2018-10-05 21:06:11 +00:00
|
|
|
HARDWARE_SUB_VARIANT ?= standard
|
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/$(HARDWARE_VARIANT)/variants/$(HARDWARE_SUB_VARIANT)
|
2016-03-06 19:12:01 +00:00
|
|
|
endif
|
2018-10-05 21:06:11 +00:00
|
|
|
|
2018-04-03 00:36:27 +00:00
|
|
|
LIB_SRC = wiring.c \
|
2018-10-05 21:06:11 +00:00
|
|
|
wiring_analog.c wiring_digital.c \
|
|
|
|
wiring_shift.c WInterrupts.c hooks.c
|
|
|
|
|
|
|
|
ifeq ($(HARDWARE_VARIANT), archim)
|
|
|
|
LIB_ASRC += wiring_pulse_asm.S
|
|
|
|
else
|
|
|
|
LIB_SRC += wiring_pulse.c
|
|
|
|
endif
|
2017-12-20 05:44:32 +00:00
|
|
|
|
2014-01-16 15:58:35 +00:00
|
|
|
ifeq ($(HARDWARE_VARIANT), Teensy)
|
2018-10-05 21:06:11 +00:00
|
|
|
LIB_SRC = wiring.c
|
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/teensy/cores/teensy
|
2014-01-16 15:58:35 +00:00
|
|
|
endif
|
2017-12-20 05:44:32 +00:00
|
|
|
|
2018-10-05 21:06:11 +00:00
|
|
|
LIB_CXXSRC = WMath.cpp WString.cpp Print.cpp SPI.cpp
|
2017-12-20 05:44:32 +00:00
|
|
|
|
2017-07-13 15:01:21 +00:00
|
|
|
ifeq ($(NEOPIXEL), 1)
|
2018-10-05 21:06:11 +00:00
|
|
|
LIB_CXXSRC += Adafruit_NeoPixel.cpp
|
2017-07-13 15:01:21 +00:00
|
|
|
endif
|
2017-12-20 05:44:32 +00:00
|
|
|
|
2013-07-24 10:09:53 +00:00
|
|
|
ifeq ($(LIQUID_TWI2), 0)
|
2018-10-05 21:06:11 +00:00
|
|
|
LIB_CXXSRC += LiquidCrystal.cpp
|
2013-07-24 10:09:53 +00:00
|
|
|
else
|
2018-10-05 21:06:11 +00:00
|
|
|
LIB_SRC += twi.c
|
|
|
|
LIB_CXXSRC += Wire.cpp LiquidTWI2.cpp
|
2013-07-24 10:09:53 +00:00
|
|
|
endif
|
2012-11-24 10:46:31 +00:00
|
|
|
|
2014-02-05 09:47:12 +00:00
|
|
|
ifeq ($(WIRE), 1)
|
2018-10-05 21:06:11 +00:00
|
|
|
LIB_SRC += twi.c
|
|
|
|
LIB_CXXSRC += Wire.cpp
|
2014-02-05 09:47:12 +00:00
|
|
|
endif
|
|
|
|
|
2020-10-08 23:40:54 +00:00
|
|
|
ifeq ($(TONE), 1)
|
|
|
|
LIB_CXXSRC += Tone.cpp
|
|
|
|
endif
|
|
|
|
|
2017-07-27 13:46:27 +00:00
|
|
|
ifeq ($(U8GLIB), 1)
|
2018-10-05 21:06:11 +00:00
|
|
|
LIB_CXXSRC += U8glib.cpp
|
2020-10-08 23:40:54 +00:00
|
|
|
LIB_SRC += u8g_ll_api.c u8g_bitmap.c u8g_clip.c u8g_com_null.c u8g_delay.c \
|
|
|
|
u8g_page.c u8g_pb.c u8g_pb16h1.c u8g_rect.c u8g_state.c u8g_font.c \
|
|
|
|
u8g_font_6x13.c u8g_font_04b_03.c u8g_font_5x8.c
|
2018-04-03 00:36:27 +00:00
|
|
|
endif
|
|
|
|
|
2018-10-05 21:06:11 +00:00
|
|
|
ifeq ($(TMC), 1)
|
2020-10-08 23:40:54 +00:00
|
|
|
LIB_CXXSRC += TMCStepper.cpp COOLCONF.cpp DRV_STATUS.cpp IHOLD_IRUN.cpp \
|
|
|
|
CHOPCONF.cpp GCONF.cpp PWMCONF.cpp DRV_CONF.cpp DRVCONF.cpp DRVCTRL.cpp \
|
|
|
|
DRVSTATUS.cpp ENCMODE.cpp RAMP_STAT.cpp SGCSCONF.cpp SHORT_CONF.cpp \
|
|
|
|
SMARTEN.cpp SW_MODE.cpp SW_SPI.cpp TMC2130Stepper.cpp TMC2208Stepper.cpp \
|
|
|
|
TMC2209Stepper.cpp TMC2660Stepper.cpp TMC5130Stepper.cpp TMC5160Stepper.cpp
|
2017-07-27 13:46:27 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(RELOC_WORKAROUND), 1)
|
2018-10-05 21:06:11 +00:00
|
|
|
LD_PREFIX=-nodefaultlibs
|
|
|
|
LD_SUFFIX=-lm -lgcc -lc -lgcc
|
2017-07-27 13:46:27 +00:00
|
|
|
endif
|
|
|
|
|
2016-03-06 04:41:15 +00:00
|
|
|
#Check for Arduino 1.0.0 or higher and use the correct source files for that version
|
2012-11-24 10:46:31 +00:00
|
|
|
ifeq ($(shell [ $(ARDUINO_VERSION) -ge 100 ] && echo true), true)
|
2018-10-05 21:06:11 +00:00
|
|
|
LIB_CXXSRC += main.cpp
|
2012-11-24 10:46:31 +00:00
|
|
|
else
|
2018-10-05 21:06:11 +00:00
|
|
|
LIB_SRC += pins_arduino.c main.c
|
2012-11-24 10:46:31 +00:00
|
|
|
endif
|
|
|
|
|
2011-11-05 13:13:20 +00:00
|
|
|
FORMAT = ihex
|
|
|
|
|
|
|
|
# Name of this Makefile (used for "make depend").
|
|
|
|
MAKEFILE = Makefile
|
|
|
|
|
|
|
|
# Debugging format.
|
|
|
|
# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
|
|
|
|
# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
|
|
|
|
DEBUG = stabs
|
|
|
|
|
2012-01-24 02:18:54 +00:00
|
|
|
OPT = s
|
2011-11-05 13:13:20 +00:00
|
|
|
|
2012-12-08 10:49:53 +00:00
|
|
|
DEFINES ?=
|
|
|
|
|
2012-12-13 04:18:31 +00:00
|
|
|
# Program settings
|
2018-10-05 21:06:11 +00:00
|
|
|
CC = $(AVR_TOOLS_PATH)$(TOOL_PREFIX)-gcc
|
|
|
|
CXX = $(AVR_TOOLS_PATH)$(TOOL_PREFIX)-g++
|
|
|
|
OBJCOPY = $(AVR_TOOLS_PATH)$(TOOL_PREFIX)-objcopy
|
|
|
|
OBJDUMP = $(AVR_TOOLS_PATH)$(TOOL_PREFIX)-objdump
|
|
|
|
AR = $(AVR_TOOLS_PATH)$(TOOL_PREFIX)-ar
|
|
|
|
SIZE = $(AVR_TOOLS_PATH)$(TOOL_PREFIX)-size
|
|
|
|
NM = $(AVR_TOOLS_PATH)$(TOOL_PREFIX)-nm
|
2012-12-13 04:18:31 +00:00
|
|
|
AVRDUDE = avrdude
|
|
|
|
REMOVE = rm -f
|
|
|
|
MV = mv -f
|
|
|
|
|
2011-11-05 13:13:20 +00:00
|
|
|
# Place -D or -U options here
|
2020-10-08 23:40:54 +00:00
|
|
|
CDEFS = -DF_CPU=$(F_CPU)UL ${addprefix -D , $(DEFINES)} -DARDUINO=$(ARDUINO_VERSION)
|
2012-12-13 10:41:27 +00:00
|
|
|
CXXDEFS = $(CDEFS)
|
|
|
|
|
|
|
|
ifeq ($(HARDWARE_VARIANT), Teensy)
|
2020-10-08 23:40:54 +00:00
|
|
|
CDEFS += -DUSB_SERIAL
|
2018-10-05 21:06:11 +00:00
|
|
|
LIB_SRC += usb.c pins_teensy.c
|
|
|
|
LIB_CXXSRC += usb_api.cpp
|
|
|
|
|
|
|
|
else ifeq ($(HARDWARE_VARIANT), archim)
|
2020-10-08 23:40:54 +00:00
|
|
|
CDEFS += -DARDUINO_SAM_ARCHIM -DARDUINO_ARCH_SAM -D__SAM3X8E__
|
2020-10-09 21:50:17 +00:00
|
|
|
CDEFS += -DUSB_VID=0x27B1 -DUSB_PID=0x0001 -DUSBCON
|
2020-10-08 23:40:54 +00:00
|
|
|
CDEFS += '-DUSB_MANUFACTURER="UltiMachine"' '-DUSB_PRODUCT_STRING="Archim"'
|
|
|
|
|
|
|
|
LIB_CXXSRC += variant.cpp IPAddress.cpp Reset.cpp RingBuffer.cpp Stream.cpp \
|
|
|
|
UARTClass.cpp USARTClass.cpp abi.cpp new.cpp watchdog.cpp CDC.cpp \
|
|
|
|
PluggableUSB.cpp USBCore.cpp
|
|
|
|
|
2018-10-05 21:06:11 +00:00
|
|
|
LIB_SRC += cortex_handlers.c iar_calls_sam3.c syscalls_sam3.c dtostrf.c itoa.c
|
2018-11-18 04:21:44 +00:00
|
|
|
|
|
|
|
ifeq ($(U8GLIB), 1)
|
|
|
|
LIB_SRC += u8g_com_api.c u8g_pb32h1.c
|
|
|
|
endif
|
2012-12-13 10:41:27 +00:00
|
|
|
endif
|
2011-11-05 13:13:20 +00:00
|
|
|
|
2012-03-22 13:48:10 +00:00
|
|
|
# Add all the source directories as include directories too
|
2012-04-11 01:37:55 +00:00
|
|
|
CINCS = ${addprefix -I ,${VPATH}}
|
|
|
|
CXXINCS = ${addprefix -I ,${VPATH}}
|
2011-11-05 13:13:20 +00:00
|
|
|
|
2018-10-05 21:06:11 +00:00
|
|
|
# Silence warnings for library code (won't work for .h files, unfortunately)
|
|
|
|
LIBWARN = -w -Wno-packed-bitfield-compat
|
|
|
|
|
2016-11-15 20:54:12 +00:00
|
|
|
# Compiler flag to set the C/CPP Standard level.
|
|
|
|
CSTANDARD = -std=gnu99
|
|
|
|
CXXSTANDARD = -std=gnu++11
|
2011-11-05 13:13:20 +00:00
|
|
|
CDEBUG = -g$(DEBUG)
|
2019-09-18 07:33:26 +00:00
|
|
|
CWARN = -Wall -Wstrict-prototypes -Wno-packed-bitfield-compat -Wno-pragmas -Wunused-parameter
|
|
|
|
CXXWARN = -Wall -Wno-packed-bitfield-compat -Wno-pragmas -Wunused-parameter
|
2019-09-14 11:51:49 +00:00
|
|
|
CTUNING = -fsigned-char -funsigned-bitfields -fno-exceptions \
|
2018-10-05 21:06:11 +00:00
|
|
|
-fshort-enums -ffunction-sections -fdata-sections
|
2012-11-11 10:05:52 +00:00
|
|
|
ifneq ($(HARDWARE_MOTHERBOARD),)
|
2018-10-05 21:06:11 +00:00
|
|
|
CTUNING += -DMOTHERBOARD=${HARDWARE_MOTHERBOARD}
|
2012-03-22 13:48:10 +00:00
|
|
|
endif
|
2020-10-08 23:40:54 +00:00
|
|
|
|
2011-11-05 13:13:20 +00:00
|
|
|
#CEXTRA = -Wa,-adhlns=$(<:.c=.lst)
|
2018-10-05 21:06:11 +00:00
|
|
|
CXXEXTRA = -fno-use-cxa-atexit -fno-threadsafe-statics -fno-rtti
|
|
|
|
CFLAGS := $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CEXTRA) $(CTUNING) $(CSTANDARD)
|
|
|
|
CXXFLAGS := $(CDEFS) $(CINCS) -O$(OPT) $(CXXEXTRA) $(CTUNING) $(CXXSTANDARD)
|
|
|
|
ASFLAGS := $(CDEFS)
|
2012-12-13 11:19:12 +00:00
|
|
|
#ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
|
2020-10-08 23:40:54 +00:00
|
|
|
|
2018-10-05 21:06:11 +00:00
|
|
|
ifeq ($(HARDWARE_VARIANT), archim)
|
|
|
|
LD_PREFIX = -Wl,--gc-sections,-Map,Marlin.ino.map,--cref,--check-sections,--entry=Reset_Handler,--unresolved-symbols=report-all,--warn-common,--warn-section-align
|
|
|
|
LD_SUFFIX = $(LDLIBS)
|
2020-10-08 23:40:54 +00:00
|
|
|
|
|
|
|
LDFLAGS = -lm -T$(LDSCRIPT) -u _sbrk -u link -u _close -u _fstat -u _isatty
|
|
|
|
LDFLAGS += -u _lseek -u _read -u _write -u _exit -u kill -u _getpid
|
2018-10-05 21:06:11 +00:00
|
|
|
else
|
|
|
|
LD_PREFIX = -Wl,--gc-sections,--relax
|
|
|
|
LDFLAGS = -lm
|
|
|
|
CTUNING += -flto
|
|
|
|
endif
|
2012-01-24 02:18:54 +00:00
|
|
|
|
2011-11-05 13:13:20 +00:00
|
|
|
# Programming support using avrdude. Settings and variables.
|
2012-11-11 10:05:52 +00:00
|
|
|
AVRDUDE_PORT = $(UPLOAD_PORT)
|
2015-01-13 05:01:43 +00:00
|
|
|
AVRDUDE_WRITE_FLASH = -Uflash:w:$(BUILD_DIR)/$(TARGET).hex:i
|
2013-08-01 17:20:27 +00:00
|
|
|
ifeq ($(shell uname -s), Linux)
|
2018-10-05 21:06:11 +00:00
|
|
|
AVRDUDE_CONF = /etc/avrdude/avrdude.conf
|
2013-08-01 17:20:27 +00:00
|
|
|
else
|
2018-10-05 21:06:11 +00:00
|
|
|
AVRDUDE_CONF = $(ARDUINO_INSTALL_DIR)/hardware/tools/avr/etc/avrdude.conf
|
2013-08-01 17:20:27 +00:00
|
|
|
endif
|
2015-07-20 11:38:52 +00:00
|
|
|
AVRDUDE_FLAGS = -D -C$(AVRDUDE_CONF) \
|
2020-10-08 23:40:54 +00:00
|
|
|
-p$(PROG_MCU) -P$(AVRDUDE_PORT) -c$(AVRDUDE_PROGRAMMER) \
|
2018-10-05 21:06:11 +00:00
|
|
|
-b$(UPLOAD_RATE)
|
2011-11-05 13:13:20 +00:00
|
|
|
|
2018-04-03 00:36:27 +00:00
|
|
|
# Since Marlin 2.0, the source files may be distributed into several
|
|
|
|
# different directories, so it is necessary to find them recursively
|
|
|
|
|
|
|
|
SRC = $(shell find src -name '*.c' -type f)
|
|
|
|
CXXSRC = $(shell find src -name '*.cpp' -type f)
|
|
|
|
|
2011-11-05 13:13:20 +00:00
|
|
|
# Define all object files.
|
2018-04-03 00:36:27 +00:00
|
|
|
OBJ = ${patsubst %.c, $(BUILD_DIR)/arduino/%.o, ${LIB_SRC}}
|
|
|
|
OBJ += ${patsubst %.cpp, $(BUILD_DIR)/arduino/%.o, ${LIB_CXXSRC}}
|
|
|
|
OBJ += ${patsubst %.S, $(BUILD_DIR)/arduino/%.o, ${LIB_ASRC}}
|
|
|
|
OBJ += ${patsubst %.c, $(BUILD_DIR)/%.o, ${SRC}}
|
2012-11-11 10:05:52 +00:00
|
|
|
OBJ += ${patsubst %.cpp, $(BUILD_DIR)/%.o, ${CXXSRC}}
|
2011-11-05 13:13:20 +00:00
|
|
|
|
|
|
|
# Define all listing files.
|
2018-04-03 00:36:27 +00:00
|
|
|
LST = $(LIB_ASRC:.S=.lst) $(LIB_CXXSRC:.cpp=.lst) $(LIB_SRC:.c=.lst)
|
2011-11-05 13:13:20 +00:00
|
|
|
|
|
|
|
# Combine all necessary flags and optional flags.
|
|
|
|
# Add target processor to flags.
|
2018-10-05 21:06:11 +00:00
|
|
|
ALL_CFLAGS = $(MCU_FLAGS) $(CPU_FLAGS) $(CFLAGS) -I.
|
|
|
|
ALL_CXXFLAGS = $(MCU_FLAGS) $(CPU_FLAGS) $(CXXFLAGS)
|
|
|
|
ALL_ASFLAGS = $(MCU_FLAGS) $(CPU_FLAGS) $(ASFLAGS) -x assembler-with-cpp
|
2012-01-24 02:18:54 +00:00
|
|
|
|
2012-08-01 20:31:38 +00:00
|
|
|
# set V=1 (eg, "make V=1") to print the full commands etc.
|
|
|
|
ifneq ($V,1)
|
2018-10-05 21:06:11 +00:00
|
|
|
Pecho=@echo
|
|
|
|
P=@
|
2012-08-01 20:31:38 +00:00
|
|
|
else
|
2018-10-05 21:06:11 +00:00
|
|
|
Pecho=@:
|
|
|
|
P=
|
2012-08-01 20:31:38 +00:00
|
|
|
endif
|
2011-11-05 13:13:20 +00:00
|
|
|
|
2018-04-03 00:36:27 +00:00
|
|
|
# Create required build hierarchy if it does not exist
|
|
|
|
|
|
|
|
$(shell mkdir -p $(dir $(OBJ)))
|
|
|
|
|
2011-11-05 13:13:20 +00:00
|
|
|
# Default target.
|
2012-03-22 13:48:10 +00:00
|
|
|
all: sizeafter
|
2011-11-05 13:13:20 +00:00
|
|
|
|
2018-10-05 21:06:11 +00:00
|
|
|
build: elf hex bin
|
2012-11-11 10:05:52 +00:00
|
|
|
|
|
|
|
elf: $(BUILD_DIR)/$(TARGET).elf
|
2018-10-05 21:06:11 +00:00
|
|
|
bin: $(BUILD_DIR)/$(TARGET).bin
|
2012-11-11 10:05:52 +00:00
|
|
|
hex: $(BUILD_DIR)/$(TARGET).hex
|
|
|
|
eep: $(BUILD_DIR)/$(TARGET).eep
|
2013-06-06 22:49:25 +00:00
|
|
|
lss: $(BUILD_DIR)/$(TARGET).lss
|
2012-11-11 10:05:52 +00:00
|
|
|
sym: $(BUILD_DIR)/$(TARGET).sym
|
2011-11-05 13:13:20 +00:00
|
|
|
|
2013-06-06 22:49:25 +00:00
|
|
|
# Program the device.
|
2016-03-06 04:41:15 +00:00
|
|
|
# Do not try to reset an Arduino if it's not one
|
2012-11-11 10:05:52 +00:00
|
|
|
upload: $(BUILD_DIR)/$(TARGET).hex
|
2012-03-22 13:48:10 +00:00
|
|
|
ifeq (${AVRDUDE_PROGRAMMER}, arduino)
|
2020-02-24 16:42:12 +00:00
|
|
|
stty hup < $(UPLOAD_PORT); true
|
2012-03-22 13:48:10 +00:00
|
|
|
endif
|
2020-02-24 16:42:12 +00:00
|
|
|
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH)
|
2012-03-22 13:48:10 +00:00
|
|
|
ifeq (${AVRDUDE_PROGRAMMER}, arduino)
|
2020-02-24 16:42:12 +00:00
|
|
|
stty -hup < $(UPLOAD_PORT); true
|
2012-03-22 13:48:10 +00:00
|
|
|
endif
|
2012-01-24 02:18:54 +00:00
|
|
|
|
2019-01-20 05:41:19 +00:00
|
|
|
# Display size of file.
|
2012-11-11 10:05:52 +00:00
|
|
|
HEXSIZE = $(SIZE) --target=$(FORMAT) $(BUILD_DIR)/$(TARGET).hex
|
2018-10-05 21:06:11 +00:00
|
|
|
ELFSIZE = $(SIZE) $(SIZE_FLAGS) $(BUILD_DIR)/$(TARGET).elf; \
|
2012-11-11 10:05:52 +00:00
|
|
|
$(SIZE) $(BUILD_DIR)/$(TARGET).elf
|
2011-11-05 13:13:20 +00:00
|
|
|
sizebefore:
|
2020-02-24 16:42:12 +00:00
|
|
|
$P if [ -f $(BUILD_DIR)/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(HEXSIZE); echo; fi
|
2011-11-05 13:13:20 +00:00
|
|
|
|
2012-03-22 13:48:10 +00:00
|
|
|
sizeafter: build
|
2020-02-24 16:42:12 +00:00
|
|
|
$P if [ -f $(BUILD_DIR)/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
|
2011-11-05 13:13:20 +00:00
|
|
|
|
2012-01-24 02:18:54 +00:00
|
|
|
|
2011-11-05 13:13:20 +00:00
|
|
|
# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.
|
|
|
|
COFFCONVERT=$(OBJCOPY) --debugging \
|
2018-10-05 21:06:11 +00:00
|
|
|
--change-section-address .data-0x800000 \
|
|
|
|
--change-section-address .bss-0x800000 \
|
|
|
|
--change-section-address .noinit-0x800000 \
|
|
|
|
--change-section-address .eeprom-0x810000
|
2012-01-24 02:18:54 +00:00
|
|
|
|
2011-11-05 13:13:20 +00:00
|
|
|
|
2012-11-11 10:05:52 +00:00
|
|
|
coff: $(BUILD_DIR)/$(TARGET).elf
|
2020-02-24 16:42:12 +00:00
|
|
|
$(COFFCONVERT) -O coff-avr $(BUILD_DIR)/$(TARGET).elf $(TARGET).cof
|
2011-11-05 13:13:20 +00:00
|
|
|
|
2012-01-24 02:18:54 +00:00
|
|
|
|
2011-11-05 13:13:20 +00:00
|
|
|
extcoff: $(TARGET).elf
|
2020-02-24 16:42:12 +00:00
|
|
|
$(COFFCONVERT) -O coff-ext-avr $(BUILD_DIR)/$(TARGET).elf $(TARGET).cof
|
2011-11-05 13:13:20 +00:00
|
|
|
|
2012-01-24 02:18:54 +00:00
|
|
|
|
2018-10-05 21:06:11 +00:00
|
|
|
.SUFFIXES: .elf .hex .eep .lss .sym .bin
|
2012-01-25 09:46:27 +00:00
|
|
|
.PRECIOUS: .o
|
2011-11-04 17:02:56 +00:00
|
|
|
|
|
|
|
.elf.hex:
|
2020-02-24 16:42:12 +00:00
|
|
|
$(Pecho) " COPY $@"
|
|
|
|
$P $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
|
2018-10-05 21:06:11 +00:00
|
|
|
|
|
|
|
.elf.bin:
|
2020-02-24 16:42:12 +00:00
|
|
|
$(Pecho) " COPY $@"
|
|
|
|
$P $(OBJCOPY) -O binary -R .eeprom $< $@
|
2011-11-05 13:13:20 +00:00
|
|
|
|
|
|
|
.elf.eep:
|
2020-02-24 16:42:12 +00:00
|
|
|
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
|
2020-10-08 23:40:54 +00:00
|
|
|
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@
|
2011-11-05 13:13:20 +00:00
|
|
|
|
|
|
|
# Create extended listing file from ELF output file.
|
|
|
|
.elf.lss:
|
2020-02-24 16:42:12 +00:00
|
|
|
$(OBJDUMP) -h -S $< > $@
|
2011-11-05 13:13:20 +00:00
|
|
|
|
|
|
|
# Create a symbol table from ELF output file.
|
|
|
|
.elf.sym:
|
2020-02-24 16:42:12 +00:00
|
|
|
$(NM) -n $< > $@
|
2011-11-05 13:13:20 +00:00
|
|
|
|
2019-01-20 05:41:19 +00:00
|
|
|
# Link: create ELF output file from library.
|
2018-04-03 00:36:27 +00:00
|
|
|
|
2012-12-13 11:19:12 +00:00
|
|
|
$(BUILD_DIR)/$(TARGET).elf: $(OBJ) Configuration.h
|
2020-02-24 16:42:12 +00:00
|
|
|
$(Pecho) " CXX $@"
|
2020-10-08 23:40:54 +00:00
|
|
|
$P $(CXX) $(LD_PREFIX) $(ALL_CXXFLAGS) -o $@ -L. $(OBJ) $(LDFLAGS) $(LD_SUFFIX)
|
2012-01-24 02:18:54 +00:00
|
|
|
|
2018-04-03 00:36:27 +00:00
|
|
|
# Object files that were found in "src" will be stored in $(BUILD_DIR)
|
|
|
|
# in directories that mirror the structure of "src"
|
|
|
|
|
2012-11-11 10:05:52 +00:00
|
|
|
$(BUILD_DIR)/%.o: %.c Configuration.h Configuration_adv.h $(MAKEFILE)
|
2020-02-24 16:42:12 +00:00
|
|
|
$(Pecho) " CC $<"
|
|
|
|
$P $(CC) -MMD -c $(ALL_CFLAGS) $(CWARN) $< -o $@
|
2012-03-22 13:48:10 +00:00
|
|
|
|
2018-04-03 00:36:27 +00:00
|
|
|
$(BUILD_DIR)/%.o: %.cpp Configuration.h Configuration_adv.h $(MAKEFILE)
|
2020-02-24 16:42:12 +00:00
|
|
|
$(Pecho) " CXX $<"
|
|
|
|
$P $(CXX) -MMD -c $(ALL_CXXFLAGS) $(CXXWARN) $< -o $@
|
2012-10-16 01:16:25 +00:00
|
|
|
|
2018-04-03 00:36:27 +00:00
|
|
|
# Object files for Arduino libs will be created in $(BUILD_DIR)/arduino
|
|
|
|
|
|
|
|
$(BUILD_DIR)/arduino/%.o: %.c Configuration.h Configuration_adv.h $(MAKEFILE)
|
2020-02-24 16:42:12 +00:00
|
|
|
$(Pecho) " CC $<"
|
|
|
|
$P $(CC) -MMD -c $(ALL_CFLAGS) $(LIBWARN) $< -o $@
|
2018-04-03 00:36:27 +00:00
|
|
|
|
|
|
|
$(BUILD_DIR)/arduino/%.o: %.cpp Configuration.h Configuration_adv.h $(MAKEFILE)
|
2020-02-24 16:42:12 +00:00
|
|
|
$(Pecho) " CXX $<"
|
|
|
|
$P $(CXX) -MMD -c $(ALL_CXXFLAGS) $(LIBWARN) $< -o $@
|
2018-10-05 21:06:11 +00:00
|
|
|
|
|
|
|
$(BUILD_DIR)/arduino/%.o: %.S $(MAKEFILE)
|
2020-02-24 16:42:12 +00:00
|
|
|
$(Pecho) " CXX $<"
|
|
|
|
$P $(CXX) -MMD -c $(ALL_ASFLAGS) $< -o $@
|
2012-03-22 13:48:10 +00:00
|
|
|
|
2011-11-05 13:13:20 +00:00
|
|
|
# Target: clean project.
|
2011-08-12 20:28:35 +00:00
|
|
|
clean:
|
2020-02-24 16:42:12 +00:00
|
|
|
$(Pecho) " RMDIR $(BUILD_DIR)/"
|
|
|
|
$P rm -rf $(BUILD_DIR)
|
2012-03-22 13:48:10 +00:00
|
|
|
|
2012-01-24 02:18:54 +00:00
|
|
|
|
2018-10-05 21:06:11 +00:00
|
|
|
.PHONY: all build elf hex eep lss sym program coff extcoff clean depend sizebefore sizeafter
|
2012-03-22 13:48:10 +00:00
|
|
|
|
2021-04-26 23:30:26 +00:00
|
|
|
# Automatically include the dependency files created by gcc
|
2018-04-03 00:36:27 +00:00
|
|
|
-include ${patsubst %.o, %.d, ${OBJ}}
|