Skip to content

Commit

Permalink
Merge branch 'bugfix-2.0.x' into 2.0.x-Sapphire-Pro
Browse files Browse the repository at this point in the history
  • Loading branch information
petrzmax committed Feb 10, 2020
2 parents bcf9f7d + 0b45493 commit f7e4299
Show file tree
Hide file tree
Showing 83 changed files with 1,216 additions and 577 deletions.
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# editorconfig.org
root = true

[{*.patch,syntax_test_*}]
trim_trailing_whitespace = false

[{*.c,*.cpp,*.h}]
charset = utf-8

[{*.c,*.cpp,*.h,Makefile}]
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
indent_style = space
indent_size = 2

[{*.py,*.conf,*.sublime-project}]
indent_style = tab
indent_size = 4
8 changes: 2 additions & 6 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* Advanced settings can be found in Configuration_adv.h
*
*/
#define CONFIGURATION_H_VERSION 020000
#define CONFIGURATION_H_VERSION 020004

//===========================================================================
//============================= Getting Started =============================
Expand Down Expand Up @@ -693,11 +693,6 @@
#define X_DRIVER_TYPE TMC2209
#define Y_DRIVER_TYPE TMC2209
#define Z_DRIVER_TYPE TMC2209
//#define X2_DRIVER_TYPE A4988
//#define Y2_DRIVER_TYPE A4988
//#define Z2_DRIVER_TYPE A4988
//#define Z3_DRIVER_TYPE A4988
//#define Z4_DRIVER_TYPE A4988
#define E0_DRIVER_TYPE TMC2209
//#define E1_DRIVER_TYPE A4988
//#define E2_DRIVER_TYPE A4988
Expand Down Expand Up @@ -1253,6 +1248,7 @@
#define MESH_TEST_HOTEND_TEMP 205 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
#define MESH_TEST_BED_TEMP 60 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
#define G26_XY_FEEDRATE 20 // (mm/s) Feedrate for XY Moves for the G26 Mesh Validation Tool.
#define G26_RETRACT_MULTIPLIER 1.0 // G26 Q (retraction) used by default between mesh test elements.
#endif

#endif
Expand Down
8 changes: 4 additions & 4 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* Basic settings can be found in Configuration.h
*
*/
#define CONFIGURATION_ADV_H_VERSION 020000
#define CONFIGURATION_ADV_H_VERSION 020004

// @section temperature

Expand Down Expand Up @@ -840,8 +840,8 @@

// Define the pin to read during calibration
#ifndef CALIBRATION_PIN
#define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
#define CALIBRATION_PIN_INVERTING false // Set to true to invert the pin
//#define CALIBRATION_PIN -1 // Define here to override the default pin
#define CALIBRATION_PIN_INVERTING false // Set to true to invert the custom pin
//#define CALIBRATION_PIN_PULLDOWN
#define CALIBRATION_PIN_PULLUP
#endif
Expand Down Expand Up @@ -1573,7 +1573,7 @@
// Add additional compensation depending on hotend temperature
// Note: this values cannot be calibrated and have to be set manually
#ifdef PROBE_TEMP_COMPENSATION
#if ENABLED(PROBE_TEMP_COMPENSATION)
// Max temperature that can be reached by heated bed.
// This is required only for the calibration process.
#define PTC_MAX_BED_TEMP 110
Expand Down
141 changes: 73 additions & 68 deletions Marlin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -180,88 +180,93 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1105)
else ifeq ($(HARDWARE_MOTHERBOARD),1106)
# MKS v1.5 with Allegro A4982 stepper drivers
else ifeq ($(HARDWARE_MOTHERBOARD),1107)
# MKS BASE 1.0 with Heroic HR4982 stepper drivers
# MKS v1.6 with Allegro A4982 stepper drivers
else ifeq ($(HARDWARE_MOTHERBOARD),1108)
# MKS GEN v1.3 or 1.4

# MKS BASE 1.0 with Heroic HR4982 stepper drivers
else ifeq ($(HARDWARE_MOTHERBOARD),1109)
# MKS GEN L
# MKS GEN v1.3 or 1.4
else ifeq ($(HARDWARE_MOTHERBOARD),1110)
# zrib V2.0 control board (Chinese knock off RAMPS replica)
# MKS GEN L
else ifeq ($(HARDWARE_MOTHERBOARD),1111)
# BigTreeTech or BIQU KFB2.0
# zrib V2.0 control board (Chinese knock off RAMPS replica)
else ifeq ($(HARDWARE_MOTHERBOARD),1112)
# Felix 2.0+ Electronics Board (RAMPS like)
# BigTreeTech or BIQU KFB2.0
else ifeq ($(HARDWARE_MOTHERBOARD),1113)
# Invent-A-Part RigidBoard
# Felix 2.0+ Electronics Board (RAMPS like)
else ifeq ($(HARDWARE_MOTHERBOARD),1114)
# Invent-A-Part RigidBoard V2
# Invent-A-Part RigidBoard
else ifeq ($(HARDWARE_MOTHERBOARD),1115)
# Sainsmart 2-in-1 board
# Invent-A-Part RigidBoard V2
else ifeq ($(HARDWARE_MOTHERBOARD),1116)
# Ultimaker
# Sainsmart 2-in-1 board
else ifeq ($(HARDWARE_MOTHERBOARD),1117)
# Ultimaker (Older electronics. Pre 1.5.4. This is rare)
# Ultimaker
else ifeq ($(HARDWARE_MOTHERBOARD),1118)
# Ultimaker (Older electronics. Pre 1.5.4. This is rare)
else ifeq ($(HARDWARE_MOTHERBOARD),1119)
MCU ?= atmega1280

# Azteeg X3
else ifeq ($(HARDWARE_MOTHERBOARD),1119)
# Azteeg X3 Pro
else ifeq ($(HARDWARE_MOTHERBOARD),1120)
# Ultimainboard 2.x (Uses TEMP_SENSOR 20)
# Azteeg X3 Pro
else ifeq ($(HARDWARE_MOTHERBOARD),1121)
# Rumba
# Ultimainboard 2.x (Uses TEMP_SENSOR 20)
else ifeq ($(HARDWARE_MOTHERBOARD),1122)
# Raise3D Rumba
# Rumba
else ifeq ($(HARDWARE_MOTHERBOARD),1123)
# Rapide Lite RL200 Rumba
# Raise3D Rumba
else ifeq ($(HARDWARE_MOTHERBOARD),1124)
# Formbot T-Rex 2 Plus
# Rapide Lite RL200 Rumba
else ifeq ($(HARDWARE_MOTHERBOARD),1125)
# Formbot T-Rex 3
# Formbot T-Rex 2 Plus
else ifeq ($(HARDWARE_MOTHERBOARD),1126)
# Formbot Raptor
# Formbot T-Rex 3
else ifeq ($(HARDWARE_MOTHERBOARD),1127)
# Formbot Raptor 2
# Formbot Raptor
else ifeq ($(HARDWARE_MOTHERBOARD),1128)
# bq ZUM Mega 3D
# Formbot Raptor 2
else ifeq ($(HARDWARE_MOTHERBOARD),1129)
# MakeBoard Mini v2.1.2 is a control board sold by MicroMake
# bq ZUM Mega 3D
else ifeq ($(HARDWARE_MOTHERBOARD),1130)
# TriGorilla Anycubic version 1.3 based on RAMPS EFB
# MakeBoard Mini v2.1.2 is a control board sold by MicroMake
else ifeq ($(HARDWARE_MOTHERBOARD),1131)
# TriGorilla Anycubic version 1.4 based on RAMPS EFB
# TriGorilla Anycubic version 1.3 based on RAMPS EFB
else ifeq ($(HARDWARE_MOTHERBOARD),1132)
# TriGorilla Anycubic version 1.4 Rev 1.1
# TriGorilla Anycubic version 1.4 based on RAMPS EFB
else ifeq ($(HARDWARE_MOTHERBOARD),1133)
# Creality: Ender-4, CR-8
# TriGorilla Anycubic version 1.4 Rev 1.1
else ifeq ($(HARDWARE_MOTHERBOARD),1134)
# Creality: CR10S, CR20, CR-X
# Creality: Ender-4, CR-8
else ifeq ($(HARDWARE_MOTHERBOARD),1135)
# Dagoma F5
# Creality: CR10S, CR20, CR-X
else ifeq ($(HARDWARE_MOTHERBOARD),1136)
# FYSETC F6
# Dagoma F5
else ifeq ($(HARDWARE_MOTHERBOARD),1137)
# Duplicator i3 Plus
# FYSETC F6 1.3
else ifeq ($(HARDWARE_MOTHERBOARD),1138)
# VORON
# FYSETC F6 1.5
else ifeq ($(HARDWARE_MOTHERBOARD),1139)
# TRONXY V3 1.0
# Duplicator i3 Plus
else ifeq ($(HARDWARE_MOTHERBOARD),1140)
# Z-Bolt X Series
# VORON
else ifeq ($(HARDWARE_MOTHERBOARD),1141)
# TT OSCAR
# TRONXY V3 1.0
else ifeq ($(HARDWARE_MOTHERBOARD),1142)
# Overlord/Overlord Pro
# Z-Bolt X Series
else ifeq ($(HARDWARE_MOTHERBOARD),1143)
# ADIMLab Gantry v1
# TT OSCAR
else ifeq ($(HARDWARE_MOTHERBOARD),1144)
# ADIMLab Gantry v2
# Overlord/Overlord Pro
else ifeq ($(HARDWARE_MOTHERBOARD),1145)
# BIQU Tango V1
# ADIMLab Gantry v1
else ifeq ($(HARDWARE_MOTHERBOARD),1146)
# MKS GEN L V2
# ADIMLab Gantry v2
else ifeq ($(HARDWARE_MOTHERBOARD),1147)
# BIQU Tango V1
else ifeq ($(HARDWARE_MOTHERBOARD),1148)
# MKS GEN L V2
else ifeq ($(HARDWARE_MOTHERBOARD),1149)

#
# RAMBo and derivatives
Expand Down Expand Up @@ -784,22 +789,22 @@ sym: $(BUILD_DIR)/$(TARGET).sym
# Do not try to reset an Arduino if it's not one
upload: $(BUILD_DIR)/$(TARGET).hex
ifeq (${AVRDUDE_PROGRAMMER}, arduino)
stty hup < $(UPLOAD_PORT); true
stty hup < $(UPLOAD_PORT); true
endif
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH)
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH)
ifeq (${AVRDUDE_PROGRAMMER}, arduino)
stty -hup < $(UPLOAD_PORT); true
stty -hup < $(UPLOAD_PORT); true
endif

# Display size of file.
HEXSIZE = $(SIZE) --target=$(FORMAT) $(BUILD_DIR)/$(TARGET).hex
ELFSIZE = $(SIZE) $(SIZE_FLAGS) $(BUILD_DIR)/$(TARGET).elf; \
$(SIZE) $(BUILD_DIR)/$(TARGET).elf
sizebefore:
$P if [ -f $(BUILD_DIR)/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(HEXSIZE); echo; fi
$P if [ -f $(BUILD_DIR)/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(HEXSIZE); echo; fi

sizeafter: build
$P if [ -f $(BUILD_DIR)/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
$P if [ -f $(BUILD_DIR)/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi


# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.
Expand All @@ -811,71 +816,71 @@ COFFCONVERT=$(OBJCOPY) --debugging \


coff: $(BUILD_DIR)/$(TARGET).elf
$(COFFCONVERT) -O coff-avr $(BUILD_DIR)/$(TARGET).elf $(TARGET).cof
$(COFFCONVERT) -O coff-avr $(BUILD_DIR)/$(TARGET).elf $(TARGET).cof


extcoff: $(TARGET).elf
$(COFFCONVERT) -O coff-ext-avr $(BUILD_DIR)/$(TARGET).elf $(TARGET).cof
$(COFFCONVERT) -O coff-ext-avr $(BUILD_DIR)/$(TARGET).elf $(TARGET).cof


.SUFFIXES: .elf .hex .eep .lss .sym .bin
.PRECIOUS: .o

.elf.hex:
$(Pecho) " COPY $@"
$P $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
$(Pecho) " COPY $@"
$P $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@

.elf.bin:
$(Pecho) " COPY $@"
$P $(OBJCOPY) -O binary -R .eeprom $< $@
$(Pecho) " COPY $@"
$P $(OBJCOPY) -O binary -R .eeprom $< $@

.elf.eep:
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@

# Create extended listing file from ELF output file.
.elf.lss:
$(OBJDUMP) -h -S $< > $@
$(OBJDUMP) -h -S $< > $@

# Create a symbol table from ELF output file.
.elf.sym:
$(NM) -n $< > $@
$(NM) -n $< > $@

# Link: create ELF output file from library.

$(BUILD_DIR)/$(TARGET).elf: $(OBJ) Configuration.h
$(Pecho) " CXX $@"
$P $(CC) $(LD_PREFIX) $(ALL_CXXFLAGS) -o $@ -L. $(OBJ) $(LDFLAGS) $(LD_SUFFIX)
$(Pecho) " CXX $@"
$P $(CC) $(LD_PREFIX) $(ALL_CXXFLAGS) -o $@ -L. $(OBJ) $(LDFLAGS) $(LD_SUFFIX)

# Object files that were found in "src" will be stored in $(BUILD_DIR)
# in directories that mirror the structure of "src"

$(BUILD_DIR)/%.o: %.c Configuration.h Configuration_adv.h $(MAKEFILE)
$(Pecho) " CC $<"
$P $(CC) -MMD -c $(ALL_CFLAGS) $(CWARN) $< -o $@
$(Pecho) " CC $<"
$P $(CC) -MMD -c $(ALL_CFLAGS) $(CWARN) $< -o $@

$(BUILD_DIR)/%.o: %.cpp Configuration.h Configuration_adv.h $(MAKEFILE)
$(Pecho) " CXX $<"
$P $(CXX) -MMD -c $(ALL_CXXFLAGS) $(CXXWARN) $< -o $@
$(Pecho) " CXX $<"
$P $(CXX) -MMD -c $(ALL_CXXFLAGS) $(CXXWARN) $< -o $@

# Object files for Arduino libs will be created in $(BUILD_DIR)/arduino

$(BUILD_DIR)/arduino/%.o: %.c Configuration.h Configuration_adv.h $(MAKEFILE)
$(Pecho) " CC $<"
$P $(CC) -MMD -c $(ALL_CFLAGS) $(LIBWARN) $< -o $@
$(Pecho) " CC $<"
$P $(CC) -MMD -c $(ALL_CFLAGS) $(LIBWARN) $< -o $@

$(BUILD_DIR)/arduino/%.o: %.cpp Configuration.h Configuration_adv.h $(MAKEFILE)
$(Pecho) " CXX $<"
$P $(CXX) -MMD -c $(ALL_CXXFLAGS) $(LIBWARN) $< -o $@
$(Pecho) " CXX $<"
$P $(CXX) -MMD -c $(ALL_CXXFLAGS) $(LIBWARN) $< -o $@

$(BUILD_DIR)/arduino/%.o: %.S $(MAKEFILE)
$(Pecho) " CXX $<"
$P $(CXX) -MMD -c $(ALL_ASFLAGS) $< -o $@
$(Pecho) " CXX $<"
$P $(CXX) -MMD -c $(ALL_ASFLAGS) $< -o $@

# Target: clean project.
clean:
$(Pecho) " RMDIR $(BUILD_DIR)/"
$P rm -rf $(BUILD_DIR)
$(Pecho) " RMDIR $(BUILD_DIR)/"
$P rm -rf $(BUILD_DIR)


.PHONY: all build elf hex eep lss sym program coff extcoff clean depend sizebefore sizeafter
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/HAL_AVR/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@
#error "TMCStepper includes SoftwareSerial.h which is incompatible with ENDSTOP_INTERRUPTS_FEATURE. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
#endif

#if TMC_HAS_SW_SERIAL && ENABLED(MONITOR_DRIVER_STATUS)
#if HAS_TMC_SW_SERIAL && ENABLED(MONITOR_DRIVER_STATUS)
#error "MONITOR_DRIVER_STATUS causes performance issues when used with SoftwareSerial-connected drivers. Disable MONITOR_DRIVER_STATUS or use hardware serial to continue."
#endif
21 changes: 21 additions & 0 deletions Marlin/src/HAL/HAL_DUE/EepromEmulation.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

/* EEPROM emulation over flash with reduced wear
*
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/HAL_DUE/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@
#error "FAST_PWM_FAN is not yet implemented for this platform."
#endif

#if TMC_HAS_SW_SERIAL
#if HAS_TMC_SW_SERIAL
#error "TMC220x Software Serial is not supported on this platform."
#endif
2 changes: 1 addition & 1 deletion Marlin/src/HAL/HAL_ESP32/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#error "FAST_PWM_FAN is not yet implemented for this platform."
#endif

#if TMC_HAS_SW_SERIAL
#if HAS_TMC_SW_SERIAL
#error "TMC220x Software Serial is not supported on this platform."
#endif

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/HAL_LINUX/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
#error "FAST_PWM_FAN is not yet implemented for this platform."
#endif

#if TMC_HAS_SW_SERIAL
#if HAS_TMC_SW_SERIAL
#error "TMC220x Software Serial is not supported on this platform."
#endif
Loading

0 comments on commit f7e4299

Please sign in to comment.