Browse Source

update 2.0.x

FB4S_WIFI
Sergey 3 years ago
parent
commit
79f3f68c6e
  1. 1
      Marlin/Configuration.h
  2. 59
      Marlin/src/core/boards.h
  3. 63
      Marlin/src/feature/probe_temp_comp.cpp
  4. 8
      Marlin/src/feature/probe_temp_comp.h
  5. 40
      Marlin/src/feature/solenoid.cpp
  6. 2
      Marlin/src/gcode/calibrate/G76_M192_M871.cpp
  7. 2
      Marlin/src/gcode/feature/L6470/M906.cpp
  8. 2
      Marlin/src/gcode/feature/trinamic/M569.cpp
  9. 2
      Marlin/src/gcode/feature/trinamic/M906.cpp
  10. 2
      Marlin/src/gcode/feature/trinamic/M911-M914.cpp
  11. 9
      Marlin/src/gcode/gcode.cpp
  12. 2
      Marlin/src/gcode/gcode.h
  13. 5
      Marlin/src/gcode/lcd/M0_M1.cpp
  14. 61
      Marlin/src/inc/Conditionals_post.h
  15. 2
      Marlin/src/inc/SanityCheck.h
  16. 14
      Marlin/src/lcd/e3v2/common/dwin_api.h
  17. 50
      Marlin/src/lcd/e3v2/creality/dwin.cpp
  18. 3
      Marlin/src/lcd/e3v2/creality/dwin_lcd.h
  19. 80
      Marlin/src/lcd/e3v2/enhanced/dwin.cpp
  20. 30
      Marlin/src/lcd/e3v2/enhanced/dwin.h
  21. 2
      Marlin/src/lcd/e3v2/enhanced/meshviewer.cpp
  22. 648
      Marlin/src/lcd/e3v2/jyersui/dwin.cpp
  23. 6
      Marlin/src/lcd/e3v2/jyersui/dwin.h
  24. 5
      Marlin/src/lcd/e3v2/marlinui/dwin_lcd.h
  25. 2
      Marlin/src/module/stepper.cpp
  26. 4
      Marlin/src/module/stepper/indirection.h
  27. 6
      Marlin/src/pins/pins.h
  28. 36
      Marlin/src/pins/stm32f1/pins_CREALITY_V24S1.h
  29. 9
      Marlin/src/pins/stm32f1/pins_CREALITY_V4.h
  30. 195
      Marlin/src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h
  31. 39
      Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_PRO_V1_0.h
  32. 9
      Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_0.h
  33. 9
      Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_1.h
  34. 11
      Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h
  35. 14
      Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V1_3_F4.h
  36. 50
      buildroot/share/PlatformIO/boards/marlin_BigTree_Octopus_Pro_v1_F429.json
  37. 14
      buildroot/share/PlatformIO/ldscripts/eryone_ery32_mini.ld
  38. 433
      buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/PeripheralPins.c
  39. 30
      buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/PinNamesVar.h
  40. 53
      buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/hal_conf_extra.h
  41. 209
      buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/ldscript.ld
  42. 233
      buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/variant.cpp
  43. 216
      buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/variant.h
  44. 16
      buildroot/share/PlatformIO/variants/MARLIN_MEGA_EXTENDED/pins_arduino.h
  45. 4
      buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/mem-flash.inc
  46. 19
      ini/stm32f1-maple.ini
  47. 29
      ini/stm32f4.ini

1
Marlin/Configuration.h

@ -260,7 +260,6 @@
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
#define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
#if ENABLED(PARKING_EXTRUDER)

59
Marlin/src/core/boards.h

@ -346,15 +346,17 @@
#define BOARD_CREALITY_V431_D 4046 // Creality v4.3.1d (STM32F103RE)
#define BOARD_CREALITY_V452 4047 // Creality v4.5.2 (STM32F103RE)
#define BOARD_CREALITY_V453 4048 // Creality v4.5.3 (STM32F103RE)
#define BOARD_TRIGORILLA_PRO 4049 // Trigorilla Pro (STM32F103ZET6)
#define BOARD_FLY_MINI 4050 // FLYmaker FLY MINI (STM32F103RCT6)
#define BOARD_FLSUN_HISPEED 4051 // FLSUN HiSpeedV1 (STM32F103VET6)
#define BOARD_BEAST 4052 // STM32F103RET6 Libmaple-based controller
#define BOARD_MINGDA_MPX_ARM_MINI 4053 // STM32F103ZET6 Mingda MD-16
#define BOARD_GTM32_PRO_VD 4054 // STM32F103VET6 controller
#define BOARD_ZONESTAR_ZM3E2 4055 // Zonestar ZM3E2 (STM32F103RCT6)
#define BOARD_ZONESTAR_ZM3E4 4056 // Zonestar ZM3E4 V1 (STM32F103VCT6)
#define BOARD_ZONESTAR_ZM3E4V2 4057 // Zonestar ZM3E4 V2 (STM32F103VCT6)
#define BOARD_CREALITY_V24S1 4049 // Creality v2.4.S1 (STM32F103RE) v101 as found in the Ender 7
#define BOARD_TRIGORILLA_PRO 4050 // Trigorilla Pro (STM32F103ZET6)
#define BOARD_FLY_MINI 4051 // FLYmaker FLY MINI (STM32F103RCT6)
#define BOARD_FLSUN_HISPEED 4052 // FLSUN HiSpeedV1 (STM32F103VET6)
#define BOARD_BEAST 4053 // STM32F103RET6 Libmaple-based controller
#define BOARD_MINGDA_MPX_ARM_MINI 4054 // STM32F103ZET6 Mingda MD-16
#define BOARD_GTM32_PRO_VD 4055 // STM32F103VET6 controller
#define BOARD_ZONESTAR_ZM3E2 4056 // Zonestar ZM3E2 (STM32F103RCT6)
#define BOARD_ZONESTAR_ZM3E4 4057 // Zonestar ZM3E4 V1 (STM32F103VCT6)
#define BOARD_ZONESTAR_ZM3E4V2 4058 // Zonestar ZM3E4 V2 (STM32F103VCT6)
#define BOARD_ERYONE_ERY32_MINI 4059 // Eryone Ery32 mini (STM32F103VET6)
//
// ARM Cortex-M4F
@ -384,25 +386,26 @@
#define BOARD_BTT_GTR_V1_0 4214 // BigTreeTech GTR v1.0 (STM32F407IGT)
#define BOARD_BTT_OCTOPUS_V1_0 4215 // BigTreeTech Octopus v1.0 (STM32F446ZET6)
#define BOARD_BTT_OCTOPUS_V1_1 4216 // BigTreeTech Octopus v1.1 (STM32F446ZET6)
#define BOARD_LERDGE_K 4217 // Lerdge K (STM32F407ZG)
#define BOARD_LERDGE_S 4218 // Lerdge S (STM32F407VE)
#define BOARD_LERDGE_X 4219 // Lerdge X (STM32F407VE)
#define BOARD_VAKE403D 4220 // VAkE 403D (STM32F446VET6)
#define BOARD_FYSETC_S6 4221 // FYSETC S6 (STM32F446VET6)
#define BOARD_FYSETC_S6_V2_0 4222 // FYSETC S6 v2.0 (STM32F446VET6)
#define BOARD_FYSETC_SPIDER 4223 // FYSETC Spider (STM32F446VET6)
#define BOARD_FLYF407ZG 4224 // FLYmaker FLYF407ZG (STM32F407ZG)
#define BOARD_MKS_ROBIN2 4225 // MKS_ROBIN2 (STM32F407ZE)
#define BOARD_MKS_ROBIN_PRO_V2 4226 // MKS Robin Pro V2 (STM32F407VE)
#define BOARD_MKS_ROBIN_NANO_V3 4227 // MKS Robin Nano V3 (STM32F407VG)
#define BOARD_MKS_MONSTER8 4228 // MKS Monster8 (STM32F407VGT6)
#define BOARD_ANET_ET4 4229 // ANET ET4 V1.x (STM32F407VGT6)
#define BOARD_ANET_ET4P 4230 // ANET ET4P V1.x (STM32F407VGT6)
#define BOARD_FYSETC_CHEETAH_V20 4231 // FYSETC Cheetah V2.0
#define BOARD_TH3D_EZBOARD_LITE_V2 4232 // TH3D EZBoard Lite v2.0
#define BOARD_INDEX_REV03 4233 // Index PnP Controller REV03 (STM32F407VET6/VGT6)
#define BOARD_MKS_ROBIN_NANO_V1_3_F4 4234 // MKS Robin Nano V1.3 and MKS Robin Nano-S V1.3 (STM32F407VET6)
#define BOARD_MKS_EAGLE 4235 // MKS Eagle (STM32F407VET6)
#define BOARD_BTT_OCTOPUS_PRO_V1_0 4217 // BigTreeTech Octopus Pro v1.0 (STM32F446ZET6/STM32F429ZGT6)
#define BOARD_LERDGE_K 4218 // Lerdge K (STM32F407ZG)
#define BOARD_LERDGE_S 4219 // Lerdge S (STM32F407VE)
#define BOARD_LERDGE_X 4220 // Lerdge X (STM32F407VE)
#define BOARD_VAKE403D 4221 // VAkE 403D (STM32F446VET6)
#define BOARD_FYSETC_S6 4222 // FYSETC S6 (STM32F446VET6)
#define BOARD_FYSETC_S6_V2_0 4223 // FYSETC S6 v2.0 (STM32F446VET6)
#define BOARD_FYSETC_SPIDER 4224 // FYSETC Spider (STM32F446VET6)
#define BOARD_FLYF407ZG 4225 // FLYmaker FLYF407ZG (STM32F407ZG)
#define BOARD_MKS_ROBIN2 4226 // MKS_ROBIN2 (STM32F407ZE)
#define BOARD_MKS_ROBIN_PRO_V2 4227 // MKS Robin Pro V2 (STM32F407VE)
#define BOARD_MKS_ROBIN_NANO_V3 4228 // MKS Robin Nano V3 (STM32F407VG)
#define BOARD_MKS_MONSTER8 4229 // MKS Monster8 (STM32F407VGT6)
#define BOARD_ANET_ET4 4230 // ANET ET4 V1.x (STM32F407VGT6)
#define BOARD_ANET_ET4P 4231 // ANET ET4P V1.x (STM32F407VGT6)
#define BOARD_FYSETC_CHEETAH_V20 4232 // FYSETC Cheetah V2.0
#define BOARD_TH3D_EZBOARD_LITE_V2 4233 // TH3D EZBoard Lite v2.0
#define BOARD_INDEX_REV03 4234 // Index PnP Controller REV03 (STM32F407VET6/VGT6)
#define BOARD_MKS_ROBIN_NANO_V1_3_F4 4235 // MKS Robin Nano V1.3 and MKS Robin Nano-S V1.3 (STM32F407VET6)
#define BOARD_MKS_EAGLE 4236 // MKS Eagle (STM32F407VET6)
//
// ARM Cortex M7

63
Marlin/src/feature/probe_temp_comp.cpp

@ -24,6 +24,8 @@
#if ENABLED(PROBE_TEMP_COMPENSATION)
//#define DEBUG_PTC // Print extra debug output with 'M871'
#include "probe_temp_comp.h"
#include <math.h>
@ -79,9 +81,17 @@ void ProbeTempComp::print_offsets() {
" temp: ", temp,
"C; Offset: ", i < 0 ? 0.0f : sensor_z_offsets[s][i], " um"
);
temp += cali_info[s].temp_res;
temp += cali_info[s].temp_resolution;
}
}
#if ENABLED(DEBUG_PTC)
float meas[4] = { 0, 0, 0, 0 };
compensate_measurement(TSI_PROBE, 27.5, meas[0]);
compensate_measurement(TSI_PROBE, 32.5, meas[1]);
compensate_measurement(TSI_PROBE, 77.5, meas[2]);
compensate_measurement(TSI_PROBE, 82.5, meas[3]);
SERIAL_ECHOLNPGM("DEBUG_PTC 27.5:", meas[0], " 32.5:", meas[1], " 77.5:", meas[2], " 82.5:", meas[3]);
#endif
}
void ProbeTempComp::prepare_new_calibration(const_float_t init_meas_z) {
@ -111,7 +121,7 @@ bool ProbeTempComp::finish_calibration(const TempSensorID tsi) {
const uint8_t measurements = cali_info[tsi].measurements;
const celsius_t start_temp = cali_info[tsi].start_temp,
res_temp = cali_info[tsi].temp_res;
res_temp = cali_info[tsi].temp_resolution;
int16_t * const data = sensor_z_offsets[tsi];
// Extrapolate
@ -156,46 +166,45 @@ bool ProbeTempComp::finish_calibration(const TempSensorID tsi) {
}
void ProbeTempComp::compensate_measurement(const TempSensorID tsi, const celsius_t temp, float &meas_z) {
if (WITHIN(temp, cali_info[tsi].start_temp, cali_info[tsi].end_temp))
meas_z -= get_offset_for_temperature(tsi, temp);
}
float ProbeTempComp::get_offset_for_temperature(const TempSensorID tsi, const celsius_t temp) {
const uint8_t measurements = cali_info[tsi].measurements;
const celsius_t start_temp = cali_info[tsi].start_temp,
res_temp = cali_info[tsi].temp_res;
end_temp = cali_info[tsi].end_temp,
res_temp = cali_info[tsi].temp_resolution;
const int16_t * const data = sensor_z_offsets[tsi];
auto point = [&](uint8_t i) -> xy_float_t {
return xy_float_t({ static_cast<float>(start_temp) + i * res_temp, static_cast<float>(data[i]) });
// Given a data index, return { celsius, zoffset } in the form { x, y }
auto tpoint = [&](uint8_t i) -> xy_float_t {
return xy_float_t({ static_cast<float>(start_temp) + i * res_temp, i ? static_cast<float>(data[i - 1]) : 0.0f });
};
// Interpolate Z based on a temperature being within a given range
auto linear_interp = [](const_float_t x, xy_float_t p1, xy_float_t p2) {
return (p2.y - p1.y) / (p2.x - p2.y) * (x - p1.x) + p1.y;
// zoffs1 + zoffset_per_toffset * toffset
return p1.y + (p2.y - p1.y) / (p2.x - p1.x) * (x - p1.x);
};
// Linear interpolation
uint8_t idx = static_cast<uint8_t>((temp - start_temp) / res_temp);
// offset in µm
float offset = 0.0f;
#if !defined(PTC_LINEAR_EXTRAPOLATION) || PTC_LINEAR_EXTRAPOLATION <= 0
if (idx < 0)
#if PTC_LINEAR_EXTRAPOLATION
if (temp < start_temp)
offset = linear_interp(temp, tpoint(0), tpoint(PTC_LINEAR_EXTRAPOLATION));
else if (temp >= end_temp)
offset = linear_interp(temp, tpoint(measurements - PTC_LINEAR_EXTRAPOLATION), tpoint(measurements));
#else
if (temp < start_temp)
offset = 0.0f;
else if (idx > measurements - 2)
else if (temp >= end_temp)
offset = static_cast<float>(data[measurements - 1]);
#else
if (idx < 0)
offset = linear_interp(temp, point(0), point(PTC_LINEAR_EXTRAPOLATION));
else if (idx > measurements - 2)
offset = linear_interp(temp, point(measurements - PTC_LINEAR_EXTRAPOLATION - 1), point(measurements - 1));
#endif
else
offset = linear_interp(temp, point(idx), point(idx + 1));
else {
// Linear interpolation
const int8_t idx = static_cast<int8_t>((temp - start_temp) / res_temp);
offset = linear_interp(temp, tpoint(idx), tpoint(idx + 1));
}
// return offset in mm
return offset / 1000.0f;
// convert offset to mm and apply it
meas_z -= offset / 1000.0f;
}
bool ProbeTempComp::linear_regression(const TempSensorID tsi, float &k, float &d) {
@ -204,7 +213,7 @@ bool ProbeTempComp::linear_regression(const TempSensorID tsi, float &k, float &d
if (!WITHIN(calib_idx, 2, cali_info[tsi].measurements)) return false;
const celsius_t start_temp = cali_info[tsi].start_temp,
res_temp = cali_info[tsi].temp_res;
res_temp = cali_info[tsi].temp_resolution;
const int16_t * const data = sensor_z_offsets[tsi];
float sum_x = start_temp,

8
Marlin/src/feature/probe_temp_comp.h

@ -33,9 +33,9 @@ enum TempSensorID : uint8_t {
};
typedef struct {
uint8_t measurements; // Max. number of measurements to be stored (35 - 80°C)
celsius_t temp_res, // Resolution in °C between measurements
start_temp, // Base measurement; z-offset == 0
uint8_t measurements; // Max. number of measurements to be stored (35 - 80°C)
celsius_t temp_resolution, // Resolution in °C between measurements
start_temp, // Base measurement; z-offset == 0
end_temp;
} temp_calib_t;
@ -135,8 +135,6 @@ class ProbeTempComp {
*/
static float init_measurement;
static float get_offset_for_temperature(const TempSensorID tsi, const celsius_t temp);
/**
* Fit a linear function in measured temperature offsets
* to allow generating values of higher temperatures.

40
Marlin/src/feature/solenoid.cpp

@ -34,28 +34,12 @@
#include "../module/tool_change.h"
#endif
#define HAS_SOLENOID(N) (HAS_SOLENOID_##N && (ENABLED(MANUAL_SOLENOID_CONTROL) || N < EXTRUDERS))
// Used primarily with MANUAL_SOLENOID_CONTROL
static void set_solenoid(const uint8_t num, const bool active) {
const uint8_t value = active ? PE_MAGNET_ON_STATE : !PE_MAGNET_ON_STATE;
#define _SOL_CASE(N) case N: TERN_(HAS_SOLENOID_##N, OUT_WRITE(SOL##N##_PIN, value)); break;
switch (num) {
case 0: OUT_WRITE(SOL0_PIN, value); break;
#if HAS_SOLENOID(1)
case 1: OUT_WRITE(SOL1_PIN, value); break;
#endif
#if HAS_SOLENOID(2)
case 2: OUT_WRITE(SOL2_PIN, value); break;
#endif
#if HAS_SOLENOID(3)
case 3: OUT_WRITE(SOL3_PIN, value); break;
#endif
#if HAS_SOLENOID(4)
case 4: OUT_WRITE(SOL4_PIN, value); break;
#endif
#if HAS_SOLENOID(5)
case 5: OUT_WRITE(SOL5_PIN, value); break;
#endif
REPEAT(8, _SOL_CASE)
default: SERIAL_ECHO_MSG(STR_INVALID_SOLENOID); break;
}
@ -67,25 +51,11 @@ static void set_solenoid(const uint8_t num, const bool active) {
void enable_solenoid(const uint8_t num) { set_solenoid(num, true); }
void disable_solenoid(const uint8_t num) { set_solenoid(num, false); }
void enable_solenoid_on_active_extruder() { enable_solenoid(active_extruder); }
void enable_solenoid_on_active_extruder() { }
void disable_all_solenoids() {
disable_solenoid(0);
#if HAS_SOLENOID(1)
disable_solenoid(1);
#endif
#if HAS_SOLENOID(2)
disable_solenoid(2);
#endif
#if HAS_SOLENOID(3)
disable_solenoid(3);
#endif
#if HAS_SOLENOID(4)
disable_solenoid(4);
#endif
#if HAS_SOLENOID(5)
disable_solenoid(5);
#endif
#define _SOL_DISABLE(N) TERN_(HAS_SOLENOID_##N, disable_solenoid(N));
REPEAT(8, _SOL_DISABLE)
}
#endif // EXT_SOLENOID || MANUAL_SOLENOID_CONTROL

2
Marlin/src/gcode/calibrate/G76_M192_M871.cpp

@ -121,7 +121,7 @@ void GcodeSuite::G76() {
temp_comp.prepare_new_calibration(measured_z);
else
temp_comp.push_back_new_measurement(sid, measured_z);
targ += cali_info_init[sid].temp_res;
targ += cali_info_init[sid].temp_resolution;
}
return measured_z;
};

2
Marlin/src/gcode/feature/L6470/M906.cpp

@ -280,7 +280,7 @@ void GcodeSuite::M906() {
#if E_STEPPERS
case E_AXIS: {
const int8_t target_e_stepper = get_target_e_stepper_from_command();
const int8_t target_e_stepper = get_target_e_stepper_from_command(0);
if (target_e_stepper < 0) return;
switch (target_e_stepper) {
#if AXIS_IS_L64XX(E0)

2
Marlin/src/gcode/feature/trinamic/M569.cpp

@ -133,7 +133,7 @@ static void say_stealth_status() {
*/
void GcodeSuite::M569() {
if (parser.seen('S'))
set_stealth_status(parser.value_bool(), get_target_e_stepper_from_command());
set_stealth_status(parser.value_bool(), get_target_e_stepper_from_command(0));
else
say_stealth_status();
}

2
Marlin/src/gcode/feature/trinamic/M906.cpp

@ -104,7 +104,7 @@ void GcodeSuite::M906() {
#if E_STEPPERS
case E_AXIS: {
const int8_t target_e_stepper = get_target_e_stepper_from_command();
const int8_t target_e_stepper = get_target_e_stepper_from_command(0);
if (target_e_stepper < 0) return;
switch (target_e_stepper) {
#if AXIS_IS_TMC(E0)

2
Marlin/src/gcode/feature/trinamic/M911-M914.cpp

@ -268,7 +268,7 @@
break;
#if E_STEPPERS
case E_AXIS: {
const int8_t target_e_stepper = get_target_e_stepper_from_command();
const int8_t target_e_stepper = get_target_e_stepper_from_command(0);
if (target_e_stepper < 0) return;
switch (target_e_stepper) {
TERN_(E0_HAS_STEALTHCHOP, case 0: TMC_SET_PWMTHRS_E(0); break;)

9
Marlin/src/gcode/gcode.cpp

@ -141,11 +141,12 @@ int8_t GcodeSuite::get_target_extruder_from_command() {
}
/**
* Get the target e stepper from the T parameter
* Return -1 if the T parameter is out of range or unspecified
* Get the target E stepper from the 'T' parameter.
* If there is no 'T' parameter then dval will be substituted.
* Returns -1 if the resulting E stepper index is out of range.
*/
int8_t GcodeSuite::get_target_e_stepper_from_command() {
const int8_t e = parser.intval('T', -1);
int8_t GcodeSuite::get_target_e_stepper_from_command(const int8_t dval/*=-1*/) {
const int8_t e = parser.intval('T', dval);
if (WITHIN(e, 0, E_STEPPERS - 1)) return e;
SERIAL_ECHO_START();

2
Marlin/src/gcode/gcode.h

@ -390,7 +390,7 @@ public:
static void say_units();
static int8_t get_target_extruder_from_command();
static int8_t get_target_e_stepper_from_command();
static int8_t get_target_e_stepper_from_command(const int8_t dval=-1);
static void get_destination_from_command();
static void process_parsed_command(const bool no_ok=false);

5
Marlin/src/gcode/lcd/M0_M1.cpp

@ -71,7 +71,10 @@ void GcodeSuite::M0_M1() {
else
ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_USERWAIT));
#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
DWIN_Popup_Confirm(ICON_BLTouch, parser.string_arg ?: GET_TEXT(MSG_STOPPED), GET_TEXT(MSG_USERWAIT));
if (parser.string_arg)
DWIN_Popup_Confirm(ICON_BLTouch, parser.string_arg, GET_TEXT_F(MSG_USERWAIT));
else
DWIN_Popup_Confirm(ICON_BLTouch, GET_TEXT_F(MSG_STOPPED), GET_TEXT_F(MSG_USERWAIT));
#else
if (parser.string_arg) {

61
Marlin/src/inc/Conditionals_post.h

@ -1633,11 +1633,8 @@
#if PIN_EXISTS(E0_MS1)
#define HAS_E0_MS_PINS 1
#endif
#if PIN_EXISTS(SOL0)
#define HAS_SOLENOID_0 1
#endif
#if E_STEPPERS > 1
#if E_STEPPERS > 1 || ENABLED(E_DUAL_STEPPER_DRIVERS)
#if PIN_EXISTS(E1_ENABLE) || AXIS_IS_L64XX(E1) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E1))
#define HAS_E1_ENABLE 1
#endif
@ -1650,9 +1647,6 @@
#if PIN_EXISTS(E1_MS1)
#define HAS_E1_MS_PINS 1
#endif
#if PIN_EXISTS(SOL1)
#define HAS_SOLENOID_1 1
#endif
#endif
#if E_STEPPERS > 2
@ -1668,9 +1662,6 @@
#if PIN_EXISTS(E2_MS1)
#define HAS_E2_MS_PINS 1
#endif
#if PIN_EXISTS(SOL2)
#define HAS_SOLENOID_2 1
#endif
#endif
#if E_STEPPERS > 3
@ -1686,9 +1677,6 @@
#if PIN_EXISTS(E3_MS1)
#define HAS_E3_MS_PINS 1
#endif
#if PIN_EXISTS(SOL3)
#define HAS_SOLENOID_3 1
#endif
#endif
#if E_STEPPERS > 4
@ -1704,9 +1692,6 @@
#if PIN_EXISTS(E4_MS1)
#define HAS_E4_MS_PINS 1
#endif
#if PIN_EXISTS(SOL4)
#define HAS_SOLENOID_4 1
#endif
#endif
#if E_STEPPERS > 5
@ -1722,9 +1707,6 @@
#if PIN_EXISTS(E5_MS1)
#define HAS_E5_MS_PINS 1
#endif
#if PIN_EXISTS(SOL5)
#define HAS_SOLENOID_5 1
#endif
#endif
#if E_STEPPERS > 6
@ -1740,9 +1722,6 @@
#if PIN_EXISTS(E6_MS1)
#define HAS_E6_MS_PINS 1
#endif
#if PIN_EXISTS(SOL6)
#define HAS_SOLENOID_6 1
#endif
#endif
#if E_STEPPERS > 7
@ -1758,9 +1737,6 @@
#if PIN_EXISTS(E7_MS1)
#define HAS_E7_MS_PINS 1
#endif
#if PIN_EXISTS(SOL7)
#define HAS_SOLENOID_7 1
#endif
#endif
#if !defined(DISABLE_INACTIVE_E) && ENABLED(DISABLE_E)
@ -1770,6 +1746,41 @@
#undef DISABLE_INACTIVE_E
#endif // HAS_EXTRUDERS
/**
* Set solenoid flags if any features use solenoids
* - EXT_SOLENOID (M380, M381) to enable/disable the extruder solenoid
* - MANUAL_SOLENOID_CONTROL (M380, M381) to enable/disable solenoids by index
* - PARKING_EXTRUDER uses SOL0_PIN and SOL1_PIN
* - SOLENOID_PROBE uses SOL1_PIN
* - Z_PROBE_SLED uses SOL1_PIN, when defined (unless EXT_SOLENOID is enabled)
*/
#if ANY(EXT_SOLENOID, MANUAL_SOLENOID_CONTROL, PARKING_EXTRUDER, SOLENOID_PROBE, Z_PROBE_SLED)
#if PIN_EXISTS(SOL0) && (EITHER(MANUAL_SOLENOID_CONTROL, PARKING_EXTRUDER) || BOTH(EXT_SOLENOID, HAS_EXTRUDERS))
#define HAS_SOLENOID_0 1
#endif
#if PIN_EXISTS(SOL1) && (ANY(MANUAL_SOLENOID_CONTROL, PARKING_EXTRUDER, SOLENOID_PROBE, Z_PROBE_SLED) || TERN0(EXT_SOLENOID, E_STEPPERS > 1))
#define HAS_SOLENOID_1 1
#endif
#if PIN_EXISTS(SOL2) && (ENABLED(MANUAL_SOLENOID_CONTROL) || TERN0(EXT_SOLENOID, E_STEPPERS > 2))
#define HAS_SOLENOID_2 2
#endif
#if PIN_EXISTS(SOL3) && (ENABLED(MANUAL_SOLENOID_CONTROL) || TERN0(EXT_SOLENOID, E_STEPPERS > 3))
#define HAS_SOLENOID_3 3
#endif
#if PIN_EXISTS(SOL4) && (ENABLED(MANUAL_SOLENOID_CONTROL) || TERN0(EXT_SOLENOID, E_STEPPERS > 4))
#define HAS_SOLENOID_4 4
#endif
#if PIN_EXISTS(SOL5) && (ENABLED(MANUAL_SOLENOID_CONTROL) || TERN0(EXT_SOLENOID, E_STEPPERS > 5))
#define HAS_SOLENOID_5 5
#endif
#if PIN_EXISTS(SOL6) && (ENABLED(MANUAL_SOLENOID_CONTROL) || TERN0(EXT_SOLENOID, E_STEPPERS > 6))
#define HAS_SOLENOID_6 6
#endif
#if PIN_EXISTS(SOL7) && (ENABLED(MANUAL_SOLENOID_CONTROL) || TERN0(EXT_SOLENOID, E_STEPPERS > 7))
#define HAS_SOLENOID_7 7
#endif
#endif
//
// Trinamic Stepper Drivers
//

2
Marlin/src/inc/SanityCheck.h

@ -1239,7 +1239,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
/**
* (Magnetic) Parking Extruder requirements
*/
#if ANY(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER)
#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER)
#if ENABLED(EXT_SOLENOID)
#error "(MAGNETIC_)PARKING_EXTRUDER and EXT_SOLENOID are incompatible. (Pins are used twice.)"
#elif EXTRUDERS != 2

14
Marlin/src/lcd/e3v2/common/dwin_api.h

@ -23,10 +23,11 @@
#include "../../../inc/MarlinConfig.h"
#ifndef DWIN_WIDTH
#if ENABLED(DWIN_MARLINUI_LANDSCAPE)
#define DWIN_WIDTH 480
#define DWIN_HEIGHT 272
#else
#define DWIN_WIDTH 272
#endif
#ifndef DWIN_HEIGHT
#define DWIN_HEIGHT 480
#endif
@ -174,9 +175,10 @@ void DWIN_Frame_AreaMove(uint8_t mode, uint8_t dir, uint16_t dis,
// rlimit: For draw less chars than string length use rlimit
void DWIN_Draw_String(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, const char * const string, uint16_t rlimit=0xFFFF);
inline void DWIN_Draw_String(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, FSTR_P title) {
// Note that this won't work on AVR, only 32-bit systems!
DWIN_Draw_String(bShow, size, color, bColor, x, y, FTOP(title));
inline void DWIN_Draw_String(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, FSTR_P const ftitle) {
char ctitle[strlen_P(FTOP(ftitle)) + 1];
strcpy_P(ctitle, FTOP(ftitle));
DWIN_Draw_String(bShow, size, color, bColor, x, y, ctitle);
}
// Draw a positive integer

50
Marlin/src/lcd/e3v2/creality/dwin.cpp

@ -359,12 +359,8 @@ inline void Clear_Title_Bar() {
DWIN_Draw_Box(1, Color_Bg_Blue, 0, 0, DWIN_WIDTH, TITLE_HEIGHT);
}
void Draw_Title(const char * const title) {
DWIN_Draw_String(false, DWIN_FONT_HEAD, Color_White, Color_Bg_Blue, 14, 4, (char*)title);
}
void Draw_Title(FSTR_P title) {
DWIN_Draw_String(false, DWIN_FONT_HEAD, Color_White, Color_Bg_Blue, 14, 4, (char*)title);
void Draw_Title(FSTR_P ftitle) {
DWIN_Draw_String(false, DWIN_FONT_HEAD, Color_White, Color_Bg_Blue, 14, 4, ftitle);
}
inline void Clear_Menu_Area() {
@ -420,18 +416,25 @@ inline uint16_t nr_sd_menu_items() {
return card.get_num_Files() + !card.flag.workDirIsRoot;
}
void Erase_Menu_Text(const uint8_t line) {
DWIN_Draw_Rectangle(1, Color_Bg_Black, LBLX, MBASE(line) - 14, 271, MBASE(line) + 28);
}
void Draw_Menu_Icon(const uint8_t line, const uint8_t icon) {
DWIN_ICON_Show(ICON, icon, 26, MBASE(line) - 3);
}
void Erase_Menu_Text(const uint8_t line) {
DWIN_Draw_Rectangle(1, Color_Bg_Black, LBLX, MBASE(line) - 14, 271, MBASE(line) + 28);
void _Decorate_Menu_Item(const uint8_t line, const uint8_t icon, bool more) {
if (icon) Draw_Menu_Icon(line, icon);
if (more) Draw_More_Icon(line);
}
void Draw_Menu_Item(const uint8_t line, const uint8_t icon=0, const char * const label=nullptr, bool more=false) {
if (label) DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(line) - 1, (char*)label);
if (icon) Draw_Menu_Icon(line, icon);
if (more) Draw_More_Icon(line);
_Decorate_Menu_Item(line, icon, more);
}
void Draw_Menu_Item(const uint8_t line, const uint8_t icon=0, FSTR_P const flabel=nullptr, bool more=false) {
if (flabel) DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(line) - 1, flabel);
_Decorate_Menu_Item(line, icon, more);
}
void Draw_Menu_Line(const uint8_t line, const uint8_t icon=0, const char * const label=nullptr, bool more=false) {
@ -439,13 +442,14 @@ void Draw_Menu_Line(const uint8_t line, const uint8_t icon=0, const char * const
DWIN_Draw_Line(Line_Color, 16, MBASE(line) + 33, 256, MBASE(line) + 34);
}
void Draw_Menu_LineF(const uint8_t line, const uint8_t icon=0, FSTR_P label=nullptr, bool more=false) {
Draw_Menu_Line(line, icon, (char*)label, more);
void Draw_Menu_Line(const uint8_t line, const uint8_t icon, FSTR_P const flabel, bool more=false) {
Draw_Menu_Item(line, icon, flabel, more);
DWIN_Draw_Line(Line_Color, 16, MBASE(line) + 33, 256, MBASE(line) + 34);
}
void Draw_Checkbox_Line(const uint8_t line, const bool ison) {
const uint16_t x = 225, y = EBASE(line) - 2;
DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, x + 5, y, F(ison ? "X" : " "));
DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, x + 5, y, ison ? F("X") : F(" "));
DWIN_Draw_Rectangle(0, Color_White, x + 2, y + 2, x + 16, y + 16);
}
@ -1853,7 +1857,7 @@ void Draw_SDItem(const uint16_t item, int16_t row=-1) {
if (row < 0) row = item + 1 + MROWS - index_file;
const bool is_subdir = !card.flag.workDirIsRoot;
if (is_subdir && item == 0) {
Draw_Menu_Line(row, ICON_Folder, "..");
Draw_Menu_Line(row, ICON_Folder, F(".."));
return;
}
@ -2531,7 +2535,7 @@ void Item_HomeOffs_X(const uint8_t row) {
}
else {
#ifdef USE_STRING_TITLES
Draw_Menu_LineF(row, ICON_HomeOffsetX, GET_TEXT_F(MSG_HOME_OFFSET_X));
Draw_Menu_Line(row, ICON_HomeOffsetX, GET_TEXT_F(MSG_HOME_OFFSET_X));
#else
say_home_offs_en(row); say_x_en(75, row); // "Home Offset X"
#endif
@ -2546,7 +2550,7 @@ void Item_HomeOffs_Y(const uint8_t row) {
}
else {
#ifdef USE_STRING_TITLES
Draw_Menu_LineF(row, ICON_HomeOffsetY, GET_TEXT_F(MSG_HOME_OFFSET_Y));
Draw_Menu_Line(row, ICON_HomeOffsetY, GET_TEXT_F(MSG_HOME_OFFSET_Y));
#else
say_home_offs_en(row); say_y_en(75, row); // "Home Offset X"
#endif
@ -2561,7 +2565,7 @@ void Item_HomeOffs_Z(const uint8_t row) {
}
else {
#ifdef USE_STRING_TITLES
Draw_Menu_LineF(row, ICON_HomeOffsetZ, GET_TEXT_F(MSG_HOME_OFFSET_Z));
Draw_Menu_Line(row, ICON_HomeOffsetZ, GET_TEXT_F(MSG_HOME_OFFSET_Z));
#else
say_home_offs_en(row); say_z_en(75, row); // "Home Offset Z"
#endif
@ -2604,8 +2608,8 @@ void Draw_HomeOff_Menu() {
DWIN_Frame_TitleCopy(124, 431, 91, 12); // "Probe Offsets"
#endif
#ifdef USE_STRING_TITLES
Draw_Menu_LineF(1, ICON_ProbeOffsetX, GET_TEXT_F(MSG_ZPROBE_XOFFSET)); // Probe X Offset
Draw_Menu_LineF(2, ICON_ProbeOffsetY, GET_TEXT_F(MSG_ZPROBE_YOFFSET)); // Probe Y Offset
Draw_Menu_Line(1, ICON_ProbeOffsetX, GET_TEXT_F(MSG_ZPROBE_XOFFSET)); // Probe X Offset
Draw_Menu_Line(2, ICON_ProbeOffsetY, GET_TEXT_F(MSG_ZPROBE_YOFFSET)); // Probe Y Offset
#else
say_probe_offs_en(1); say_x_en(75, 1); // "Probe Offset X"
say_probe_offs_en(2); say_y_en(75, 2); // "Probe Offset Y"
@ -3090,7 +3094,7 @@ void HMI_Temperature() {
}
else {
#ifdef USE_STRING_HEADINGS
Draw_Title(PREHEAT_1_LABEL " Settings"); // TODO: GET_TEXT_F
Draw_Title(F(PREHEAT_1_LABEL " Settings")); // TODO: GET_TEXT_F
#else
DWIN_Frame_TitleCopy(56, 15, 85, 14); // "Temperature" TODO: "PLA Settings"
#endif
@ -3169,7 +3173,7 @@ void HMI_Temperature() {
}
else {
#ifdef USE_STRING_HEADINGS
Draw_Title("ABS Settings"); // TODO: GET_TEXT_F
Draw_Title(F("ABS Settings")); // TODO: GET_TEXT_F
#else
DWIN_Frame_TitleCopy(56, 15, 85, 14); // "Temperature" TODO: "ABS Settings"
#endif
@ -3252,7 +3256,7 @@ void Draw_Max_Speed_Menu() {
}
else {
#ifdef USE_STRING_HEADINGS
Draw_Title("Max Speed (mm/s)"); // TODO: GET_TEXT_F
Draw_Title(F("Max Speed (mm/s)")); // TODO: GET_TEXT_F
#else
DWIN_Frame_TitleCopy(144, 16, 46, 11); // "Max Speed (mm/s)"
#endif

3
Marlin/src/lcd/e3v2/creality/dwin_lcd.h

@ -29,9 +29,6 @@
* @brief
********************************************************************************/
#define DWIN_WIDTH 272
#define DWIN_HEIGHT 480
#include "../common/dwin_api.h"
#include "../common/dwin_set.h"
#include "../common/dwin_font.h"

80
Marlin/src/lcd/e3v2/enhanced/dwin.cpp

@ -486,24 +486,31 @@ void Clear_Popup_Area() {
DWIN_Draw_Rectangle(1, HMI_data.Background_Color, 0, 31, DWIN_WIDTH, DWIN_HEIGHT);
}
void DWIN_Draw_Popup(uint8_t icon=0, const char * const msg1=nullptr, const char * const msg2=nullptr, uint8_t button=0) {
void DWIN_Draw_Popup1(const uint8_t icon) {
DWINUI::ClearMenuArea();
Draw_Popup_Bkgd_60();
if (icon) DWINUI::Draw_Icon(icon, 101, 105);
if (msg1) DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 210, msg1);
if (msg2) DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 240, msg2);
}
void DWIN_Draw_Popup2(FSTR_P const fmsg2, uint8_t button) {
if (fmsg2) DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 240, fmsg2);
if (button) DWINUI::Draw_Icon(button, 86, 280);
}
void DWIN_Popup_Confirm(uint8_t icon, const char * const msg1, const char * const msg2) {
HMI_SaveProcessID(WaitResponse);
DWIN_Draw_Popup(icon, msg1, msg2, ICON_Confirm_E); // Button Confirm
DWIN_UpdateLCD();
void DWIN_Draw_Popup(const uint8_t icon, const char * const cmsg1, FSTR_P const fmsg2, uint8_t button) {
DWIN_Draw_Popup1(icon);
if (cmsg1) DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 210, cmsg1);
DWIN_Draw_Popup2(fmsg2, button);
}
void DWIN_Draw_Popup(const uint8_t icon, FSTR_P const fmsg1, FSTR_P const fmsg2, uint8_t button) {
DWIN_Draw_Popup1(icon);
if (fmsg1) DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 210, fmsg1);
DWIN_Draw_Popup2(fmsg2, button);
}
void DWIN_Popup_Continue(uint8_t icon, const char * const msg1, const char * const msg2) {
void DWIN_Popup_Continue(const uint8_t icon, FSTR_P const fmsg1, FSTR_P const fmsg2) {
HMI_SaveProcessID(WaitResponse);
DWIN_Draw_Popup(icon, msg1, msg2, ICON_Continue_E); // Button Continue
DWIN_Draw_Popup(icon, fmsg1, fmsg2, ICON_Continue_E); // Button Continue
DWIN_UpdateLCD();
}
@ -521,7 +528,7 @@ void DWIN_Popup_Continue(uint8_t icon, const char * const msg1, const char * con
DWIN_UpdateLCD();
}
else
DWIN_Popup_Confirm(ICON_TempTooLow, "Nozzle is too cold", "Preheat the hotend");
DWIN_Popup_Confirm(ICON_TempTooLow, F("Nozzle is too cold"), F("Preheat the hotend"));
}
#endif
@ -565,7 +572,7 @@ void Popup_window_PauseOrStop() {
DWINUI::Draw_Icon(ICON_Cancel_C, 146, 280);
}
else {
DWIN_Draw_Popup(ICON_BLTouch, "Please confirm", select_print.now == PRINT_PAUSE_RESUME ? GET_TEXT(MSG_PAUSE_PRINT) : GET_TEXT(MSG_STOP_PRINT));
DWIN_Draw_Popup(ICON_BLTouch, F("Please confirm"), select_print.now == PRINT_PAUSE_RESUME ? GET_TEXT_F(MSG_PAUSE_PRINT) : GET_TEXT_F(MSG_STOP_PRINT));
DWINUI::Draw_Icon(ICON_Confirm_E, 26, 280);
DWINUI::Draw_Icon(ICON_Cancel_E, 146, 280);
}
@ -1098,7 +1105,7 @@ void Draw_Info_Menu() {
LOOP_L_N(i, 3) {
DWINUI::Draw_Icon(ICON_PrintSize + i, 26, 99 + i * 73);
DWIN_Draw_Line(HMI_data.SplitLine_Color, 16, MBASE(2) + i * 73, 256, 156 + i * 73);
DWIN_Draw_HLine(HMI_data.SplitLine_Color, 16, MBASE(2) + i * 73, 240);
}
DWIN_UpdateLCD();
@ -1386,7 +1393,7 @@ void HMI_PauseOrStop() {
#ifdef ACTION_ON_CANCEL
host_action_cancel();
#endif
DWIN_Draw_Popup(ICON_BLTouch, "Stopping..." , "Please wait until done.");
DWIN_Draw_Popup(ICON_BLTouch, F("Stopping...") , F("Please wait until done."));
}
else
Goto_PrintProcess(); // cancel stop
@ -1644,7 +1651,8 @@ void HMI_SaveProcessID(const uint8_t id) {
void DWIN_StartHoming() {
HMI_flag.home_flag = true;
HMI_SaveProcessID(Homing);
DWIN_Draw_Popup(ICON_BLTouch, "Axis Homing", "Please wait until done.");
Title.ShowCaption(F("Axis Homing"));
DWIN_Draw_Popup(ICON_BLTouch, F("Axis Homing"), F("Please wait until done."));
}
void DWIN_CompletedHoming() {
@ -1659,7 +1667,8 @@ void DWIN_CompletedHoming() {
void DWIN_MeshLevelingStart() {
#if HAS_ONESTEP_LEVELING
HMI_SaveProcessID(Leveling);
DWIN_Draw_Popup(ICON_AutoLeveling, GET_TEXT(MSG_BED_LEVELING), "Please wait until done.");
Title.ShowCaption(F("Bed Leveling"));
DWIN_Draw_Popup(ICON_AutoLeveling, GET_TEXT_F(MSG_BED_LEVELING), F("Please wait until done."));
#elif ENABLED(MESH_BED_LEVELING)
Draw_ManualMesh_Menu();
#endif
@ -1682,27 +1691,27 @@ void DWIN_PidTuning(pidresult_t result) {
switch (result) {
case PID_BED_START:
HMI_SaveProcessID(NothingToDo);
DWIN_Draw_Popup(ICON_TempTooHigh, GET_TEXT(MSG_PID_AUTOTUNE), "for BED is running.");
DWIN_Draw_Popup(ICON_TempTooHigh, GET_TEXT_F(MSG_PID_AUTOTUNE), F("for BED is running."));
break;
case PID_EXTR_START:
HMI_SaveProcessID(NothingToDo);
DWIN_Draw_Popup(ICON_TempTooHigh, GET_TEXT(MSG_PID_AUTOTUNE), "for Nozzle is running.");
DWIN_Draw_Popup(ICON_TempTooHigh, GET_TEXT_F(MSG_PID_AUTOTUNE), F("for Nozzle is running."));
break;
case PID_BAD_EXTRUDER_NUM:
checkkey = last_checkkey;
DWIN_Popup_Confirm(ICON_TempTooLow, "PID Autotune failed!", "Bad extruder");
DWIN_Popup_Confirm(ICON_TempTooLow, F("PID Autotune failed!"), F("Bad extruder"));
break;
case PID_TUNING_TIMEOUT:
checkkey = last_checkkey;
DWIN_Popup_Confirm(ICON_TempTooHigh, "Error", GET_TEXT(MSG_PID_TIMEOUT));
DWIN_Popup_Confirm(ICON_TempTooHigh, F("Error"), GET_TEXT_F(MSG_PID_TIMEOUT));
break;
case PID_TEMP_TOO_HIGH:
checkkey = last_checkkey;
DWIN_Popup_Confirm(ICON_TempTooHigh, "PID Autotune failed!", "Temperature too high");
DWIN_Popup_Confirm(ICON_TempTooHigh, F("PID Autotune failed!"), F("Temperature too high"));
break;
case PID_DONE:
checkkey = last_checkkey;
DWIN_Popup_Confirm(ICON_TempTooLow, GET_TEXT(MSG_PID_AUTOTUNE), GET_TEXT(MSG_BUTTON_DONE));
DWIN_Popup_Confirm(ICON_TempTooLow, GET_TEXT_F(MSG_PID_AUTOTUNE), GET_TEXT_F(MSG_BUTTON_DONE));
break;
default:
checkkey = last_checkkey;
@ -1864,24 +1873,24 @@ void DWIN_Redraw_screen() {
#if ENABLED(ADVANCED_PAUSE_FEATURE)
void DWIN_Popup_Pause(const char *msg, uint8_t button = 0) {
void DWIN_Popup_Pause(FSTR_P const fmsg, uint8_t button = 0) {
HMI_SaveProcessID(button ? WaitResponse : NothingToDo);
DWIN_Draw_Popup(ICON_BLTouch, "Advanced Pause", msg, button);
DWIN_Draw_Popup(ICON_BLTouch, F("Advanced Pause"), fmsg, button);
ui.reset_status(true);
}
void MarlinUI::pause_show_message(const PauseMessage message, const PauseMode mode/*=PAUSE_MODE_SAME*/, const uint8_t extruder/*=active_extruder*/) {
switch (message) {
case PAUSE_MESSAGE_PARKING: DWIN_Popup_Pause(GET_TEXT(MSG_PAUSE_PRINT_PARKING)); break;
case PAUSE_MESSAGE_CHANGING: DWIN_Popup_Pause(GET_TEXT(MSG_FILAMENT_CHANGE_INIT)); break;
case PAUSE_MESSAGE_UNLOAD: DWIN_Popup_Pause(GET_TEXT(MSG_FILAMENT_CHANGE_UNLOAD)); break;
case PAUSE_MESSAGE_WAITING: DWIN_Popup_Pause(GET_TEXT(MSG_ADVANCED_PAUSE_WAITING), ICON_Continue_E); break;
case PAUSE_MESSAGE_INSERT: DWIN_Popup_Continue(ICON_BLTouch, "Advanced Pause", GET_TEXT(MSG_FILAMENT_CHANGE_INSERT)); break;
case PAUSE_MESSAGE_LOAD: DWIN_Popup_Pause(GET_TEXT(MSG_FILAMENT_CHANGE_LOAD)); break;
case PAUSE_MESSAGE_PURGE: DWIN_Popup_Pause(GET_TEXT(MSG_FILAMENT_CHANGE_PURGE)); break;
case PAUSE_MESSAGE_PARKING: DWIN_Popup_Pause(GET_TEXT_F(MSG_PAUSE_PRINT_PARKING)); break;
case PAUSE_MESSAGE_CHANGING: DWIN_Popup_Pause(GET_TEXT_F(MSG_FILAMENT_CHANGE_INIT)); break;
case PAUSE_MESSAGE_UNLOAD: DWIN_Popup_Pause(GET_TEXT_F(MSG_FILAMENT_CHANGE_UNLOAD)); break;
case PAUSE_MESSAGE_WAITING: DWIN_Popup_Pause(GET_TEXT_F(MSG_ADVANCED_PAUSE_WAITING), ICON_Continue_E); break;
case PAUSE_MESSAGE_INSERT: DWIN_Popup_Continue(ICON_BLTouch, F("Advanced Pause"), GET_TEXT_F(MSG_FILAMENT_CHANGE_INSERT)); break;
case PAUSE_MESSAGE_LOAD: DWIN_Popup_Pause(GET_TEXT_F(MSG_FILAMENT_CHANGE_LOAD)); break;
case PAUSE_MESSAGE_PURGE: DWIN_Popup_Pause(GET_TEXT_F(MSG_FILAMENT_CHANGE_PURGE)); break;
case PAUSE_MESSAGE_OPTION: DWIN_Popup_FilamentPurge(); break;
case PAUSE_MESSAGE_RESUME: DWIN_Popup_Pause(GET_TEXT(MSG_FILAMENT_CHANGE_RESUME)); break;
case PAUSE_MESSAGE_HEAT: DWIN_Popup_Pause(GET_TEXT(MSG_FILAMENT_CHANGE_HEAT), ICON_Continue_E); break;
case PAUSE_MESSAGE_RESUME: DWIN_Popup_Pause(GET_TEXT_F(MSG_FILAMENT_CHANGE_RESUME)); break;
case PAUSE_MESSAGE_HEAT: DWIN_Popup_Pause(GET_TEXT_F(MSG_FILAMENT_CHANGE_HEAT), ICON_Continue_E); break;
case PAUSE_MESSAGE_HEATING: ui.set_status_P(GET_TEXT(MSG_FILAMENT_CHANGE_HEATING)); break;
case PAUSE_MESSAGE_STATUS: HMI_ReturnScreen(); break;
default: break;
@ -1889,7 +1898,7 @@ void DWIN_Redraw_screen() {
}
void Draw_Popup_FilamentPurge() {
DWIN_Draw_Popup(ICON_BLTouch, "Advanced Pause", "Purge or Continue?");
DWIN_Draw_Popup(ICON_BLTouch, F("Advanced Pause"), F("Purge or Continue?"));
DWINUI::Draw_Icon(ICON_Confirm_E, 26, 280);
DWINUI::Draw_Icon(ICON_Continue_E, 146, 280);
Draw_Select_Highlight(true);
@ -1928,7 +1937,7 @@ void DWIN_Redraw_screen() {
#if HAS_MESH
void DWIN_MeshViewer() {
if (!leveling_is_valid())
DWIN_Popup_Continue(ICON_BLTouch, "Mesh viewer", "No valid mesh");
DWIN_Popup_Continue(ICON_BLTouch, F("Mesh viewer"), F("No valid mesh"));
else {
HMI_SaveProcessID(WaitResponse);
MeshViewer.Draw();
@ -2334,7 +2343,8 @@ void SetSpeed() { SetPIntOnClick(MIN_PRINT_SPEED, MAX_PRINT_SPEED); }
#endif // ADVANCED_PAUSE_FEATURE
void SetFlow() { SetPIntOnClick(MIN_PRINT_FLOW, MAX_PRINT_FLOW); }
void ApplyFlow() { planner.refresh_e_factor(0); }
void SetFlow() { SetPIntOnClick(MIN_PRINT_FLOW, MAX_PRINT_FLOW, ApplyFlow); }
// Leveling Bed Corners
void LevBed(uint8_t point) {

30
Marlin/src/lcd/e3v2/enhanced/dwin.h

@ -152,16 +152,6 @@ extern HMI_data_t HMI_data;
extern uint8_t checkkey;
extern millis_t dwin_heat_time;
// Popup windows
void DWIN_Popup_Confirm(uint8_t icon, const char * const msg1, const char * const msg2);
#if HAS_HOTEND || HAS_HEATED_BED
void DWIN_Popup_Temperature(const bool toohigh);
#endif
#if HAS_HOTEND
void Popup_Window_ETempTooLow();
#endif
void Popup_Window_Resume();
// SD Card
void HMI_SDCardInit();
void HMI_SDCardUpdate();
@ -278,3 +268,23 @@ void Draw_Steps_Menu();
#if EITHER(HAS_BED_PROBE, BABYSTEPPING)
void Draw_ZOffsetWiz_Menu();
#endif
// Popup windows
void DWIN_Draw_Popup(const uint8_t icon, const char * const cmsg1, FSTR_P const fmsg2, uint8_t button=0);
void DWIN_Draw_Popup(const uint8_t icon, FSTR_P const fmsg1=nullptr, FSTR_P const fmsg2=nullptr, uint8_t button=0);
template<typename T, typename U>
void DWIN_Popup_Confirm(const uint8_t icon, T amsg1, U amsg2) {
HMI_SaveProcessID(WaitResponse);
DWIN_Draw_Popup(icon, amsg1, amsg2, ICON_Confirm_E); // Button Confirm
DWIN_UpdateLCD();
}
#if HAS_HOTEND || HAS_HEATED_BED
void DWIN_Popup_Temperature(const bool toohigh);
#endif
#if HAS_HOTEND
void Popup_Window_ETempTooLow();
#endif
void Popup_Window_Resume();

2
Marlin/src/lcd/e3v2/enhanced/meshviewer.cpp

@ -51,7 +51,7 @@ void MeshViewerClass::Draw() {
NOLESS(maxz, v);
NOMORE(minz, v);
}
Title.ShowCaption(F("Mesh viewer"));
Title.ShowCaption(F("Mesh Viewer"));
DWINUI::ClearMenuArea();
DWINUI::Draw_Icon(ICON_Continue_E, 86, 305);
DWIN_Draw_Rectangle(0, HMI_data.SplitLine_Color, px(0), py(0), px(GRID_MAX_POINTS_X - 1), py(GRID_MAX_POINTS_Y - 1));

648
Marlin/src/lcd/e3v2/jyersui/dwin.cpp

File diff suppressed because it is too large

6
Marlin/src/lcd/e3v2/jyersui/dwin.h

@ -175,7 +175,9 @@ public:
static uint16_t GetColor(uint8_t color, uint16_t original, bool light=false);
static void Draw_Checkbox(uint8_t row, bool value);
static void Draw_Title(const char * title);
static void Draw_Title(FSTR_P const title);
static void Draw_Menu_Item(uint8_t row, uint8_t icon=0, const char * const label1=nullptr, const char * const label2=nullptr, bool more=false, bool centered=false);
static void Draw_Menu_Item(uint8_t row, uint8_t icon=0, FSTR_P const flabel1=nullptr, FSTR_P const flabel2=nullptr, bool more=false, bool centered=false);
static void Draw_Menu(uint8_t menu, uint8_t select=0, uint8_t scroll=0);
static void Redraw_Menu(bool lastprocess=true, bool lastselection=false, bool lastmenu=false);
static void Redraw_Screen();
@ -194,7 +196,7 @@ public:
static void Draw_SD_Item(uint8_t item, uint8_t row);
static void Draw_SD_List(bool removed=false);
static void Draw_Status_Area(bool icons=false);
static void Draw_Popup(PGM_P const line1, PGM_P const line2, PGM_P const line3, uint8_t mode, uint8_t icon=0);
static void Draw_Popup(FSTR_P const line1, FSTR_P const line2, FSTR_P const line3, uint8_t mode, uint8_t icon=0);
static void Popup_Select();
static void Update_Status_Bar(bool refresh=false);
@ -203,7 +205,7 @@ public:
static void Set_Mesh_Viewer_Status();
#endif
static const char * Get_Menu_Title(uint8_t menu);
static FSTR_P Get_Menu_Title(uint8_t menu);
static uint8_t Get_Menu_Size(uint8_t menu);
static void Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw=true);

5
Marlin/src/lcd/e3v2/marlinui/dwin_lcd.h

@ -28,11 +28,6 @@
#include "../../../inc/MarlinConfigPre.h"
#if ENABLED(DWIN_MARLINUI_LANDSCAPE)
#define DWIN_WIDTH 480
#define DWIN_HEIGHT 272
#endif
#include "../common/dwin_api.h"
// Picture ID

2
Marlin/src/module/stepper.cpp

@ -2744,7 +2744,7 @@ void Stepper::init() {
#if E_STEPPERS && HAS_E0_STEP
E_AXIS_INIT(0);
#endif
#if E_STEPPERS > 1 && HAS_E1_STEP
#if (E_STEPPERS > 1 || ENABLED(E_DUAL_STEPPER_DRIVERS)) && HAS_E1_STEP
E_AXIS_INIT(1);
#endif
#if E_STEPPERS > 2 && HAS_E2_STEP

4
Marlin/src/module/stepper/indirection.h

@ -751,14 +751,14 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
#endif
#ifndef ENABLE_STEPPER_E1
#if E_STEPPERS > 1 && HAS_E1_ENABLE
#if (E_STEPPERS > 1 || ENABLED(E_DUAL_STEPPER_DRIVERS)) && HAS_E1_ENABLE
#define ENABLE_STEPPER_E1() E1_ENABLE_WRITE( E_ENABLE_ON)
#else
#define ENABLE_STEPPER_E1() NOOP
#endif
#endif
#ifndef DISABLE_STEPPER_E1
#if E_STEPPERS > 1 && HAS_E1_ENABLE
#if (E_STEPPERS > 1 || ENABLED(E_DUAL_STEPPER_DRIVERS)) && HAS_E1_ENABLE
#define DISABLE_STEPPER_E1() E1_ENABLE_WRITE(!E_ENABLE_ON)
#else
#define DISABLE_STEPPER_E1() NOOP

6
Marlin/src/pins/pins.h

@ -555,6 +555,8 @@
#include "stm32f1/pins_CREALITY_V452.h" // STM32F1 env:STM32F103RET6_creality env:STM32F103RET6_creality_maple
#elif MB(CREALITY_V453)
#include "stm32f1/pins_CREALITY_V453.h" // STM32F1 env:STM32F103RET6_creality env:STM32F103RET6_creality_maple
#elif MB(CREALITY_V24S1)
#include "stm32f1/pins_CREALITY_V24S1.h" // STM32F1 env:STM32F103RET6_creality env:STM32F103RET6_creality_maple
#elif MB(TRIGORILLA_PRO)
#include "stm32f1/pins_TRIGORILLA_PRO.h" // STM32F1 env:trigorilla_pro env:trigorilla_pro_maple
#elif MB(FLY_MINI)
@ -571,6 +573,8 @@
#include "stm32f1/pins_ZM3E4_V1_0.h" // STM32F1 env:STM32F103VC_ZM3E4_USB env:STM32F103VC_ZM3E4_USB_maple
#elif MB(ZONESTAR_ZM3E4V2)
#include "stm32f1/pins_ZM3E4_V2_0.h" // STM32F1 env:STM32F103VE_ZM3E4V2_USB env:STM32F103VE_ZM3E4V2_USB_maple
#elif MB(ERYONE_ERY32_MINI)
#include "stm32f1/pins_ERYONE_ERY32_MINI.h" // STM32F103VET6 env:ERYONE_ERY32_MINI_maple
//
// ARM Cortex-M4F
@ -615,6 +619,8 @@
#include "stm32f4/pins_BTT_OCTOPUS_V1_0.h" // STM32F4 env:BIGTREE_OCTOPUS_V1 env:BIGTREE_OCTOPUS_V1_USB
#elif MB(BTT_OCTOPUS_V1_1)
#include "stm32f4/pins_BTT_OCTOPUS_V1_1.h" // STM32F4 env:BIGTREE_OCTOPUS_V1 env:BIGTREE_OCTOPUS_V1_USB
#elif MB(BTT_OCTOPUS_PRO_V1_0)
#include "stm32f4/pins_BTT_OCTOPUS_PRO_V1_0.h" // STM32F4 env:BIGTREE_OCTOPUS_V1 env:BIGTREE_OCTOPUS_V1_USB env:BIGTREE_OCTOPUS_PRO_V1_F429 env:BIGTREE_OCTOPUS_PRO_V1_F429_USB
#elif MB(LERDGE_K)
#include "stm32f4/pins_LERDGE_K.h" // STM32F4 env:LERDGEK env:LERDGEK_usb_flash_drive
#elif MB(LERDGE_S)

36
Marlin/src/pins/stm32f1/pins_CREALITY_V24S1.h

@ -0,0 +1,36 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2021 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 <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Creality v2.4.S1 (STM32F103RE) v101 as found in the Ender 7 board pin assignments
*/
#define BOARD_INFO_NAME "Creality v2.4.S1 V101"
#define DEFAULT_MACHINE_NAME "Creality3D"
//
// Heaters
//
#define HEATER_BED_PIN PA15 // HOT BED
#include "pins_CREALITY_V4.h"

9
Marlin/src/pins/stm32f1/pins_CREALITY_V4.h

@ -134,9 +134,12 @@
//
// Heaters / Fans
//
#define HEATER_0_PIN PA1 // HEATER1
#define HEATER_BED_PIN PA2 // HOT BED
#ifndef HEATER_0_PIN
#define HEATER_0_PIN PA1 // HEATER1
#endif
#ifndef HEATER_BED_PIN
#define HEATER_BED_PIN PA2 // HOT BED
#endif
#ifndef FAN_PIN
#define FAN_PIN PA0 // FAN
#endif

195
Marlin/src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h

@ -0,0 +1,195 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2021 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 <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Eryone Ery32 mini (STM32F103VET6) board pin assignments
*/
#include "env_validate.h"
#if HOTENDS > 2 || E_STEPPERS > 2
#error "Eryone Ery32 mini supports up to 2 hotends / E-steppers. Comment out this line to continue."
#endif
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "ERYONE Ery32 mini"
#endif
//#define DISABLE_DEBUG
#define DISABLE_JTAG
//#define ENABLE_SPI3
#define FLASH_EEPROM_EMULATION
#define FAN_SOFT_PWM
#if ENABLED(FLASH_EEPROM_EMULATION)
#define EEPROM_PAGE_SIZE (0x800U) // 2KB
#define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
#define MARLIN_EEPROM_SIZE (EEPROM_PAGE_SIZE)
#endif
//
// Servos
//
#define SERVO0_PIN PA12
//
// Limit Switches
//
#define X_STOP_PIN PD8
#define Y_STOP_PIN PD15
#define Z_MIN_PIN PA11
//#define Z_MAX_PIN PB1
//
// Steppers
//
#define X_STEP_PIN PB15
#define X_DIR_PIN PB14
#define X_ENABLE_PIN PD10
#define Y_STEP_PIN PD14
#define Y_DIR_PIN PD13
#define Y_ENABLE_PIN PC6
#define Z_STEP_PIN PC8
#define Z_DIR_PIN PC7
#define Z_ENABLE_PIN PA8
#define E0_STEP_PIN PE13
#define E0_DIR_PIN PE14
#define E0_ENABLE_PIN PB13
//#define E1_STEP_PIN PD13
//#define E1_DIR_PIN PD12
//#define E1_ENABLE_PIN PC6
//
// Heaters 0,1 / Fans / Bed
//
#define HEATER_0_PIN PD11
#if ENABLED(FET_ORDER_EFB) // Hotend, Fan, Bed
#define HEATER_BED_PIN PD12
#elif ENABLED(FET_ORDER_EEF) // Hotend, Hotend, Fan
#define HEATER_1_PIN PD4
#elif ENABLED(FET_ORDER_EEB) // Hotend, Hotend, Bed
#define HEATER_1_PIN PD4
#define HEATER_BED_PIN PD12
#elif ENABLED(FET_ORDER_EFF) // Hotend, Fan, Fan
#define FAN1_PIN PD12
#elif DISABLED(FET_ORDER_SF) // Not Spindle, Fan (i.e., "EFBF" or "EFBE")
#define HEATER_BED_PIN PD12
#if EITHER(HAS_MULTI_HOTEND, HEATERS_PARALLEL)
#define HEATER_1_PIN PB9
#else
#define FAN1_PIN PB9
#endif
#endif
#ifndef FAN_PIN
#if EITHER(FET_ORDER_EFB, FET_ORDER_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan
#define FAN_PIN PB5
#elif EITHER(FET_ORDER_EEF, FET_ORDER_SF) // Hotend, Hotend, Fan or Spindle, Fan
#define FAN_PIN PD12
#elif ENABLED(FET_ORDER_EEB) // Hotend, Hotend, Bed
#define FAN_PIN -1 // IO pin. Buffer needed
#else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE")
#define FAN_PIN PB5
#endif
#endif
//
// Misc. Functions
//
//#define PS_ON_PIN PB9
#if HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers
*
* Hardware serial communication ports.
* If undefined software serial is used according to the pins below
*/
#define X_HARDWARE_SERIAL MSerial4
#define Y_HARDWARE_SERIAL MSerial4
#define Z_HARDWARE_SERIAL MSerial4
#define E0_HARDWARE_SERIAL MSerial4
#ifndef X_SLAVE_ADDRESS
#define X_SLAVE_ADDRESS 2
#endif
#ifndef Y_SLAVE_ADDRESS
#define Y_SLAVE_ADDRESS 3
#endif
#ifndef Z_SLAVE_ADDRESS
#define Z_SLAVE_ADDRESS 1
#endif
#ifndef E0_SLAVE_ADDRESS
#define E0_SLAVE_ADDRESS 0
#endif
#endif
//
// Temperature Sensors
//
#define TEMP_BED_PIN PC2 //TB
#define TEMP_0_PIN PC1 //TH1
//#define TEMP_1_PIN PC3 //TH2
#define TEMP_BOARD_PIN PC3
#ifndef TEMP_SENSOR_BOARD
#define TEMP_SENSOR_BOARD 13
#endif
#define FIL_RUNOUT_PIN PA10 // MT_DET
//
// LCD Pins
//
#if HAS_WIRED_LCD
#define BEEPER_PIN PE12
#define BTN_ENC PE11
#define LCD_PINS_ENABLE PE10
#define LCD_PINS_RS PE9
#define BTN_EN1 PE4
#define BTN_EN2 PE3
#define LCD_PINS_D4 PE8
#define LCD_PINS_D5 PE7
#define LCD_PINS_D6 PB2
#define LCD_PINS_D7 PB1
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
#endif
#define BOARD_ST7920_DELAY_1 50
#define BOARD_ST7920_DELAY_2 50
#define BOARD_ST7920_DELAY_3 50
#endif // HAS_WIRED_LCD
//
// SD Card
//
#define ENABLE_SPI1
#define SD_DETECT_PIN PA4
#define SCK_PIN PA5
#define MISO_PIN PA6
#define MOSI_PIN PA7
#define SS_PIN PC4

39
Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_PRO_V1_0.h

@ -0,0 +1,39 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2021 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 <https://www.gnu.org/licenses/>.
*
*/
#pragma once
#define BOARD_INFO_NAME "BTT OCTOPUS PRO V1.0"
//
// Temperature Sensors
//
#if TEMP_SENSOR_0 == -5
#define TEMP_0_CS_PIN PF8 // Max31865 CS
#define TEMP_0_SCK_PIN PA5
#define TEMP_0_MISO_PIN PA6
#define TEMP_0_MOSI_PIN PA7
#define SOFTWARE_SPI // Max31865 and LCD SD share a set of SPIs, Set SD to softwareSPI for Max31865
#else
#define TEMP_0_PIN PF4 // TH0
#endif
#include "pins_BTT_OCTOPUS_V1_common.h"

9
Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_0.h

@ -23,4 +23,13 @@
#define BOARD_INFO_NAME "BTT OCTOPUS V1.0"
//
// Temperature Sensors
//
#if TEMP_SENSOR_0 == 20
#define TEMP_0_PIN PF8 // PT100 Connector
#else
#define TEMP_0_PIN PF4 // TH0
#endif
#include "pins_BTT_OCTOPUS_V1_common.h"

9
Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_1.h

@ -23,4 +23,13 @@
#define BOARD_INFO_NAME "BTT OCTOPUS V1.1"
//
// Temperature Sensors
//
#if TEMP_SENSOR_0 == 20
#define TEMP_0_PIN PF8 // PT100 Connector
#else
#define TEMP_0_PIN PF4 // TH0
#endif
#include "pins_BTT_OCTOPUS_V1_common.h"

11
Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h

@ -61,7 +61,11 @@
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN PB7
#if ENABLED(BLTOUCH)
#define Z_MIN_PROBE_PIN PB7
#else
#define Z_MIN_PROBE_PIN PC5 // Probe (Proximity switch) port
#endif
#endif
//
@ -235,11 +239,6 @@
// Temperature Sensors
//
#define TEMP_BED_PIN PF3 // TB
#if TEMP_SENSOR_0 == 20
#define TEMP_0_PIN PF8 // PT100 Connector
#else
#define TEMP_0_PIN PF4 // TH0
#endif
#define TEMP_1_PIN PF5 // TH1
#define TEMP_2_PIN PF6 // TH2
#define TEMP_3_PIN PF7 // TH3

14
Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V1_3_F4.h

@ -96,17 +96,3 @@
#ifndef XPT2046_Y_OFFSET
#define XPT2046_Y_OFFSET 349
#endif
#if HAS_TMC220x
/**
* TMC2208/TMC2209 stepper drivers
*/
//
// Software serial
//
#define E0_SERIAL_TX_PIN PC14
#define E0_SERIAL_RX_PIN PC14
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif

50
buildroot/share/PlatformIO/boards/marlin_BigTree_Octopus_Pro_v1_F429.json

@ -0,0 +1,50 @@
{
"build": {
"cpu": "cortex-m4",
"extra_flags": "-DSTM32F4 -DSTM32F429xx",
"f_cpu": "168000000L",
"mcu": "stm32f429zgt6",
"product_line": "STM32F429xx",
"variant": "MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429"
},
"connectivity": [
"can"
],
"debug": {
"default_tools": [
"stlink"
],
"jlink_device": "STM32F429ZG",
"onboard_tools": [
"stlink"
],
"openocd_board": "stm32f429",
"openocd_target": "stm32f4x",
"svd_path": "STM32F429x.svd"
},
"frameworks": [
"arduino",
"cmsis",
"mbed",
"stm32cube",
"libopencm3",
"zephyr"
],
"name": "STM32F429ZG (128k RAM, 64k CCM RAM, 1024k Flash",
"upload": {
"disable_flushing": false,
"maximum_ram_size": 131072,
"maximum_size": 1048576,
"protocol": "stlink",
"protocols": [
"stlink",
"dfu",
"jlink"
],
"require_upload_port": true,
"use_1200bps_touch": false,
"wait_for_upload_port": false
},
"url": "https://www.st.com/en/microcontrollers-microprocessors/stm32f429-439.html",
"vendor": "ST"
}

14
buildroot/share/PlatformIO/ldscripts/eryone_ery32_mini.ld

@ -0,0 +1,14 @@
MEMORY
{
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K - 4K
rom (rx) : ORIGIN = 0x08004000, LENGTH = 512K - 16K
}
/* 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

433
buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/PeripheralPins.c

@ -0,0 +1,433 @@
/*
*******************************************************************************
* Copyright (c) 2016, STMicroelectronics
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************
*/
#include "Arduino.h"
#include "PeripheralPins.h"
// =====
// Note: Commented lines are alternative possibilities which are not used per default.
// If you change them, you will have to know what you do
// =====
//*** ADC ***
#ifdef HAL_ADC_MODULE_ENABLED
const PinMap PinMap_ADC[] = {
{PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_IN3
{PA_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC2_IN4
{PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_IN10
{PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_IN11
{PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC1_IN12
{PC_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC1_IN13
{PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC1_IN14
{PF_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC3_IN9 TH_0
{PF_4, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC3_IN14 TH_1
{PF_5, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC3_IN15 TH_2
{PF_6, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC3_IN4 TH_3
{PF_7, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC3_IN5 EXP_13
{PF_8, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC3_IN6 PT100
{NC, NP, 0}
// {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC1_IN0
// {PA_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC2_IN0
// {PA_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC3_IN0
// {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_IN1
// {PA_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC2_IN1
// {PA_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC3_IN1
// {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2
// {PA_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC2_IN2
// {PA_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC3_IN2
// {PA_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC2_IN3
// {PA_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC3_IN3
//{PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_IN4
// {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_IN5
// {PA_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC2_IN5
// {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_IN6
// {PA_6, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC2_IN6
// {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_IN7
// {PA_7, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC2_IN7
// {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_IN8
// {PB_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC2_IN8
// {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_IN9
// {PB_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC2_IN9
// {PC_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC2_IN10
// {PC_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC3_IN10
// {PC_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC2_IN11
// {PC_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC3_IN11
// {PC_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC2_IN12
// {PC_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC3_IN12
// {PC_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC2_IN13
// {PC_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC3_IN13
// {PC_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC2_IN14
// {PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_IN15
// {PC_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC2_IN15
};
#endif
//*** DAC ***
#ifdef HAL_DAC_MODULE_ENABLED
const PinMap PinMap_DAC[] = {
// {PA_4, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC_OUT1
// {PA_5, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // DAC_OUT2 - LD2
{NC, NP, 0}
};
#endif
//*** I2C ***
#ifdef HAL_I2C_MODULE_ENABLED
const PinMap PinMap_I2C_SDA[] = {
// {PB_3, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)},
// {PB_4, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)},
// {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},
{PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},
// {PC_7, FMPI2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_FMPI2C1)},
// {PC_9, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)},
// {PC_12, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)},
{NC, NP, 0}
};
#endif
#ifdef HAL_I2C_MODULE_ENABLED
const PinMap PinMap_I2C_SCL[] = {
// {PA_8, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)},
// {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},
{PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},
// {PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)},
// {PC_6, FMPI2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_FMPI2C1)},
{NC, NP, 0}
};
#endif
//*** PWM ***
#ifdef HAL_TIM_MODULE_ENABLED
const PinMap PinMap_PWM[] = {
{PA_1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2 BED
{PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 HEATER0
{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 HEATER1
{PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 HEATER2
{PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 HEATER3
{PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 FAN0
{PE_5, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 FAN1
{PD_12, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 FAN2
{PD_13, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 FAN3
{PD_14, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 FAN4
{PD_15, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 FAN5
/**
* Unused by specifications on Octopus.
* Uncomment the corresponding line if you want to have HardwarePWM on some pins.
* WARNING: check timers' usage first to avoid conflicts.
* If you don't know what you're doing leave things as they are or you WILL break something (including hardware)
* If you alter this section DO NOT report bugs to Marlin team since they are most likely caused by you. Thank you.
*/
//{PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1
//{PA_0, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1
//{PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 BLTOUCH is a "servo"
//{PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 BLTOUCH is a "servo"
//{PA_1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2
//{PA_2, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 3, 0)}, // TIM5_CH3
//{PA_2, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1
//{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4
//{PA_3, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 4, 0)}, // TIM5_CH4
//{PA_3, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2
//{PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1
//{PA_5, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N
//{PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1
//{PA_6, TIM13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM13, 1, 0)}, // TIM13_CH1
//{PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N
//{PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2
//{PA_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N
//{PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM14, 1, 0)}, // TIM14_CH1
//{PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1
//{PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2
//{PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3
//{PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4
//{PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1
//{PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N
//{PB_0, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N
//{PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N
//{PB_1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N
//{PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2
//{PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1
//{PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2
//{PB_6, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1
//{PB_8, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3
//{PB_8, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1
//{PB_9, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4
//{PB_9, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1
//{PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3
//{PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4
//{PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N
//{PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N
//{PB_14, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N
//{PB_14, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 1, 0)}, // TIM12_CH1
//{PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N
//{PB_15, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N
//{PB_15, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 2, 0)}, // TIM12_CH2
//{PC_6, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 0)}, // TIM8_CH1
//{PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2
//{PC_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 0)}, // TIM8_CH2
//{PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3
//{PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4
//{PD_13, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2
//{PD_15, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4
//{PE_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N
//{PE_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1
//{PE_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N
//{PE_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2
//{PE_12, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N
//{PE_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3
//{PE_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4
//144 pins mcu, 114 gpio
//{PF_6, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1
//{PF_7, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1
//{PF_8, TIM13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM13, 1, 0)}, // TIM13_CH1
//{PF_9, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM14, 1, 0)}, // TIM14_CH1
//176 pins mcu, 140 gpio
//{PH_10, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1
//{PH_6, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 1, 0)}, // TIM12_CH1
//{PH_11, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2
//{PI_5, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 0)}, // TIM8_CH1
//{PI_6, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 0)}, // TIM8_CH2
{NC, NP, 0}
};
#endif
//*** SERIAL ***
#ifdef HAL_UART_MODULE_ENABLED
const PinMap PinMap_UART_TX[] = {
// {PA_0, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)},
// {PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
{PD_5, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
{PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
{PD_8, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
// {PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
// {PB_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
// {PC_6, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)},
// {PC_10, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)},
//{PC_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
// {PC_12, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)},
{NC, NP, 0}
};
#endif
#ifdef HAL_UART_MODULE_ENABLED
const PinMap PinMap_UART_RX[] = {
// {PA_1, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)},
// {PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
{PD_6, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
{PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
{PD_9, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
// {PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
// {PC_5, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
// {PC_7, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)},
// {PC_11, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)},
//{PC_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
// {PD_2, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)},
{NC, NP, 0}
};
#endif
#ifdef HAL_UART_MODULE_ENABLED
const PinMap PinMap_UART_RTS[] = {
// {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
// {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
// {PA_15, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)},
// {PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
// {PC_8, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART5)},
{NC, NP, 0}
};
#endif
#ifdef HAL_UART_MODULE_ENABLED
const PinMap PinMap_UART_CTS[] = {
// {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
// {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
// {PB_0, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)},
// {PB_13, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
// {PC_9, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART5)},
{NC, NP, 0}
};
#endif
//*** SPI ***
#ifdef HAL_SPI_MODULE_ENABLED
const PinMap PinMap_SPI_MOSI[] = {
{PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
// {PB_0, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI3)},
// {PB_2, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI3)},
// {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
// {PB_5, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
// {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
// {PC_1, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI2)},
// {PC_1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI3)},
// {PC_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
// {PC_12, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
{NC, NP, 0}
};
#endif
#ifdef HAL_SPI_MODULE_ENABLED
const PinMap PinMap_SPI_MISO[] = {
{PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
// {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
// {PB_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
// {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
// {PC_2, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
// {PC_11, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
{NC, NP, 0}
};
#endif
#ifdef HAL_SPI_MODULE_ENABLED
const PinMap PinMap_SPI_SCLK[] = {
{PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
// {PA_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
// {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
// {PB_3, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
// {PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
// {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
// {PC_7, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
// {PC_10, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
{NC, NP, 0}
};
#endif
#ifdef HAL_SPI_MODULE_ENABLED
const PinMap PinMap_SPI_SSEL[] = {
{PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
// {PA_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
// {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
// {PA_15, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
// {PB_4, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI2)},
// {PB_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
// {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
{NC, NP, 0}
};
#endif
//*** CAN ***
#ifdef HAL_CAN_MODULE_ENABLED
const PinMap PinMap_CAN_RD[] = {
// {PA_11, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)},
// {PB_5, CAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)},
// {PB_8, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)},
// {PB_12, CAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)},
{NC, NP, 0}
};
#endif
#ifdef HAL_CAN_MODULE_ENABLED
const PinMap PinMap_CAN_TD[] = {
// {PA_12, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)},
// {PB_6, CAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)},
// {PB_9, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)},
// {PB_13, CAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)},
{NC, NP, 0}
};
#endif
//*** ETHERNET ***
//*** No Ethernet ***
//*** QUADSPI ***
#ifdef HAL_QSPI_MODULE_ENABLED
const PinMap PinMap_QUADSPI[] = {
// {PA_1, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_BK1_IO3
// {PB_2, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_CLK
// {PB_6, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_QSPI)}, // QUADSPI_BK1_NCS
// {PC_9, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_BK1_IO0
// {PC_10, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_BK1_IO1
// {PC_11, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_BK2_NCS
{NC, NP, 0}
};
#endif
//*** USB ***
#ifdef HAL_PCD_MODULE_ENABLED
const PinMap PinMap_USB_OTG_FS[] = {
// {PA_8, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_SOF
// {PA_9, USB_OTG_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, 0)}, // USB_OTG_FS_VBUS
// {PA_10, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_ID
{PA_11, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DM
{PA_12, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DP
{NC, NP, 0}
};
const PinMap PinMap_USB_OTG_HS[] = {
//{PB_12, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_ID
//{PB_13, USB_OTG_HS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_HS_VBUS
{PB_14, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_DM
{PB_15, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_DP
/*#error "USB in HS mode isn't supported by the board"
{PA_3, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D0
{PB_0, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D1
{PB_1, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D2
{PB_5, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D7
{PB_10, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D3
{PB_12, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D5
{PB_13, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D6
{PC_0, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_STP
{PC_2, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_DIR
{PC_3, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_NXT
*/
{NC, NP, 0}
};
#ifdef HAL_SD_MODULE_ENABLED
WEAK const PinMap PinMap_SD[] = {
// {PB_8, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D4
// {PB_9, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D5
// {PC_6, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D6
// {PC_7, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D7
{PC_8, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D0
{PC_9, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D1
{PC_10, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D2
{PC_11, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D3
{PC_12, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_SDIO)}, // SDIO_CK
{PD_2, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_SDIO)}, // SDIO_CMD
{NC, NP, 0}
};
#endif
#endif

30
buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/PinNamesVar.h

@ -0,0 +1,30 @@
/* SYS_WKUP */
#ifdef PWR_WAKEUP_PIN1
SYS_WKUP1 = PA_0, /* SYS_WKUP0 */
#endif
#ifdef PWR_WAKEUP_PIN2
SYS_WKUP2 = NC,
#endif
#ifdef PWR_WAKEUP_PIN3
SYS_WKUP3 = NC,
#endif
#ifdef PWR_WAKEUP_PIN4
SYS_WKUP4 = NC,
#endif
#ifdef PWR_WAKEUP_PIN5
SYS_WKUP5 = NC,
#endif
#ifdef PWR_WAKEUP_PIN6
SYS_WKUP6 = NC,
#endif
#ifdef PWR_WAKEUP_PIN7
SYS_WKUP7 = NC,
#endif
#ifdef PWR_WAKEUP_PIN8
SYS_WKUP8 = NC,
#endif
/* USB */
#ifdef USBCON
USB_OTG_FS_DM = PA_11,
USB_OTG_FS_DP = PA_12,
#endif

53
buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/hal_conf_extra.h

@ -0,0 +1,53 @@
#pragma once
#define HAL_MODULE_ENABLED
#define HAL_ADC_MODULE_ENABLED
#define HAL_CRC_MODULE_ENABLED
#define HAL_DMA_MODULE_ENABLED
#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts
#define HAL_GPIO_MODULE_ENABLED
#define HAL_I2C_MODULE_ENABLED
#define HAL_PWR_MODULE_ENABLED
#define HAL_RCC_MODULE_ENABLED
//#define HAL_RTC_MODULE_ENABLED // Real Time Clock...do we use it?
#define HAL_SPI_MODULE_ENABLED
#define HAL_TIM_MODULE_ENABLED
#define HAL_USART_MODULE_ENABLED
#define HAL_CORTEX_MODULE_ENABLED
//#define HAL_UART_MODULE_ENABLED // by default
//#define HAL_PCD_MODULE_ENABLED // Since STM32 v3.10700.191028 this is automatically added if any type of USB is enabled (as in Arduino IDE)
#define HAL_SD_MODULE_ENABLED
//#undef HAL_SD_MODULE_ENABLED
#undef HAL_DAC_MODULE_ENABLED
#undef HAL_FLASH_MODULE_ENABLED
#undef HAL_CAN_MODULE_ENABLED
#undef HAL_CAN_LEGACY_MODULE_ENABLED
#undef HAL_CEC_MODULE_ENABLED
#undef HAL_CRYP_MODULE_ENABLED
#undef HAL_DCMI_MODULE_ENABLED
#undef HAL_DMA2D_MODULE_ENABLED
#undef HAL_ETH_MODULE_ENABLED
#undef HAL_NAND_MODULE_ENABLED
#undef HAL_NOR_MODULE_ENABLED
#undef HAL_PCCARD_MODULE_ENABLED
#undef HAL_SRAM_MODULE_ENABLED
#undef HAL_SDRAM_MODULE_ENABLED
#undef HAL_HASH_MODULE_ENABLED
#undef HAL_SMBUS_MODULE_ENABLED
#undef HAL_I2S_MODULE_ENABLED
#undef HAL_IWDG_MODULE_ENABLED
#undef HAL_LTDC_MODULE_ENABLED
#undef HAL_DSI_MODULE_ENABLED
#undef HAL_QSPI_MODULE_ENABLED
#undef HAL_RNG_MODULE_ENABLED
#undef HAL_SAI_MODULE_ENABLED
#undef HAL_IRDA_MODULE_ENABLED
#undef HAL_SMARTCARD_MODULE_ENABLED
#undef HAL_WWDG_MODULE_ENABLED
//#undef HAL_HCD_MODULE_ENABLED
#undef HAL_FMPI2C_MODULE_ENABLED
#undef HAL_SPDIFRX_MODULE_ENABLED
#undef HAL_DFSDM_MODULE_ENABLED
#undef HAL_LPTIM_MODULE_ENABLED
#undef HAL_MMC_MODULE_ENABLED

209
buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/ldscript.ld

@ -0,0 +1,209 @@
/*
*****************************************************************************
**
** File : LinkerScript.ld
**
** Abstract : Linker script for STM32F429VGTx Device with
** 2048KByte FLASH, 192KByte RAM
**
** Set heap size, stack size and stack location according
** to application requirements.
**
** Set memory bank area and size if external memory is used.
**
** Target : STMicroelectronics STM32
**
**
** Distribution: The file is distributed as is, without any warranty
** of any kind.
**
*****************************************************************************
** @attention
**
** <h2><center>&copy; COPYRIGHT(c) 2014 Ac6</center></h2>
**
** Redistribution and use in source and binary forms, with or without modification,
** are permitted provided that the following conditions are met:
** 1. Redistributions of source code must retain the above copyright notice,
** this list of conditions and the following disclaimer.
** 2. Redistributions in binary form must reproduce the above copyright notice,
** this list of conditions and the following disclaimer in the documentation
** and/or other materials provided with the distribution.
** 3. Neither the name of Ac6 nor the names of its contributors
** may be used to endorse or promote products derived from this software
** without specific prior written permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
*****************************************************************************
*/
/* Entry Point */
ENTRY(Reset_Handler)
/* Highest address of the user mode stack */
_estack = 0x20000000 + LD_MAX_DATA_SIZE; /* end of RAM */
/* Generate a link error if heap and stack don't fit into RAM */
_Min_Heap_Size = 0x200; /* required amount of heap */
_Min_Stack_Size = 0x400; /* required amount of stack */
/* Specify the memory areas */
MEMORY
{
FLASH (rx) : ORIGIN = 0x08000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE
CCMRAM (rw) : ORIGIN = 0x10000000, LENGTH = 64K
MEMORY_ARRAY (rw) : ORIGIN = 0x10000000, LENGTH = 0x144
}
/* Define output sections */
SECTIONS
{
/* The startup code goes first into FLASH */
.isr_vector :
{
. = ALIGN(4);
KEEP(*(.isr_vector)) /* Startup code */
. = ALIGN(4);
} >FLASH
/* The program code and other data goes into FLASH */
.text ALIGN(4):
{
. = ALIGN(4);
*(.text) /* .text sections (code) */
*(.text*) /* .text* sections (code) */
*(.glue_7) /* glue arm to thumb code */
*(.glue_7t) /* glue thumb to arm code */
*(.eh_frame)
KEEP (*(.init))
KEEP (*(.fini))
. = ALIGN(4);
_etext = .; /* define a global symbols at end of code */
} >FLASH
/* Constant data goes into FLASH */
.rodata ALIGN(4) :
{
. = ALIGN(4);
*(.rodata) /* .rodata sections (constants, strings, etc.) */
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
. = ALIGN(4);
} >FLASH
.ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH
.ARM : {
__exidx_start = .;
*(.ARM.exidx*)
__exidx_end = .;
} >FLASH
.preinit_array :
{
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP (*(.preinit_array*))
PROVIDE_HIDDEN (__preinit_array_end = .);
} >FLASH
.init_array :
{
PROVIDE_HIDDEN (__init_array_start = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array*))
PROVIDE_HIDDEN (__init_array_end = .);
} >FLASH
.fini_array :
{
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP (*(SORT(.fini_array.*)))
KEEP (*(.fini_array*))
PROVIDE_HIDDEN (__fini_array_end = .);
} >FLASH
/* used by the startup to initialize data */
_sidata = LOADADDR(.data);
/* Initialized data sections goes into RAM, load LMA copy after code */
.data :
{
. = ALIGN(4);
_sdata = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */
. = ALIGN(4);
_edata = .; /* define a global symbol at data end */
} >RAM AT> FLASH
_siccmram = LOADADDR(.ccmram);
/* CCM-RAM section
*
* IMPORTANT NOTE!
* If initialized variables will be placed in this section,
* the startup code needs to be modified to copy the init-values.
*/
.ccmram :
{
. = ALIGN(4);
_sccmram = .; /* create a global symbol at ccmram start */
*(.ccmram)
*(.ccmram*)
. = ALIGN(4);
_eccmram = .; /* create a global symbol at ccmram end */
} >CCMRAM AT> FLASH
/* Uninitialized data section */
. = ALIGN(4);
.bss :
{
/* This is used by the startup in order to initialize the .bss secion */
_sbss = .; /* define a global symbol at bss start */
__bss_start__ = _sbss;
*(.bss)
*(.bss*)
*(COMMON)
. = ALIGN(4);
_ebss = .; /* define a global symbol at bss end */
__bss_end__ = _ebss;
} >RAM
/* User_heap_stack section, used to check that there is enough RAM left */
._user_heap_stack :
{
. = ALIGN(8);
PROVIDE ( end = . );
PROVIDE ( _end = . );
. = . + _Min_Heap_Size;
. = . + _Min_Stack_Size;
. = ALIGN(8);
} >RAM
/* Remove information from the standard libraries */
/DISCARD/ :
{
libc.a ( * )
libm.a ( * )
libgcc.a ( * )
}
.ARM.attributes 0 : { *(.ARM.attributes) }
ExtRAMData : {*(.ExtRAMData)} >MEMORY_ARRAY
}

233
buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/variant.cpp

@ -0,0 +1,233 @@
/*
Copyright (c) 2011 Arduino. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "pins_arduino.h"
#ifdef __cplusplus
extern "C" {
#endif
// Pin number
const PinName digitalPin[] = {
PA_0, //D0
PA_1, //D1
PA_2, //D2
PA_3, //D3
PA_4, //D4
PA_5, //D5
PA_6, //D6
PA_7, //D7
PA_8, //D8
PA_9, //D9
PA_10, //D10
PA_11, //D11
PA_12, //D12
PA_13, //D13
PA_14, //D14
PA_15, //D15
PB_0, //D16
PB_1, //D17
PB_2, //D18
PB_3, //D19
PB_4, //D20
PB_5, //D21
PB_6, //D22
PB_7, //D23
PB_8, //D24
PB_9, //D25
PB_10, //D26
PB_11, //D27
PB_12, //D28
PB_13, //D29
PB_14, //D30
PB_15, //D31
PC_0, //D32
PC_1, //D33
PC_2, //D34
PC_3, //D35
PC_4, //D36
PC_5, //D37
PC_6, //D38
PC_7, //D39
PC_8, //D40
PC_9, //D41
PC_10, //D42
PC_11, //D43
PC_12, //D44
PC_13, //D45
PC_14, //D46
PC_15, //D47
PD_0, //D48
PD_1, //D49
PD_2, //D50
PD_3, //D51
PD_4, //D52
PD_5, //D53
PD_6, //D54
PD_7, //D55
PD_8, //D56
PD_9, //D57
PD_10, //D58
PD_11, //D59
PD_12, //D60
PD_13, //D61
PD_14, //D62
PD_15, //D63
PE_0, //D64
PE_1, //D65
PE_2, //D66
PE_3, //D67
PE_4, //D68
PE_5, //D69
PE_6, //D70
PE_7, //D71
PE_8, //D72
PE_9, //D73
PE_10, //D74
PE_11, //D75
PE_12, //D76
PE_13, //D77
PE_14, //D78
PE_15, //D79
PF_0, //D80
PF_1, //D81
PF_2, //D82
PF_3, //D83
PF_4, //D84
PF_5, //D85
PF_6, //D86
PF_7, //D87
PF_8, //D88
PF_9, //D89
PF_10, //D90
PF_11, //D91
PF_12, //D92
PF_13, //D93
PF_14, //D94
PF_15, //D95
PG_0, //D96
PG_1, //D97
PG_2, //D98
PG_3, //D99
PG_4, //D100
PG_5, //D101
PG_6, //D102
PG_7, //D103
PG_8, //D104
PG_9, //D105
PG_10, //D106
PG_11, //D107
PG_12, //D108
PG_13, //D109
PG_14, //D110
PG_15, //D111
//Duplicated ADC Pins
PA_3, //D112/A0
PA_4, //D113/A1
PC_0, //D114/A2
PC_1, //D115/A3
PC_2, //D116/A4
PC_3, //D117/A5
PC_4, //D118/A6
PF_3, //D119/A16 - 1:FSMC_A3 2:ADC3_IN9
PF_4, //D120/A17 - 1:FSMC_A4 2:ADC3_IN14
PF_5, //D121/A18 - 1:FSMC_A5 2:ADC3_IN15
PF_6, //D122/A19 - 1:TIM10_CH1 2:ADC3_IN4
PF_7, //D123/A20 - 1:TIM11_CH1 2:ADC3_IN5
PF_8, //D124/A20 - 1:TIM11_CH1 2:ADC3_IN6
};
#ifdef __cplusplus
}
#endif
// ----------------------------------------------------------------------------
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief System Clock Configuration
* The system Clock is configured as follow :
* System Clock source = PLL (HSE)
* SYSCLK(Hz) = 168000000
* HCLK(Hz) = 168000000
* AHB Prescaler = 1
* APB1 Prescaler = 4
* APB2 Prescaler = 2
* HSE Frequency(Hz) = 8000000
* PLL_M = 8
* PLL_N = 336
* PLL_P = 2
* PLL_Q = 7
* VDD(V) = 3.3
* Main regulator output voltage = Scale1 mode
* Flash Latency(WS) = 5
* @param None
* @retval None
*/
WEAK void SystemClock_Config(void)
{
RCC_ClkInitTypeDef RCC_ClkInitStruct;
RCC_OscInitTypeDef RCC_OscInitStruct;
/* Enable Power Control clock */
__HAL_RCC_PWR_CLK_ENABLE();
/* The voltage scaling allows optimizing the power consumption when the device is
clocked below the maximum system frequency, to update the voltage scaling value
regarding system frequency refer to product datasheet. */
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
/* Enable HSE Oscillator and activate PLL with HSE as source */
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
RCC_OscInitStruct.PLL.PLLM = 8;
RCC_OscInitStruct.PLL.PLLN = 336;
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
RCC_OscInitStruct.PLL.PLLQ = 7;
if(HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
{
/* Initialization Error */
}
if(HAL_PWREx_EnableOverDrive() != HAL_OK)
{
/* Initialization Error */
}
/* Select PLL as system clock source and configure the HCLK, PCLK1 and PCLK2
clocks dividers */
RCC_ClkInitStruct.ClockType = (RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2);
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;
if(HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5) != HAL_OK)
{
/* Initialization Error */
}
}
#ifdef __cplusplus
}
#endif

216
buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/variant.h

@ -0,0 +1,216 @@
/*
Copyright (c) 2011 Arduino. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _VARIANT_ARDUINO_STM32_
#define _VARIANT_ARDUINO_STM32_
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
/*----------------------------------------------------------------------------
* Pins
*----------------------------------------------------------------------------*/
#define PA0 0 //D0
#define PA1 1 //D1
#define PA2 2 //D2
#define PA3 3 //D3
#define PA4 4 //D4
#define PA5 5 //D5
#define PA6 6 //D6
#define PA7 7 //D7
#define PA8 8 //D8
#define PA9 9 //D9
#define PA10 10 //D10
#define PA11 11 //D11
#define PA12 12 //D12
#define PA13 13 //D13
#define PA14 14 //D14
#define PA15 15 //D15
#define PB0 16 //D16
#define PB1 17 //D17
#define PB2 18 //D18
#define PB3 19 //D19
#define PB4 20 //D20
#define PB5 21 //D21
#define PB6 22 //D22
#define PB7 23 //D23
#define PB8 24 //D24
#define PB9 25 //D25
#define PB10 26 //D26
#define PB11 27 //D27
#define PB12 28 //D28
#define PB13 29 //D29
#define PB14 30 //D30
#define PB15 31 //D31
#define PC0 32 //D32
#define PC1 33 //D33
#define PC2 34 //D34
#define PC3 35 //D35
#define PC4 36 //D36
#define PC5 37 //D37
#define PC6 38 //D38
#define PC7 39 //D39
#define PC8 40 //D40
#define PC9 41 //D41
#define PC10 42 //D42
#define PC11 43 //D43
#define PC12 44 //D44
#define PC13 45 //D45
#define PC14 46 //D46
#define PC15 47 //D47
#define PD0 48 //D48
#define PD1 49 //D49
#define PD2 50 //D50
#define PD3 51 //D51
#define PD4 52 //D52
#define PD5 53 //D53
#define PD6 54 //D54
#define PD7 55 //D55
#define PD8 56 //D56
#define PD9 57 //D57
#define PD10 58 //D58
#define PD11 59 //D59
#define PD12 60 //D60
#define PD13 61 //D61
#define PD14 62 //D62
#define PD15 63 //D63
#define PE0 64 //D64
#define PE1 65 //D65
#define PE2 66 //D66
#define PE3 67 //D67
#define PE4 68 //D68
#define PE5 69 //D69
#define PE6 70 //D70
#define PE7 71 //D71
#define PE8 72 //D72
#define PE9 73 //D73
#define PE10 74 //D74
#define PE11 75 //D75
#define PE12 76 //D76
#define PE13 77 //D77
#define PE14 78 //D78
#define PE15 79 //D79
#define PF0 80 //D64
#define PF1 81 //D65
#define PF2 82 //D66
#define PF3 83 //D67
#define PF4 84 //D68
#define PF5 85 //D69
#define PF6 86 //D70
#define PF7 87 //D71
#define PF8 88 //D72
#define PF9 89 //D73
#define PF10 90 //D74
#define PF11 91 //D75
#define PF12 92 //D76
#define PF13 93 //D77
#define PF14 94 //D78
#define PF15 95 //D79
#define PG0 96 //D64
#define PG1 97 //D65
#define PG2 98 //D66
#define PG3 99 //D67
#define PG4 100 //D68
#define PG5 101 //D69
#define PG6 102 //D70
#define PG7 103 //D71
#define PG8 104 //D72
#define PG9 105 //D73
#define PG10 106 //D74
#define PG11 107 //D75
#define PG12 108 //D76
#define PG13 109 //D77
#define PG14 110 //D78
#define PG15 111 //D79
// This must be a literal with the same value as PEND
#define NUM_DIGITAL_PINS 125
// This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS
#define NUM_ANALOG_INPUTS 13
#define NUM_ANALOG_FIRST 112
//#define ADC_RESOLUTION 12
// PWM resolution
//#define PWM_RESOLUTION 12
#define PWM_FREQUENCY 1000 // >= 20 Khz => inaudible noise for fans
#define PWM_MAX_DUTY_CYCLE 255
// SPI Definitions
#define PIN_SPI_SS PA4
#define PIN_SPI_MOSI PA7
#define PIN_SPI_MISO PA6
#define PIN_SPI_SCK PA5
// I2C Definitions
#define PIN_WIRE_SDA PB9
#define PIN_WIRE_SCL PB8
// Timer Definitions
// Do not use timer used by PWM pin. See PinMap_PWM.
#define TIMER_TONE TIM6
#define TIMER_SERVO TIM5
#define TIMER_SERIAL TIM7
// UART Definitions
//#define SERIAL_UART_INSTANCE 1 // Connected to EXP3 header
/* Enable Serial 3 */
#define HAVE_HWSERIAL1
#define HAVE_HWSERIAL3
// Default pin used for 'Serial' instance (ex: ST-Link)
// Mandatory for Firmata
#define PIN_SERIAL_RX PA10
#define PIN_SERIAL_TX PA9
/* HAL configuration */
#define HSE_VALUE 8000000U
#define FLASH_PAGE_SIZE (4U * 1024U)
#ifdef __cplusplus
} // extern "C"
#endif
/*----------------------------------------------------------------------------
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
#ifdef __cplusplus
// These serial port names are intended to allow libraries and architecture-neutral
// sketches to automatically default to the correct port name for a particular type
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
//
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
//
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
//
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
//
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
//
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
// pins are NOT connected to anything by default.
#define SERIAL_PORT_MONITOR Serial
#define SERIAL_PORT_HARDWARE_OPEN Serial
#endif
#endif /* _VARIANT_ARDUINO_STM32_ */

16
buildroot/share/PlatformIO/variants/MARLIN_MEGA_EXTENDED/pins_arduino.h

@ -85,19 +85,23 @@ static const uint8_t A15 = PIN_A15;
// A majority of the pins are NOT PCINTs, SO BE WARNED (i.e. you cannot use them as receive pins)
// Only pins available for RECEIVE (TRANSMIT can be on any pin):
// (I've deliberately left out pin mapping to the Hardware USARTs - seems senseless to me)
// Pins: 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69
// Pins: 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 75, 76, 77
#define digitalPinToPCICR(p) ( (((p) >= 10) && ((p) <= 13)) || \
(((p) >= 50) && ((p) <= 53)) || \
(((p) >= 62) && ((p) <= 69)) ? (&PCICR) : nullptr )
(((p) >= 62) && ((p) <= 69)) || \
(((p) >= 72) && ((p) <= 73)) || \
(((p) >= 75) && ((p) <= 77)) ? (&PCICR) : nullptr )
#define digitalPinToPCICRbit(p) ( (((p) >= 10) && ((p) <= 13)) || (((p) >= 50) && ((p) <= 53)) ? 0 : \
( (((p) >= 62) && ((p) <= 69)) ? 2 : \
0 ) )
( (((p) >= 72) && ((p) <= 73)) || (((p) >= 75) && ((p) <= 77)) ? 1 : \
0 ) ) )
#define digitalPinToPCMSK(p) ( (((p) >= 10) && ((p) <= 13)) || (((p) >= 50) && ((p) <= 53)) ? (&PCMSK0) : \
( (((p) >= 62) && ((p) <= 69)) ? (&PCMSK2) : \
nullptr ) )
( (((p) >= 72) && ((p) <= 73)) || (((p) >= 75) && ((p) <= 77)) ? (&PCMSK1) : \
nullptr ) ) )
#define digitalPinToPCMSKbit(p) ( (((p) >= 10) && ((p) <= 13)) ? ((p) - 6) : \
( ((p) == 50) ? 3 : \
@ -105,7 +109,9 @@ static const uint8_t A15 = PIN_A15;
( ((p) == 52) ? 1 : \
( ((p) == 53) ? 0 : \
( (((p) >= 62) && ((p) <= 69)) ? ((p) - 62) : \
0 ) ) ) ) ) )
( (((p) >= 72) && ((p) <= 73)) ? ((p) - 69) : \
( (((p) >= 75) && ((p) <= 77)) ? ((p) - 70) : \
0 ) ) ) ) ) ) ) )
#define digitalPinToInterrupt(p) ((p) == 2 ? 0 : ((p) == 3 ? 1 : ((p) >= 18 && (p) <= 21 ? 23 - (p) : NOT_AN_INTERRUPT)))

4
buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/mem-flash.inc

@ -1,5 +1,5 @@
MEMORY
{
ram (rwx) : ORIGIN = 0x20000C00, LENGTH = 61K
rom (rx) : ORIGIN = 0x08005000, LENGTH = 492K
ram (rwx) : ORIGIN = 0x20000C00, LENGTH = 64K - 3K
rom (rx) : ORIGIN = 0x08005000, LENGTH = 512K - 20K
}

19
ini/stm32f1-maple.ini

@ -400,3 +400,22 @@ board = genericSTM32F103VE
board_build.ldscript = ZONESTAR_ZM3E_512K.ld
build_flags = ${ZONESTAR_ZM3E_maple.build_flags} -DTONE_TIMER=1 -DTONE_CHANNEL=2
board_upload.maximum_size = 499712
#
# ERYONE ERY32 Mini (STM32F103VET6)
#
[env:ERYONE_ERY32_MINI_maple]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103VE
build_flags = ${common_stm32f1.build_flags}
-ffunction-sections -fdata-sections -nostdlib -MMD
-DMCU_STM32F103VE -DARDUINO_GENERIC_STM32F103V -DARDUINO_ARCH_STM32F1 -O0
-DDEBUG_LEVEL=DEBUG_NONE -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1
-DSS_TIMER=4
board_build.variant = MARLIN_F103Vx
board_build.ldscript = eryone_ery32_mini.ld
board_build.address = 0x08004000
build_unflags = ${common_stm32f1.build_unflags}
extra_scripts = ${common_stm32f1.extra_scripts}
buildroot/share/PlatformIO/scripts/custom_board.py

29
ini/stm32f4.ini

@ -231,7 +231,7 @@ build_flags = ${env:BIGTREE_SKR_2.build_flags} -DUSBD_USE_CDC_MSC
build_unflags = ${env:BIGTREE_SKR_2.build_unflags} -DUSBD_USE_CDC
#
# BigTreeTech Octopus V1.0/1.1 (STM32F446ZET6 ARM Cortex-M4)
# BigTreeTech Octopus V1.0/1.1 / Octopus Pro V1.0 (STM32F446ZET6 ARM Cortex-M4)
#
[env:BIGTREE_OCTOPUS_V1]
platform = ${common_stm32.platform}
@ -242,7 +242,7 @@ build_flags = ${stm32_variant.build_flags}
-DSTM32F446_5VX -DUSE_USB_HS_IN_FS
#
# BigTreeTech Octopus V1.0/1.1 (STM32F446ZET6 ARM Cortex-M4) with USB Flash Drive Support
# BigTreeTech Octopus V1.0/1.1 / Octopus Pro V1.0 (STM32F446ZET6 ARM Cortex-M4) with USB Flash Drive Support
#
[env:BIGTREE_OCTOPUS_V1_USB]
platform = ${common_stm32.platform}
@ -255,6 +255,31 @@ build_flags = ${stm_flash_drive.build_flags}
-DUSBD_IRQ_SUBPRIO=6
-DUSBD_USE_CDC_MSC
#
# BigTreeTech Octopus Pro V1.0 (STM32F429ZGT6 ARM Cortex-M4)
#
[env:BIGTREE_OCTOPUS_PRO_V1_F429]
platform = ${common_stm32.platform}
extends = stm32_variant
board = marlin_BigTree_Octopus_Pro_v1_F429
board_build.offset = 0x8000
build_flags = ${stm32_variant.build_flags}
-DUSE_USB_HS_IN_FS
#
# BigTreeTech Octopus Pro V1.0 (STM32F429ZGT6 ARM Cortex-M4) with USB Flash Drive Support
#
[env:BIGTREE_OCTOPUS_PRO_V1_F429_USB]
platform = ${common_stm32.platform}
extends = env:BIGTREE_OCTOPUS_PRO_V1_F429
platform_packages = ${stm_flash_drive.platform_packages}
build_unflags = -DUSBD_USE_CDC
build_flags = ${stm_flash_drive.build_flags}
-DSTM32F446_5VX -DUSE_USB_HS_IN_FS
-DUSE_USBHOST_HS -DUSBD_IRQ_PRIO=5
-DUSBD_IRQ_SUBPRIO=6
-DUSBD_USE_CDC_MSC
#
# Lerdge base
#

Loading…
Cancel
Save