From 6dd6e22dda45c8435ed584a191f6e15ae2e347db Mon Sep 17 00:00:00 2001 From: InsanityAutomation Date: Sat, 25 Jul 2020 00:57:48 -0400 Subject: [PATCH] Finish Configs A few more files to bring in from lulzbot repo, slow walk to verify all configs, test Bilinear Vs UBL, configure and test dual z stepper for Workhorse and Taz 6 --- Marlin/Configuration.h | 24 +- Marlin/Configuration_adv.h | 236 +++++++---- platformio.ini | 801 ++----------------------------------- 3 files changed, 206 insertions(+), 855 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 8ef620b3ac..1cdd270d5e 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1,6 +1,6 @@ //#define Mini //#define MiniV2 -#define Taz6 +//#define Taz6 //#define Workhorse //#define TazPro @@ -78,7 +78,7 @@ // Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "Lulzbot" // Who made the changes. -//#define CUSTOM_VERSION_FILE Version.h // Path from the root directory (no quotes) +#define CUSTOM_VERSION_FILE Version.h // Path from the root directory (no quotes) /** * *** VENDORS PLEASE READ *** @@ -92,9 +92,7 @@ */ // Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** -#if DISABLED(Mini) - #define SHOW_BOOTSCREEN -#endif +#define SHOW_BOOTSCREEN // Show the bitmap in Marlin/_Bootscreen.h on startup. #define SHOW_CUSTOM_BOOTSCREEN @@ -578,7 +576,7 @@ * When set to any value below 255, enables a form of PWM to the bed that acts like a divider * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) */ -if ANY(Workhorse, Taz6) +#if ANY(Workhorse, Taz6) #define MAX_BED_POWER 206 // limits duty cycle to bed; 255=full current #else #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current @@ -741,7 +739,7 @@ if ANY(Workhorse, Taz6) #endif #define Z_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop. #define X_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. -#if ANY(Mini, MiniV2) +#if ANY(Mini, MiniV2, TazPro) #define Y_MAX_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop. #else #define Y_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. @@ -1254,7 +1252,7 @@ if ANY(Workhorse, Taz6) #else #define Y_HOME_DIR 1 #endif -#if ANY(Mini, MiniV2, TazPro) +#if ANY(Mini, MiniV2, TazPro, Workhorse) #define Z_HOME_DIR 1 #else #define Z_HOME_DIR -1 @@ -1575,7 +1573,7 @@ if ANY(Workhorse, Taz6) // - Move the Z probe (or nozzle) to a defined XY point before Z Homing. // - Prevent Z homing when the Z probe is outside bed area. // -#if ANY(Mini,Taz6) +#if ENABLED(Taz6) #define Z_SAFE_HOMING #endif @@ -1725,7 +1723,7 @@ if ANY(Workhorse, Taz6) #if ENABLED(NOZZLE_PARK_FEATURE) // Specify a park position as { X, Y, Z_raise } - #define NOZZLE_PARK_POINT { X_CENTER, (Y_MAX - 5), 5 } + #define NOZZLE_PARK_POINT { X_CENTER, (Y_MAX_POS - 5), 5 } //#define NOZZLE_PARK_X_ONLY // X move only is required to park //#define NOZZLE_PARK_Y_ONLY // Y move only is required to park #define NOZZLE_PARK_Z_RAISE_MIN 2 // (mm) Always raise Z by at least this distance @@ -2603,12 +2601,14 @@ if ANY(Workhorse, Taz6) * Set this manually if there are extra servos needing manual control. * Leave undefined or set to 0 to entirely disable the servo subsystem. */ -//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command +#if ENABLED(TazPro) + #define NUM_SERVOS 2 // Servo index starts with 0 for M280 command +#endif // (ms) Delay before the next move will start, to give the servo time to reach its target angle. // 300ms is a good value but you can try less delay. // If the servo can't reach the requested position, increase it. -#define SERVO_DELAY { 300 } +#define SERVO_DELAY { 300, 300 } // Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 7645125b0d..ff3a9431ee 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -373,7 +373,11 @@ */ #define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - #define CONTROLLER_FAN_PIN FAN2_PIN // Set a custom pin for the controller fan + #if ANY(Mini, MiniV2, TazPro) + #define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + #else + #define CONTROLLER_FAN_PIN FAN2_PIN // Set a custom pin for the controller fan + #endif //#define CONTROLLER_FAN_USE_Z_ONLY // With this option only the Z axis is considered //#define CONTROLLER_FAN_IGNORE_Z // Ignore Z stepper. Useful when stepper timeout is disabled. #define CONTROLLERFAN_SPEED_MIN 0 // (0-255) Minimum speed. (If set below this value the fan is turned off.) @@ -627,14 +631,15 @@ * the position of the toolhead relative to the workspace. */ -//#define SENSORLESS_BACKOFF_MM { 2, 2 } // (mm) Backoff from endstops before sensorless homing +#if ANY(MiniV2, TazPro) + #define SENSORLESS_BACKOFF_MM { 2, 2 } // (mm) Backoff from endstops before sensorless homing +#else + #define HOMING_BACKOFF_POST_MM { 2, 2, 16 } // (mm) Backoff from endstops after homing + #define QUICK_HOME // If G28 contains XY do a diagonal move first +#endif #define HOMING_BUMP_MM { 5, 5, 2 } // (mm) Backoff from endstops after first bump #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) - -#define HOMING_BACKOFF_POST_MM { 2, 2, 16 } // (mm) Backoff from endstops after homing - -#define QUICK_HOME // If G28 contains XY do a diagonal move first //#define HOME_Y_BEFORE_X // If G28 contains XY home Y before X //#define CODEPENDENT_XY_HOMING // If X/Y can't home without homing Y/X first @@ -823,7 +828,9 @@ // If the Nozzle or Bed falls when the Z stepper is disabled, set its resting position here. //#define Z_AFTER_DEACTIVATE Z_HOME_POS -//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated +#if ANY(TazPro,MiniV2) + #define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated +#endif // Minimum time that a segment needs to take as the buffer gets emptied #define DEFAULT_MINSEGMENTTIME 20000 // (µs) Set with M205 B. @@ -863,9 +870,13 @@ #if ENABLED(BACKLASH_COMPENSATION) // Define values for backlash distance and correction. // If BACKLASH_GCODE is enabled these values are the defaults. - #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm) - #define BACKLASH_CORRECTION 0.0 // 0.0 = no correction; 1.0 = full correction - + #if ENABLED(TazPro) + #define BACKLASH_DISTANCE_MM {0.252, 0.183, 0.075} // <-- changed: (mm) + #define BACKLASH_CORRECTION 1.0 // <-- changed: 0.0 = no correction; 1.0 = full correction + #else + #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm) + #define BACKLASH_CORRECTION 0.0 // 0.0 = no correction; 1.0 = full correction + #endif // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments // to reduce print artifacts. (Enabling this is costly in memory and computation!) //#define BACKLASH_SMOOTHING_MM 3 // (mm) @@ -901,7 +912,7 @@ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within * ±5mm of true values for G425 to succeed. */ -//#define CALIBRATION_GCODE +#define CALIBRATION_GCODE #if ENABLED(CALIBRATION_GCODE) //#define CALIBRATION_SCRIPT_PRE "M117 Starting Auto-Calibration\nT0\nG28\nG12\nM117 Calibrating..." @@ -921,15 +932,47 @@ //#define CALIBRATION_REPORTING // The true location and dimension the cube/bolt/washer on the bed. - #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0 } // mm - #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0 } // mm + #if ENABLED(Mini) + #define CALIBRATION_OBJECT_CENTER {169.5, 171.3, 0} // <-- changed: mm + #define CALIBRATION_OBJECT_DIMENSIONS {22.0, 22.0, 1.5} // <-- changed: mm - // Comment out any sides which are unreachable by the probe. For best - // auto-calibration results, all sides must be reachable. - #define CALIBRATION_MEASURE_RIGHT - #define CALIBRATION_MEASURE_FRONT - #define CALIBRATION_MEASURE_LEFT - #define CALIBRATION_MEASURE_BACK + // Comment out any sides which are unreachable by the probe. For best + // auto-calibration results, all sides must be reachable. + //#define CALIBRATION_MEASURE_RIGHT // <-- changed + #define CALIBRATION_MEASURE_FRONT + #define CALIBRATION_MEASURE_LEFT + //#define CALIBRATION_MEASURE_BACK + #elif ENABLED(MiniV2) + #define CALIBRATION_OBJECT_CENTER {169.5, 171.3, 0} // <-- changed: mm + #define CALIBRATION_OBJECT_DIMENSIONS {22.0, 22.0, 1.5} // <-- changed: mm + + // Comment out any sides which are unreachable by the probe. For best + // auto-calibration results, all sides must be reachable. + //#define CALIBRATION_MEASURE_RIGHT // <-- changed + #define CALIBRATION_MEASURE_FRONT + #define CALIBRATION_MEASURE_LEFT + //#define CALIBRATION_MEASURE_BACK // <-- changed + #elif ENABLED(Taz6) + #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0 } // mm + #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0 } // mm + + // Comment out any sides which are unreachable by the probe. For best + // auto-calibration results, all sides must be reachable. + #define CALIBRATION_MEASURE_RIGHT + #define CALIBRATION_MEASURE_FRONT + #define CALIBRATION_MEASURE_LEFT + #define CALIBRATION_MEASURE_BACK + #elif ANY(Workhorse, TazPro) + #define CALIBRATION_OBJECT_CENTER {261.0, -22.0, -2.0} // <-- changed: mm + #define CALIBRATION_OBJECT_DIMENSIONS {10.0, 10.0, 10.0} // <-- changed: mm + + // Comment out any sides which are unreachable by the probe. For best + // auto-calibration results, all sides must be reachable. + #define CALIBRATION_MEASURE_RIGHT + #define CALIBRATION_MEASURE_FRONT // <-- changed + #define CALIBRATION_MEASURE_LEFT + #define CALIBRATION_MEASURE_BACK + #endif // Probing at the exact top center only works if the center is flat. If // probing on a screwhead or hollow washer, probe near the edges. @@ -986,8 +1029,13 @@ * M908 - BQ_ZUM_MEGA_3D, RAMBO, PRINTRBOARD_REVF, RIGIDBOARD_V2 & SCOOVO_X9H * M909, M910 & LCD - only PRINTRBOARD_REVF & RIGIDBOARD_V2 */ -//#define PWM_MOTOR_CURRENT { 1300, 1300, 1250 } // Values in milliamps -#define DIGIPOT_MOTOR_CURRENT { 175,175,200,135,135 } // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) +#if ENABLED(Mini) + #define PWM_MOTOR_CURRENT {1300, 1630, 1250} // Values in milliamps +#elif ENABLED(Taz6) + #define DIGIPOT_MOTOR_CURRENT { 175,175,200,135,135 } // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) +#elif ENABLED(Workhorse) + #define DIGIPOT_MOTOR_CURRENT {175, 175, 180, 177, 177} // <-- changed: Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) +#endif //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 } // Default drive percent - X, Y, Z, E axis /** @@ -1247,7 +1295,9 @@ * * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ - //#define USB_FLASH_DRIVE_SUPPORT + #if ENABLED(TazPro) + #define USB_FLASH_DRIVE_SUPPORT + #endif #if ENABLED(USB_FLASH_DRIVE_SUPPORT) #define USB_CS_PIN SDSS #define USB_INTR_PIN SD_DETECT_PIN @@ -1332,7 +1382,7 @@ // A smaller font may be used on the Info Screen. Costs 2300 bytes of PROGMEM. // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese. - //#define USE_SMALL_INFOFONT + #define USE_SMALL_INFOFONT // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE @@ -1433,17 +1483,17 @@ //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) - //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + #define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI //#define LCD_FYSETC_TFT81050 // FYSETC with 5" (800x480) // Correct the resolution if not using the stock TFT panel. //#define TOUCH_UI_320x240 //#define TOUCH_UI_480x272 - //#define TOUCH_UI_800x480 + #define TOUCH_UI_800x480 // Mappings for boards with a standard RepRapDiscount Display connector //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping - //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + #define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping //#define S6_TFT_PINMAP // FYSETC S6 pin mapping //#define F6_TFT_PINMAP // FYSETC F6 pin mapping @@ -1467,12 +1517,12 @@ // is supported on the FT800. The FT810 and beyond also support // portrait and mirrored orientations. //#define TOUCH_UI_INVERTED - //#define TOUCH_UI_PORTRAIT + #define TOUCH_UI_PORTRAIT //#define TOUCH_UI_MIRRORED // UTF8 processing and rendering. // Unsupported characters are shown as '?'. - //#define TOUCH_UI_USE_UTF8 + #define TOUCH_UI_USE_UTF8 #if ENABLED(TOUCH_UI_USE_UTF8) // Western accents support. These accented characters use // combined bitmaps and require relatively little storage. @@ -1480,8 +1530,8 @@ #if ENABLED(TOUCH_UI_UTF8_WESTERN_CHARSET) // Additional character groups. These characters require // full bitmaps and take up considerable storage: - //#define TOUCH_UI_UTF8_SUPERSCRIPTS // ¹ ² ³ - //#define TOUCH_UI_UTF8_COPYRIGHT // © ® + #define TOUCH_UI_UTF8_SUPERSCRIPTS // ¹ ² ³ + #define TOUCH_UI_UTF8_COPYRIGHT // © ® //#define TOUCH_UI_UTF8_GERMANIC // ß //#define TOUCH_UI_UTF8_SCANDINAVIAN // Æ Ð Ø Þ æ ð ø þ //#define TOUCH_UI_UTF8_PUNCTUATION // « » ¿ ¡ @@ -1511,7 +1561,7 @@ //#define TOUCH_UI_DEBUG // Developer menu (accessed by touching "About Printer" copyright text) - //#define TOUCH_UI_DEVELOPER_MENU + #define TOUCH_UI_DEVELOPER_MENU #endif // @@ -1585,7 +1635,9 @@ #define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets - #define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + #if DISABLED(TazPro) + #define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + #endif #endif #endif @@ -1649,10 +1701,27 @@ * the probe to be unable to reach any points. */ #if PROBE_SELECTED && !IS_KINEMATIC - //#define PROBING_MARGIN_LEFT PROBING_MARGIN - //#define PROBING_MARGIN_RIGHT PROBING_MARGIN - //#define PROBING_MARGIN_FRONT PROBING_MARGIN - //#define PROBING_MARGIN_BACK PROBING_MARGIN + #if ENABLED(Mini) + #define PROBING_MARGIN_LEFT 0.0 // <-- changed + #define PROBING_MARGIN_RIGHT -8.0 // <-- changed + #define PROBING_MARGIN_FRONT -4.0 // <-- changed + #define PROBING_MARGIN_BACK -13.0 // <-- changed + #elif ENABLED(MiniV2) + #define PROBING_MARGIN_LEFT -3.0 // <-- changed + #define PROBING_MARGIN_RIGHT -6.8 // <-- changed + #define PROBING_MARGIN_FRONT -4.0 // <-- changed + #define PROBING_MARGIN_BACK -11.8 // <-- changed + #elif ENABLED(Taz6) + #define PROBING_MARGIN_LEFT -10.0 // <-- changed + #define PROBING_MARGIN_RIGHT -8.0 // <-- changed + #define PROBING_MARGIN_FRONT -9.0 // <-- changed + #define PROBING_MARGIN_BACK -11.1 // <-- changed + #elif ANY(Workhorse, TazPro) + #define PROBING_MARGIN_LEFT -10.0 // <-- changed + #define PROBING_MARGIN_RIGHT -9.4 // <-- changed + #define PROBING_MARGIN_FRONT -9.0 // <-- changed + #define PROBING_MARGIN_BACK -12.5 // <-- changed + #endif #endif #if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) @@ -1676,7 +1745,18 @@ * between attempts, and after the maximum number of retries have been tried. */ #define G29_SUCCESS_COMMANDS "M117 Probe successful" // <-- changed - #define G29_RECOVER_COMMANDS "G0 Z10\nG12\nM109 R160\nM400\nM117 Probing bed" // <-- changed + #if ENABLED(Mini) + #define G29_RECOVER_COMMANDS "M121\nG0 Z10\nG28 X0 Y0\nG12\nM109 R160\nM400\nM117 Probing bed" // <-- changed + #elif ENABLED(MiniV2) + #define G29_RECOVER_COMMANDS "M104 S170\nG28\nG0 X150 F9999\nG0 Z5 F6000\nG91\nM211 S0\nM400\nM906 Z600\nG0 Z-15 F500\nG0 Z5 F500\nM400\nG90\nM906 Z960\nM211 S1\nG28 Z0\nG28\nG12\nM109 R160\nM400\nM117 Probing bed" // <-- changed + #elif ENABLED(Taz6) + #define G29_RECOVER_COMMANDS "G0 Z10\nG12\nM109 R160\nM400\nM117 Probing bed" // <-- changed + #elif ENABLED(Workhorse) + #define G29_RECOVER_COMMANDS "M104 S170\nG0 X150 F9999\nG28 Z0\nG28\nG12\nM109 R160\nM400\nM117 Probing bed" // <-- changed + #elif ENABLED( TazPro) + #define G29_RECOVER_COMMANDS "M104 S170 T0\nM104 S170 T1\nG0 X150 F9999\nG28 Z0\nG28\nG12\nM109 R160\nM400\nM117 Probing bed" // <-- changed + #endif + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nG0 E0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nG4 S1" // <-- changed #endif @@ -2220,10 +2300,10 @@ #define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256 #if AXIS_IS_TMC(X) - #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. + #define X_CURRENT 975 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_CURRENT_HOME X_CURRENT // (mA) RMS current for sensorless homing #define X_MICROSTEPS 16 // 0..256 - #define X_RSENSE 0.11 + #define X_RSENSE 0.12 #define X_CHAIN_POS -1 // <=0 : Not chained. 1 : MCU MOSI connected. 2 : Next in chain, ... #endif @@ -2236,10 +2316,10 @@ #endif #if AXIS_IS_TMC(Y) - #define Y_CURRENT 800 + #define Y_CURRENT 975 #define Y_CURRENT_HOME Y_CURRENT #define Y_MICROSTEPS 16 - #define Y_RSENSE 0.11 + #define Y_RSENSE 0.12 #define Y_CHAIN_POS -1 #endif @@ -2252,10 +2332,14 @@ #endif #if AXIS_IS_TMC(Z) - #define Z_CURRENT 800 + #define Z_CURRENT 975 #define Z_CURRENT_HOME Z_CURRENT - #define Z_MICROSTEPS 16 - #define Z_RSENSE 0.11 + #if ENABLED(MiniV2) + #define Z_MICROSTEPS 32 + #else + #define Z_MICROSTEPS 16 + #endif + #define Z_RSENSE 0.12 #define Z_CHAIN_POS -1 #endif @@ -2284,16 +2368,16 @@ #endif #if AXIS_IS_TMC(E0) - #define E0_CURRENT 800 + #define E0_CURRENT 960 #define E0_MICROSTEPS 16 - #define E0_RSENSE 0.11 + #define E0_RSENSE 0.12 #define E0_CHAIN_POS -1 #endif #if AXIS_IS_TMC(E1) - #define E1_CURRENT 800 + #define E1_CURRENT 960 #define E1_MICROSTEPS 16 - #define E1_RSENSE 0.11 + #define E1_RSENSE 0.12 #define E1_CHAIN_POS -1 #endif @@ -2364,7 +2448,9 @@ * The default SW SPI pins are defined the respective pins files, * but you can override or define them here. */ - //#define TMC_USE_SW_SPI + #if ENABLED(TazPro) + #define TMC_USE_SW_SPI + #endif //#define TMC_SW_MOSI -1 //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 @@ -2411,9 +2497,9 @@ * Use Trinamic's ultra quiet stepping mode. * When disabled, Marlin will use spreadCycle stepping mode. */ - #define STEALTHCHOP_XY + //#define STEALTHCHOP_XY #define STEALTHCHOP_Z - #define STEALTHCHOP_E + //#define STEALTHCHOP_E /** * Optimize spreadCycle chopper parameters by using predefined parameter sets @@ -2430,7 +2516,7 @@ * Define you own with * { , , hysteresis_start[1..8] } */ - #define CHOPPER_TIMING CHOPPER_DEFAULT_12V + #define CHOPPER_TIMING {3, -2, 6} /** * Monitor Trinamic drivers @@ -2443,7 +2529,7 @@ * M912 - Clear stepper driver overtemperature pre-warn condition flag. * M122 - Report driver parameters (Requires TMC_DEBUG) */ - //#define MONITOR_DRIVER_STATUS + #define MONITOR_DRIVER_STATUS #if ENABLED(MONITOR_DRIVER_STATUS) #define CURRENT_STEP_DOWN 50 // [mA] @@ -2500,14 +2586,21 @@ * IMPROVE_HOMING_RELIABILITY tunes acceleration and jerk when * homing and adds a guard period for endstop triggering. */ - //#define SENSORLESS_HOMING // StallGuard capable drivers only + #define SENSORLESS_HOMING // StallGuard capable drivers only #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 - #define X_STALL_SENSITIVITY 8 - #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY - #define Y_STALL_SENSITIVITY 8 - #define Y2_STALL_SENSITIVITY Y_STALL_SENSITIVITY + #if ENABLED(TazPro) + #define X_STALL_SENSITIVITY 6 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY + #define Y_STALL_SENSITIVITY 5 + #define Y2_STALL_SENSITIVITY Y_STALL_SENSITIVITY + #else + #define X_STALL_SENSITIVITY 4 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY + #define Y_STALL_SENSITIVITY 4 + #define Y2_STALL_SENSITIVITY Y_STALL_SENSITIVITY + #endif //#define Z_STALL_SENSITIVITY 8 //#define Z2_STALL_SENSITIVITY Z_STALL_SENSITIVITY //#define Z3_STALL_SENSITIVITY Z_STALL_SENSITIVITY @@ -2551,8 +2644,13 @@ * stepperY.intpol(0); \ * } */ - #define TMC_ADV() { } - + #if ENABLED(Mini) + #define TMC_ADV() {stepperX.toff(1);stepperX.hstrt(4);stepperX.hend(0);stepperX.tbl(1);stepperY.toff(1);stepperY.hstrt(4);stepperY.hend(0);stepperY.tbl(1);stepperZ.toff(1);stepperZ.hstrt(0);stepperZ.hend(0);stepperZ.tbl(1);stepperE0.toff(1);stepperE0.hstrt(0);stepperE0.hend(0);stepperE0.tbl(1);stepperX.shaft(1);stepperX.semin(1);stepperX.semax(3);stepperY.shaft(1);stepperY.semin(1);stepperY.semax(3);stepperZ.shaft(1);stepperZ.semin(1);stepperZ.semax(3);stepperE0.shaft(1);stepperE0.semin(1);stepperE0.semax(3);} // <-- changed + #elif ENABLED(TazPro) + #define TMC_ADV() {stepperX.shaft(0);stepperX.semin(1);stepperX.semax(3);stepperY.shaft(0);stepperY.semin(1);stepperY.semax(3);stepperZ.shaft(0);stepperZ.semin(1);stepperZ.semax(3);stepperE0.shaft(0);stepperE0.semin(1);stepperE0.semax(3);stepperE1.shaft(0);stepperE1.semin(1);stepperE1.semax(3);} // <-- changed + #else + #define TMC_ADV() { } + #endif #endif // HAS_TRINAMIC_CONFIG // @section L64XX @@ -3304,21 +3402,23 @@ /** * Analog Joystick(s) */ -//#define JOYSTICK +#if ENABLED(TazPro) + #define JOYSTICK +#endif #if ENABLED(JOYSTICK) - #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2 - #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2 - #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2 - #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2 + #define JOY_X_PIN -1 // RAMPS: Suggested pin A5 on AUX2 + #define JOY_Y_PIN -1 // RAMPS: Suggested pin A10 on AUX2 + #define JOY_Z_PIN -1 // RAMPS: Suggested pin A12 on AUX2 + #define JOY_EN_PIN -1 // RAMPS: Suggested pin D44 on AUX2 //#define INVERT_JOY_X // Enable if X direction is reversed //#define INVERT_JOY_Y // Enable if Y direction is reversed //#define INVERT_JOY_Z // Enable if Z direction is reversed // Use M119 with JOYSTICK_DEBUG to find reasonable values after connecting: - #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max - #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 } - #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 } + //#define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max + //#define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 } + //#define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 } #endif /** diff --git a/platformio.ini b/platformio.ini index 10990b4d21..74e078586b 100644 --- a/platformio.ini +++ b/platformio.ini @@ -18,7 +18,11 @@ [platformio] src_dir = Marlin boards_dir = buildroot/share/PlatformIO/boards -default_envs = mega2560 +default_envs = Mini + MiniV2 + Taz6 + Workhorse + TazPro include_dir = Marlin # @@ -410,124 +414,48 @@ platform = atmelavr extends = common_avr8 board = megaatmega2560 + # -# ATmega1280 +# Lulzbot Mini # -[env:mega1280] +[env:Mini] platform = atmelavr extends = common_avr8 -board = megaatmega1280 +build_flags = ${common.build_flags} -DMini +board = megaatmega2560 # -# MightyBoard ATmega2560 (MegaCore 100 pin boards variants) +# Lulzbot Mini V2 # -[env:MightyBoard1280] +[env:MiniV2] platform = atmelavr extends = common_avr8 -board = ATmega1280 -upload_speed = 57600 +build_flags = ${common.build_flags} -DMiniV2 +board = megaatmega2560 # -# MightyBoard ATmega2560 (MegaCore 100 pin boards variants) +# Taz 6 # -[env:MightyBoard2560] +[env:Taz6] platform = atmelavr extends = common_avr8 -board = ATmega2560 -upload_protocol = wiring -upload_speed = 57600 -board_upload.maximum_size = 253952 +build_flags = ${common.build_flags} -DTaz6 +board = megaatmega2560 # -# RAMBo +# Taz Workhorse # -[env:rambo] +[env:Workhorse] platform = atmelavr extends = common_avr8 -board = reprap_rambo +build_flags = ${common.build_flags} -DWorkhorse +board = megaatmega2560 -# -# FYSETC F6 V1.3 -# -[env:FYSETC_F6_13] -platform = atmelavr -extends = common_avr8 -board = fysetc_f6_13 +[env:TazPro] +platform = ${common_DUE_archim.platform} +build_flags = ${common.build_flags} -DARDUINO_SAM_ARCHIM -DARDUINO_ARCH_SAM -D__SAM3X8E__ -DUSBCON -DTazPro +extends = common_DUE_archim -# -# FYSETC F6 V1.4 -# -[env:FYSETC_F6_14] -platform = atmelavr -extends = common_avr8 -board = fysetc_f6_14 - -# -# Sanguinololu (ATmega644p) -# -[env:sanguino644p] -platform = atmelavr -extends = common_avr8 -board = sanguino_atmega644p - -# -# Sanguinololu (ATmega1284p) -# -[env:sanguino1284p] -platform = atmelavr -extends = common_avr8 -board = sanguino_atmega1284p -board_upload.maximum_size = 126976 - -# -# Melzi and clones (ATmega1284p) -# -[env:melzi] -platform = atmelavr -extends = common_avr8 -board = sanguino_atmega1284p -upload_speed = 57600 -board_upload.maximum_size = 126976 - -# -# Melzi and clones (Optiboot bootloader) -# -[env:melzi_optiboot] -platform = atmelavr -extends = common_avr8 -board = sanguino_atmega1284p -upload_speed = 115200 - -# -# Melzi and clones (Zonestar Melzi2 with tuned flags) -# -[env:melzi_optimized] -platform = atmelavr -extends = env:melzi_optiboot -build_flags = ${common.build_flags} -fno-tree-scev-cprop -fno-split-wide-types -Wl,--relax -mcall-prologues -build_unflags = -g -ggdb - -# -# AT90USB1286 boards using CDC bootloader -# - BRAINWAVE -# - BRAINWAVE_PRO -# - SAV_MKI -# - TEENSYLU -# -[env:at90usb1286_cdc] -platform = teensy -extends = common_avr8 -board = at90usb1286 - -# -# AT90USB1286 boards using DFU bootloader -# - PrintrBoard -# - PrintrBoard Rev.F -# - ? 5DPRINT ? -# -[env:at90usb1286_dfu] -platform = teensy -extends = env:at90usb1286_cdc ################################# # # @@ -580,683 +508,6 @@ platform = ${common_DUE_archim.platform} extends = common_DUE_archim build_flags = ${common_DUE_archim.build_flags} -funwind-tables -mpoke-function-name -################################# -# # -# SAMD51 Architecture # -# # -################################# - -# -# Adafruit Grand Central M4 (Atmel SAMD51P20A ARM Cortex-M4) -# -[env:SAMD51_grandcentral_m4] -platform = atmelsam -board = adafruit_grandcentral_m4 -build_flags = ${common.build_flags} -std=gnu++17 -build_unflags = -std=gnu++11 -src_filter = ${common.default_src_filter} + -lib_deps = ${common.lib_deps} - SoftwareSerialM - Adafruit SPIFlash -custom_marlin.SDSUPPORT = SdFat - Adafruit Fork -debug_tool = jlink - -################################# -# # -# LPC176x Architecture # -# # -################################# - -# -# NXP LPC176x ARM Cortex-M3 -# -[common_LPC] -platform = https://github.com/p3p/pio-nxplpc-arduino-lpc176x/archive/0.1.3.zip -board = nxp_lpc1768 -lib_ldf_mode = off -lib_compat_mode = strict -extra_scripts = ${common.extra_scripts} - Marlin/src/HAL/LPC1768/upload_extra_script.py -src_filter = ${common.default_src_filter} + -lib_deps = ${common.lib_deps} - Servo -custom_marlin.USES_LIQUIDCRYSTAL = LiquidCrystal@1.0.0 -custom_marlin.NEOPIXEL_LED = Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/1.5.0.zip -build_flags = ${common.build_flags} -DU8G_HAL_LINKS -IMarlin/src/HAL/LPC1768/include -IMarlin/src/HAL/LPC1768/u8g - # debug options for backtrace - #-funwind-tables - #-mpoke-function-name - -# -# NXP LPC176x ARM Cortex-M3 -# -[env:LPC1768] -platform = ${common_LPC.platform} -extends = common_LPC -board = nxp_lpc1768 - -[env:LPC1769] -platform = ${common_LPC.platform} -extends = common_LPC -board = nxp_lpc1769 - -################################# -# # -# STM32 Architecture # -# # -################################# - -# -# HAL/STM32 Base Environment values -# -[common_stm32] -platform = ststm32@~6.1.0 -platform_packages = framework-arduinoststm32@>=4.10700,<4.10800 -lib_ignore = SoftwareSerial -build_flags = ${common.build_flags} - -IMarlin/src/HAL/STM32 -std=gnu++14 - -DUSBCON -DUSBD_USE_CDC - -DUSBD_VID=0x0483 - -DTIM_IRQ_PRIO=13 -build_unflags = -std=gnu++11 -src_filter = ${common.default_src_filter} + - -# -# HAL/STM32F1 Common Environment values -# -[common_stm32f1] -platform = ${common_stm32.platform} -build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py - ${common.build_flags} -std=gnu++14 -DHAVE_SW_SERIAL -build_unflags = -std=gnu11 -std=gnu++11 -src_filter = ${common.default_src_filter} + -lib_ignore = SPI -lib_deps = ${common.lib_deps} - SoftwareSerialM - -# -# STM32F103RC -# -[env:STM32F103RC] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = genericSTM32F103RC -platform_packages = tool-stm32duino -monitor_speed = 115200 - -# -# MEEB_3DP (STM32F103RCT6 with 512K) -# -[env:STM32F103RC_meeb] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = MEEB_3DP -platform_packages = tool-stm32duino -build_flags = ${common_stm32f1.build_flags} - -DDEBUG_LEVEL=0 - -DSS_TIMER=4 - -DSTM32_FLASH_SIZE=512 - -DHSE_VALUE=12000000U - -DUSE_USB_COMPOSITE - -DVECT_TAB_OFFSET=0x2000 - -DGENERIC_BOOTLOADER -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py - buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py -lib_deps = ${common.lib_deps} - SoftwareSerialM - USBComposite for STM32F1@0.91 -custom_marlin.NEOPIXEL_LED = Adafruit NeoPixel=https://github.com/ccccmagicboy/Adafruit_NeoPixel#meeb_3dp_use -debug_tool = stlink -upload_protocol = dfu - -# -# STM32F103RC_fysetc -# -[env:STM32F103RC_fysetc] -platform = ${common_stm32f1.platform} -extends = env:STM32F103RC -extra_scripts = ${common.extra_scripts} - buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py -build_flags = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0 -lib_ldf_mode = chain -debug_tool = stlink -upload_protocol = serial - -# -# BigTree SKR Mini V1.1 / SKR mini E3 / SKR E3 DIP (STM32F103RCT6 ARM Cortex-M3) -# -# STM32F103RC_btt ............. RCT6 with 256K -# STM32F103RC_btt_USB ......... RCT6 with 256K (USB mass storage) -# STM32F103RC_btt_512K ........ RCT6 with 512K -# STM32F103RC_btt_512K_USB .... RCT6 with 512K (USB mass storage) -# - -[env:STM32F103RC_btt] -platform = ${common_stm32f1.platform} -extends = env:STM32F103RC -extra_scripts = ${common.extra_scripts} - buildroot/share/PlatformIO/scripts/STM32F103RC_SKR_MINI.py -build_flags = ${common_stm32f1.build_flags} - -DDEBUG_LEVEL=0 -DSS_TIMER=4 -monitor_speed = 115200 - -[env:STM32F103RC_btt_USB] -platform = ${common_stm32f1.platform} -extends = env:STM32F103RC_btt -build_flags = ${env:STM32F103RC_btt.build_flags} -DUSE_USB_COMPOSITE -lib_deps = ${env:STM32F103RC_btt.lib_deps} - USBComposite for STM32F1@0.91 - -[env:STM32F103RC_btt_512K] -platform = ${common_stm32f1.platform} -extends = env:STM32F103RC_btt -board_upload.maximum_size=524288 -build_flags = ${env:STM32F103RC_btt.build_flags} -DSTM32_FLASH_SIZE=512 - -[env:STM32F103RC_btt_512K_USB] -platform = ${common_stm32f1.platform} -extends = env:STM32F103RC_btt_512K -build_flags = ${env:STM32F103RC_btt_512K.build_flags} -DUSE_USB_COMPOSITE -lib_deps = ${env:STM32F103RC_btt_512K.lib_deps} - USBComposite for STM32F1@0.91 - -# -# STM32F103RE -# -[env:STM32F103RE] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = genericSTM32F103RE -platform_packages = tool-stm32duino -monitor_speed = 115200 - -# -# STM32F103RE_btt ............. RET6 -# STM32F103RE_btt_USB ......... RET6 (USB mass storage) -# -[env:STM32F103RE_btt] -platform = ${common_stm32f1.platform} -extends = env:STM32F103RE -extra_scripts = ${common.extra_scripts} - buildroot/share/PlatformIO/scripts/STM32F103RE_SKR_E3_DIP.py -build_flags = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4 -debug_tool = stlink -upload_protocol = stlink - -[env:STM32F103RE_btt_USB] -platform = ${common_stm32f1.platform} -extends = env:STM32F103RE_btt -build_flags = ${env:STM32F103RE_btt.build_flags} -DUSE_USB_COMPOSITE -lib_deps = ${common_stm32f1.lib_deps} - USBComposite for STM32F1@0.91 - -# -# STM32F4 with STM32GENERIC -# -[env:STM32F4] -platform = ${common_stm32.platform} -board = disco_f407vg -build_flags = ${common.build_flags} -DUSE_STM32GENERIC -DSTM32GENERIC -DSTM32F4 -DMENU_USB_SERIAL -DMENU_SERIAL=SerialUSB -DHAL_IWDG_MODULE_ENABLED -src_filter = ${common.default_src_filter} + - - -# -# STM32F7 with STM32GENERIC -# -[env:STM32F7] -platform = ${common_stm32.platform} -board = remram_v1 -build_flags = ${common.build_flags} -DUSE_STM32GENERIC -DSTM32GENERIC -DSTM32F7 -DMENU_USB_SERIAL -DMENU_SERIAL=SerialUSB -DHAL_IWDG_MODULE_ENABLED -src_filter = ${common.default_src_filter} + - - -# -# ARMED (STM32) -# -[env:ARMED] -platform = ${common_stm32.platform} -extends = common_stm32 -board = armed_v1 -build_flags = ${common_stm32.build_flags} - '-DUSB_PRODUCT="ARMED_V1"' - -O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing - -# -# Geeetech GTM32 (STM32F103VET6) -# -[env:STM32F103VE_GTM32] -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 -DBOARD_generic_stm32f103v - -DDEBUG_LEVEL=DEBUG_NONE -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DVECT_TAB_ADDR=0x8000000 - -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6 -upload_protocol = serial - -# -# Longer 3D board in Alfawise U20 (STM32F103VET6) -# -[env:STM32F103VE_longer] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = genericSTM32F103VE -extra_scripts = ${common.extra_scripts} - buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py -build_flags = ${common_stm32f1.build_flags} - -DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB -DU20 -DTS_V12 -build_unflags = ${common_stm32f1.build_unflags} - -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6 -lib_ignore = ${common_stm32f1.lib_ignore} - -# -# MKS Robin Mini (STM32F103VET6) -# -[env:mks_robin_mini] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = genericSTM32F103VE -extra_scripts = ${common.extra_scripts} - buildroot/share/PlatformIO/scripts/mks_robin_mini.py -build_flags = ${common_stm32f1.build_flags} - -DMCU_STM32F103VE - -# -# MKS Robin Nano (STM32F103VET6) -# v1.2 - Emulated Graphical 128x64 (DOGM) UI and LVGL UI -# v2.0 - LVGL UI -# -[env:mks_robin_nano35] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = genericSTM32F103VE -platform_packages = tool-stm32duino -extra_scripts = ${common.extra_scripts} - buildroot/share/PlatformIO/scripts/mks_robin_nano35.py -build_flags = ${common_stm32f1.build_flags} - -DMCU_STM32F103VE -DSS_TIMER=4 -debug_tool = jlink -upload_protocol = jlink - -# -# MKS Robin (STM32F103ZET6) -# -[env:mks_robin] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = genericSTM32F103ZE -extra_scripts = ${common.extra_scripts} - buildroot/share/PlatformIO/scripts/mks_robin.py -build_flags = ${common_stm32f1.build_flags} - -DSS_TIMER=4 -DSTM32_XL_DENSITY - -# MKS Robin (STM32F103ZET6) -# Uses HAL STM32 to support Marlin UI for TFT screen with optional touch panel -# -[env:mks_robin_stm32] -platform = ${common_stm32.platform} -extends = common_stm32 -board = genericSTM32F103ZE -board_build.core = stm32 -board_build.variant = MARLIN_F103Zx -board_build.ldscript = ldscript.ld -board_build.offset = 0x7000 -board_build.firmware = Robin.bin -build_flags = ${common_stm32.build_flags} - -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8 -build_unflags = ${common_stm32.build_unflags} - -DUSBCON -DUSBD_USE_CDC -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py - buildroot/share/PlatformIO/scripts/stm32_bootloader.py - buildroot/share/PlatformIO/scripts/mks_encrypt.py -lib_deps = - -# -# MKS Robin Pro (STM32F103ZET6) -# -[env:mks_robin_pro] -platform = ${common_stm32f1.platform} -extends = env:mks_robin -extra_scripts = ${common.extra_scripts} - buildroot/share/PlatformIO/scripts/mks_robin_pro.py - - -# -# TRIGORILLA PRO (STM32F103ZET6) -# -[env:trigorilla_pro] -platform = ${common_stm32f1.platform} -extends = env:mks_robin -extra_scripts = ${common.extra_scripts} - -# -# MKS Robin E3D (STM32F103RCT6) and -# MKS Robin E3 with TMC2209 -# -[env:mks_robin_e3] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = genericSTM32F103RC -platform_packages = tool-stm32duino -extra_scripts = ${common.extra_scripts} - buildroot/share/PlatformIO/scripts/mks_robin_e3.py -build_flags = ${common_stm32f1.build_flags} - -DDEBUG_LEVEL=0 -DSS_TIMER=4 - -# -# MKS Robin Lite/Lite2 (STM32F103RCT6) -# -[env:mks_robin_lite] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = genericSTM32F103RC -extra_scripts = ${common.extra_scripts} - buildroot/share/PlatformIO/scripts/mks_robin_lite.py - - -# -# MKS ROBIN LITE3 (STM32F103RCT6) -# -[env:mks_robin_lite3] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = genericSTM32F103RC -extra_scripts = ${common.extra_scripts} - buildroot/share/PlatformIO/scripts/mks_robin_lite3.py - -# -# JGAurora A5S A1 (STM32F103ZET6) -# -[env:jgaurora_a5s_a1] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = genericSTM32F103ZE -extra_scripts = ${common.extra_scripts} - buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py -build_flags = ${common_stm32f1.build_flags} - -DSTM32F1xx -DSTM32_XL_DENSITY - -# -# Malyan M200 (STM32F103CB) -# -[env:STM32F103CB_malyan] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = malyanM200 -build_flags = ${common_stm32f1.build_flags} - -DMCU_STM32F103CB -D__STM32F1__=1 -std=c++1y -DSERIAL_USB -ffunction-sections -fdata-sections - -Wl,--gc-sections -DDEBUG_LEVEL=0 -D__MARLIN_FIRMWARE__ -lib_ignore = ${common_stm32f1.lib_ignore} - SoftwareSerialM - -# -# Malyan M200 v2 (STM32F070RB) -# -[env:STM32F070RB_malyan] -platform = ${common_stm32.platform} -extends = common_stm32 -board = malyanM200v2 -build_flags = ${common_stm32.build_flags} -DSTM32F0xx -DUSB_PRODUCT=\"STM32F070RB\" -DHAL_PCD_MODULE_ENABLED - -O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing -std=gnu11 -std=gnu++11 - -DCUSTOM_STARTUP_FILE -lib_ignore = SoftwareSerial - -# -# Malyan M300 (STM32F070CB) -# -[env:malyan_M300] -platform = ststm32@>=6.1.0,<6.2.0 -board = malyanm300_f070cb -build_flags = ${common.build_flags} - -DUSBCON -DUSBD_VID=0x0483 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"MALYAN_M300\"" - -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_CDC -DDISABLE_GENERIC_SERIALUSB -DHAL_UART_MODULE_ENABLED -src_filter = ${common.default_src_filter} + - -# -# Chitu boards like Tronxy X5s (STM32F103ZET6) -# -[env:chitu_f103] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = CHITU_F103 -extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-dependencies.py - pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py - buildroot/share/PlatformIO/scripts/chitu_crypt.py -build_flags = ${common_stm32f1.build_flags} - -DSTM32F1xx -DSTM32_XL_DENSITY -build_unflags = ${common_stm32f1.build_unflags} - -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG= -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6 - -# -# Some Chitu V5 boards have a problem with GPIO init. -# Use this target if G28 or G29 are always failing. -# -[env:chitu_v5_gpio_init] -platform = ${common_stm32f1.platform} -extends = env:chitu_f103 -build_flags = ${env:chitu_f103.build_flags} -DCHITU_V5_Z_MIN_BUGFIX - -# -# Creality (STM32F103RET6) -# -[env:STM32F103RET6_creality] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = genericSTM32F103RC -build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py - ${common.build_flags} -std=gnu++14 -DSTM32_XL_DENSITY -DTEMP_TIMER_CHAN=4 -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/random-bin.py - buildroot/share/PlatformIO/scripts/creality.py -lib_ignore = ${common_stm32f1.lib_ignore} -debug_tool = jlink -upload_protocol = jlink -monitor_speed = 115200 - -# -# STM32F401VE -# 'STEVAL-3DP001V1' STM32F401VE board - https://www.st.com/en/evaluation-tools/steval-3dp001v1.html -# -[env:STM32F401VE_STEVAL] -platform = ${common_stm32.platform} -extends = common_stm32 -board = STEVAL_STM32F401VE -build_flags = ${common_stm32.build_flags} - -DTARGET_STM32F4 -DARDUINO_STEVAL -DSTM32F401xE - -DUSB_PRODUCT=\"STEVAL_F401VE\" - -DDISABLE_GENERIC_SERIALUSB -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py - buildroot/share/PlatformIO/scripts/STEVAL__F401XX.py -lib_ignore = SoftwareSerial - -# -# FLYF407ZG -# -[env:FLYF407ZG] -platform = ${common_stm32.platform} -extends = common_stm32 -board = FLYF407ZG -build_flags = ${common_stm32.build_flags} - -DSTM32F4 -DUSB_PRODUCT=\"STM32F407ZG\" - -DTARGET_STM32F4 -DVECT_TAB_OFFSET=0x8000 -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py - -# -# FYSETC S6 (STM32F446VET6 ARM Cortex-M4) -# -[env:FYSETC_S6] -platform = ${common_stm32.platform} -extends = common_stm32 -platform_packages = ${common_stm32.platform_packages} - tool-stm32duino -board = fysetc_s6 -build_flags = ${common_stm32.build_flags} - -DTARGET_STM32F4 -DVECT_TAB_OFFSET=0x10000 - -DHAL_PCD_MODULE_ENABLED '-DUSB_PRODUCT="FYSETC_S6"' -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/fysetc_STM32S6.py -debug_tool = stlink -upload_protocol = dfu -upload_command = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE" - -# -# STM32F407VET6 with RAMPS-like shield -# 'Black' STM32F407VET6 board - https://wiki.stm32duino.com/index.php?title=STM32F407 -# Shield - https://github.com/jmz52/Hardware -# -[env:STM32F407VE_black] -platform = ${common_stm32.platform} -extends = common_stm32 -board = blackSTM32F407VET6 -build_flags = ${common_stm32.build_flags} - -DTARGET_STM32F4 -DARDUINO_BLACK_F407VE - -DUSB_PRODUCT=\"BLACK_F407VE\" - -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py -lib_ignore = SoftwareSerial - -# -# BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4) -# -[env:BIGTREE_SKR_PRO] -platform = ${common_stm32.platform} -extends = common_stm32 -board = BigTree_SKR_Pro -build_flags = ${common_stm32.build_flags} - -DUSB_PRODUCT=\"STM32F407ZG\" - -DTARGET_STM32F4 -DSTM32F407_5ZX -DVECT_TAB_OFFSET=0x8000 -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py -#upload_protocol = stlink -#upload_command = "$PROJECT_PACKAGES_DIR/tool-stm32duino/stlink/ST-LINK_CLI.exe" -c SWD -P "$BUILD_DIR/firmware.bin" 0x8008000 -Rst -Run -debug_tool = stlink -debug_init_break = - -# -# Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4) -# -[env:BIGTREE_GTR_V1_0] -platform = ststm32@>=5.7.0,<6.2.0 -extends = common_stm32 -board = BigTree_GTR_v1 -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py -build_flags = ${common_stm32.build_flags} - -DUSB_PRODUCT=\"STM32F407IG\" - -DTARGET_STM32F4 -DSTM32F407IX -DVECT_TAB_OFFSET=0x8000 - -# -# BigTreeTech BTT002 V1.0 (STM32F407VGT6 ARM Cortex-M4) -# -[env:BIGTREE_BTT002] -platform = ${common_stm32.platform} -extends = common_stm32 -board = BigTree_Btt002 -build_flags = ${common_stm32.build_flags} - -DUSB_PRODUCT=\"STM32F407VG\" - -DTARGET_STM32F4 -DSTM32F407_5VX -DVECT_TAB_OFFSET=0x8000 - -DHAVE_HWSERIAL2 - -DHAVE_HWSERIAL3 - -DPIN_SERIAL2_RX=PD_6 - -DPIN_SERIAL2_TX=PD_5 -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py - -# -# Lerdge base -# -[lerdge_common] -platform = ${common_stm32.platform} -extends = common_stm32 -board = LERDGE -board_build.offset = 0x10000 -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py - buildroot/share/PlatformIO/scripts/stm32_bootloader.py - buildroot/share/PlatformIO/scripts/lerdge.py -build_flags = ${common_stm32.build_flags} - -DSTM32F4 -DSTM32F4xx -DTARGET_STM32F4 - -DDISABLE_GENERIC_SERIALUSB -DARDUINO_ARCH_STM32 -DARDUINO_LERDGE - -DTRANSFER_CLOCK_DIV=8 -DHAL_SRAM_MODULE_ENABLED -build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483 - -# -# Lerdge X -# -[env:LERDGEX] -extends = lerdge_common -board_build.firmware = Lerdge_X_firmware_force.bin - -# -# Lerdge S -# -[env:LERDGES] -extends = lerdge_common -board_build.firmware = Lerdge_firmware_force.bin - -# -# Lerdge K -# -[env:LERDGEK] -extends = lerdge_common -board_build.firmware = Lerdge_K_firmware_force.bin -build_flags = ${lerdge_common.build_flags} - -DLERDGEK - -# -# RUMBA32 -# -[env:rumba32] -platform = ${common_stm32.platform} -extends = common_stm32 -build_flags = ${common_stm32.build_flags} - -Os - "-DUSB_PRODUCT=\"RUMBA32\"" - -DHAL_PCD_MODULE_ENABLED - -DDISABLE_GENERIC_SERIALUSB - -DHAL_UART_MODULE_ENABLED -board = rumba32_f446ve -upload_protocol = dfu -monitor_speed = 500000 - -################################# -# # -# Other Architectures # -# # -################################# - -# -# Espressif ESP32 -# -[env:esp32] -platform = espressif32@1.11.2 -board = esp32dev -build_flags = ${common.build_flags} -DCORE_DEBUG_LEVEL=0 -src_filter = ${common.default_src_filter} + -upload_speed = 115200 -#upload_port = marlinesp.local -#board_build.flash_mode = qio - -# -# Teensy 3.1 / 3.2 (ARM Cortex-M4) -# -[env:teensy31] -platform = teensy -board = teensy31 -src_filter = ${common.default_src_filter} + - -# -# Teensy 3.5 / 3.6 (ARM Cortex-M4) -# -[env:teensy35] -platform = teensy -board = teensy35 -src_filter = ${common.default_src_filter} + - # # Native # No supported Arduino libraries, base Marlin only