🔨 Makefile + 256K Creality Maple + Heater IDs (#26018)
This commit is contained in:
parent
cb12114a7e
commit
97e15812fa
|
@ -63,8 +63,8 @@ HARDWARE_MOTHERBOARD ?= 1020
|
|||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
# Windows
|
||||
ARDUINO_INSTALL_DIR ?= ${HOME}/Arduino
|
||||
ARDUINO_USER_DIR ?= ${HOME}/Arduino
|
||||
ARDUINO_INSTALL_DIR ?= ${HOME}/AppData/Local/Arduino
|
||||
ARDUINO_USER_DIR ?= ${HOME}/Documents/Arduino
|
||||
else
|
||||
UNAME_S := $(shell uname -s)
|
||||
ifeq ($(UNAME_S),Linux)
|
||||
|
@ -82,11 +82,11 @@ endif
|
|||
|
||||
# Arduino source install directory, and version number
|
||||
# On most linuxes this will be /usr/share/arduino
|
||||
ARDUINO_INSTALL_DIR ?= ${HOME}/Arduino
|
||||
ARDUINO_VERSION ?= 106
|
||||
ARDUINO_INSTALL_DIR ?= ${HOME}/AppData/Local/Arduino # C:/Users/${USERNAME}/AppData/Local/Arduino
|
||||
ARDUINO_VERSION ?= 10819
|
||||
|
||||
# The installed Libraries are in the User folder
|
||||
ARDUINO_USER_DIR ?= ${HOME}/Arduino
|
||||
ARDUINO_USER_DIR ?= ${HOME}/Documents/Arduino
|
||||
|
||||
# You can optionally set a path to the avr-gcc tools.
|
||||
# Requires a trailing slash. For example, /usr/local/avr-gcc/bin/
|
||||
|
@ -656,18 +656,18 @@ ifeq ($(HARDWARE_VARIANT), $(filter $(HARDWARE_VARIANT),arduino Teensy Sanguino)
|
|||
# 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
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/packages/arduino/hardware/arduino/avr/1.8.6/libraries/SPI/src
|
||||
endif
|
||||
|
||||
ifeq ($(IS_MCU),1)
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/cores/arduino
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/packages/arduino/hardware/arduino/avr/1.8.6/cores/arduino
|
||||
|
||||
# Old libraries (avr-core 1.6.21 < / Arduino < 1.6.8)
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SoftwareSerial
|
||||
# New libraries (avr-core >= 1.6.21 / Arduino >= 1.6.8)
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI/src
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SoftwareSerial/src
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/packages/arduino/hardware/arduino/avr/1.8.6/libraries/SPI/src
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/packages/arduino/hardware/arduino/avr/1.8.6/libraries/SoftwareSerial/src
|
||||
endif
|
||||
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidCrystal/src
|
||||
|
@ -681,17 +681,17 @@ ifeq ($(WIRE), 1)
|
|||
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
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/packages/arduino/hardware/avr/1.8.6/libraries/Wire/src
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/packages/arduino/hardware/avr/1.8.6/libraries/Wire/src/utility
|
||||
endif
|
||||
ifeq ($(NEOPIXEL), 1)
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Adafruit_NeoPixel
|
||||
endif
|
||||
ifeq ($(U8GLIB), 1)
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/U8glib
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/U8glib/csrc
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/U8glib/cppsrc
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/U8glib/fntsrc
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/U8glib-HAL
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/U8glib-HAL/src
|
||||
# VPATH += $(ARDUINO_INSTALL_DIR)/libraries/U8glib
|
||||
# VPATH += $(ARDUINO_INSTALL_DIR)/libraries/U8glib/src
|
||||
endif
|
||||
ifeq ($(TMC), 1)
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/TMCStepper/src
|
||||
|
@ -700,9 +700,9 @@ endif
|
|||
|
||||
ifeq ($(HARDWARE_VARIANT), arduino)
|
||||
HARDWARE_SUB_VARIANT ?= mega
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/variants/$(HARDWARE_SUB_VARIANT)
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/packages/arduino/hardware/avr/1.8.6/variants/$(HARDWARE_SUB_VARIANT)
|
||||
else ifeq ($(HARDWARE_VARIANT), Sanguino)
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/marlin/avr/variants/sanguino
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/packages/arduino/hardware/avr/1.8.6/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/
|
||||
|
@ -718,7 +718,7 @@ else ifeq ($(HARDWARE_VARIANT), archim)
|
|||
LDLIBS = $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/variants/archim/libsam_sam3x8e_gcc_rel.a
|
||||
else
|
||||
HARDWARE_SUB_VARIANT ?= standard
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/$(HARDWARE_VARIANT)/variants/$(HARDWARE_SUB_VARIANT)
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/packages/arduino/hardware/avr/1.8.6/variants/$(HARDWARE_SUB_VARIANT)
|
||||
endif
|
||||
|
||||
LIB_SRC = wiring.c \
|
||||
|
@ -733,7 +733,7 @@ endif
|
|||
|
||||
ifeq ($(HARDWARE_VARIANT), Teensy)
|
||||
LIB_SRC = wiring.c
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/teensy/cores/teensy
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/packages/arduino/hardware/teensy/cores/teensy
|
||||
endif
|
||||
|
||||
LIB_CXXSRC = WMath.cpp WString.cpp Print.cpp SPI.cpp
|
||||
|
@ -880,7 +880,7 @@ AVRDUDE_WRITE_FLASH = -Uflash:w:$(BUILD_DIR)/$(TARGET).hex:i
|
|||
ifeq ($(shell uname -s), Linux)
|
||||
AVRDUDE_CONF = /etc/avrdude/avrdude.conf
|
||||
else
|
||||
AVRDUDE_CONF = $(ARDUINO_INSTALL_DIR)/hardware/tools/avr/etc/avrdude.conf
|
||||
AVRDUDE_CONF = $(ARDUINO_INSTALL_DIR)/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf
|
||||
endif
|
||||
AVRDUDE_FLAGS = -D -C$(AVRDUDE_CONF) \
|
||||
-p$(PROG_MCU) -P$(AVRDUDE_PORT) -c$(AVRDUDE_PROGRAMMER) \
|
||||
|
|
|
@ -77,7 +77,6 @@ private:
|
|||
static bool G29_parse_parameters() __O0;
|
||||
static void shift_mesh_height();
|
||||
static void probe_entire_mesh(const xy_pos_t &near, const bool do_ubl_mesh_map, const bool stow_probe, const bool do_furthest) __O0;
|
||||
static void tilt_mesh_based_on_3pts(const_float_t z1, const_float_t z2, const_float_t z3);
|
||||
static void tilt_mesh_based_on_probed_grid(const bool do_ubl_mesh_map);
|
||||
static bool smart_fill_one(const uint8_t x, const uint8_t y, const int8_t xdir, const int8_t ydir);
|
||||
static bool smart_fill_one(const xy_uint8_t &pos, const xy_uint8_t &dir) {
|
||||
|
|
|
@ -306,21 +306,22 @@
|
|||
*/
|
||||
|
||||
// Temperature sensor IDs
|
||||
#define HID_REDUNDANT -7
|
||||
#define HID_SOC -6
|
||||
#define HID_BOARD -5
|
||||
#define HID_COOLER -4
|
||||
#define HID_PROBE -3
|
||||
#define HID_CHAMBER -2
|
||||
#define HID_BED -1
|
||||
#define HID_E0 0
|
||||
#define HID_E1 1
|
||||
#define HID_E2 2
|
||||
#define HID_E3 3
|
||||
#define HID_E4 4
|
||||
#define HID_E5 5
|
||||
#define HID_E6 6
|
||||
#define HID_E7 7
|
||||
#define H_NONE -128
|
||||
#define H_REDUNDANT -7
|
||||
#define H_SOC -6
|
||||
#define H_BOARD -5
|
||||
#define H_COOLER -4
|
||||
#define H_PROBE -3
|
||||
#define H_CHAMBER -2
|
||||
#define H_BED -1
|
||||
#define H_E0 0
|
||||
#define H_E1 1
|
||||
#define H_E2 2
|
||||
#define H_E3 3
|
||||
#define H_E4 4
|
||||
#define H_E5 5
|
||||
#define H_E6 6
|
||||
#define H_E7 7
|
||||
|
||||
#define _SENSOR_IS(I,N) || (TEMP_SENSOR(N) == I)
|
||||
#define _E_SENSOR_IS(I,N) _SENSOR_IS(N,I)
|
||||
|
@ -333,7 +334,7 @@
|
|||
#endif
|
||||
|
||||
#if TEMP_SENSOR_REDUNDANT
|
||||
#define _HEATER_ID(M) HID_##M
|
||||
#define _HEATER_ID(M) H_##M
|
||||
#define HEATER_ID(M) _HEATER_ID(M)
|
||||
#define REDUNDANT_TEMP_MATCH(M,N) (HEATER_ID(TEMP_SENSOR_REDUNDANT_##M) == _HEATER_ID(N))
|
||||
#else
|
||||
|
|
|
@ -2944,7 +2944,7 @@ void Temperature::init() {
|
|||
temp_range[NR].raw_max -= TEMPDIR(NR) * (OVERSAMPLENR); \
|
||||
}while(0)
|
||||
|
||||
#define _MINMAX_TEST(N,M) (!TEMP_SENSOR_##N##_IS_DUMMY && HOTENDS > N && TEMP_SENSOR_##N##_IS_THERMISTOR && defined(HEATER_##N##_##M##TEMP))
|
||||
#define _MINMAX_TEST(N,M) (!TEMP_SENSOR_##N##_IS_DUMMY && HOTENDS > (N) && TEMP_SENSOR_##N##_IS_THERMISTOR && defined(HEATER_##N##_##M##TEMP))
|
||||
|
||||
#if _MINMAX_TEST(0, MIN)
|
||||
_TEMP_MIN_E(0);
|
||||
|
|
|
@ -55,18 +55,7 @@
|
|||
#define FAN_IS_M106ABLE(Q) false
|
||||
#endif
|
||||
|
||||
// Element identifiers. Positive values are hotends. Negative values are other heaters or coolers.
|
||||
typedef enum : int_fast8_t {
|
||||
H_REDUNDANT = HID_REDUNDANT,
|
||||
H_COOLER = HID_COOLER,
|
||||
H_PROBE = HID_PROBE,
|
||||
H_BOARD = HID_BOARD,
|
||||
H_SOC = HID_SOC,
|
||||
H_CHAMBER = HID_CHAMBER,
|
||||
H_BED = HID_BED,
|
||||
H_E0 = HID_E0, H_E1, H_E2, H_E3, H_E4, H_E5, H_E6, H_E7,
|
||||
H_NONE = -128
|
||||
} heater_id_t;
|
||||
typedef int_fast8_t heater_id_t;
|
||||
|
||||
/**
|
||||
* States for ADC reading in the ISR
|
||||
|
|
14
buildroot/share/PlatformIO/ldscripts/creality256k.ld
Normal file
14
buildroot/share/PlatformIO/ldscripts/creality256k.ld
Normal file
|
@ -0,0 +1,14 @@
|
|||
MEMORY
|
||||
{
|
||||
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 48K - 40
|
||||
rom (rx) : ORIGIN = 0x08007000, LENGTH = 256K - 28K
|
||||
}
|
||||
|
||||
/* Provide memory region aliases for common.inc */
|
||||
REGION_ALIAS("REGION_TEXT", rom);
|
||||
REGION_ALIAS("REGION_DATA", ram);
|
||||
REGION_ALIAS("REGION_BSS", ram);
|
||||
REGION_ALIAS("REGION_RODATA", rom);
|
||||
|
||||
/* Let common.inc handle the real work. */
|
||||
INCLUDE common.inc
|
|
@ -111,7 +111,7 @@ lib_deps = ${env:STM32F103RC_btt_maple.lib_deps}
|
|||
USBComposite for STM32F1@0.91
|
||||
|
||||
#
|
||||
# Creality (STM32F103RET6)
|
||||
# Creality 512K (STM32F103RET6)
|
||||
#
|
||||
[env:STM32F103RE_creality_maple]
|
||||
extends = env:STM32F103RE_maple
|
||||
|
@ -123,13 +123,13 @@ debug_tool = jlink
|
|||
upload_protocol = jlink
|
||||
|
||||
#
|
||||
# Creality (STM32F103RCT6)
|
||||
# Creality 256K (STM32F103RCT6)
|
||||
#
|
||||
[env:STM32F103RC_creality_maple]
|
||||
extends = env:STM32F103RC_maple
|
||||
build_flags = ${env:STM32F103RC_maple.build_flags} -DTEMP_TIMER_CHAN=4
|
||||
board_build.address = 0x08007000
|
||||
board_build.ldscript = creality.ld
|
||||
board_build.ldscript = creality256k.ld
|
||||
board_build.rename = firmware-{date}-{time}.bin
|
||||
debug_tool = jlink
|
||||
upload_protocol = jlink
|
||||
|
|
Loading…
Reference in a new issue