Browse Source

Merge branch '2.0.x' into vanilla_fb_2.0.x

vanilla_fb_2.0.x
Sergey 3 years ago
parent
commit
3964b2ed49
  1. 3
      .github/workflows/check-pr.yml
  2. 1
      Marlin/Configuration_adv.h
  3. 16
      Marlin/src/inc/Conditionals_adv.h
  4. 70
      Marlin/src/inc/SanityCheck.h
  5. 20
      Marlin/src/inc/Warnings.cpp
  6. 4
      Marlin/src/lcd/e3v2/jyersui/dwin.cpp
  7. 2
      Marlin/src/lcd/e3v2/marlinui/lcdprint_dwin.cpp
  8. 2
      Marlin/src/lcd/e3v2/marlinui/marlinui_dwin.h
  9. 2
      Marlin/src/lcd/e3v2/marlinui/ui_common.cpp
  10. 2
      Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp
  11. 2
      Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp
  12. 2
      Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.h
  13. 2
      Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp
  14. 2
      Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.h
  15. 2
      Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp
  16. 2
      Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h
  17. 2
      Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp
  18. 2
      Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.h
  19. 2
      Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp
  20. 2
      Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.h
  21. 2
      Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Addr.h
  22. 2
      Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Constants.h
  23. 2
      Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Control.h
  24. 2
      Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Data.h
  25. 2
      Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Screen.h
  26. 2
      Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.cpp
  27. 2
      Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.h
  28. 2
      Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.cpp
  29. 2
      Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.h
  30. 2
      Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VP.h
  31. 2
      Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.cpp
  32. 2
      Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.h
  33. 2
      Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp
  34. 16
      Marlin/src/module/temperature.cpp
  35. 12
      Marlin/src/module/thermistor/thermistors.h
  36. 4
      Marlin/src/module/tool_change.cpp
  37. 2
      Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h
  38. 298
      Marlin/src/pins/pinsDebug_list.h
  39. 2
      Marlin/src/pins/ramps/pins_AZTEEG_X3.h
  40. 2
      Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h
  41. 2
      Marlin/src/pins/ramps/pins_K8200.h
  42. 2
      Marlin/src/pins/ramps/pins_K8400.h
  43. 2
      Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h
  44. 2
      Marlin/src/pins/ramps/pins_MKS_BASE_10.h
  45. 2
      Marlin/src/pins/ramps/pins_MKS_BASE_14.h
  46. 2
      Marlin/src/pins/ramps/pins_MKS_BASE_15.h
  47. 2
      Marlin/src/pins/ramps/pins_MKS_BASE_16.h
  48. 2
      Marlin/src/pins/ramps/pins_MKS_BASE_HEROIC.h
  49. 2
      Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h
  50. 2
      Marlin/src/pins/ramps/pins_TRIGORILLA_13.h
  51. 2
      Marlin/src/pins/ramps/pins_ZRIB_V20.h
  52. 2
      Marlin/src/pins/ramps/pins_ZRIB_V52.h
  53. 2
      Marlin/src/pins/sanguino/pins_AZTEEG_X1.h
  54. 2
      Marlin/src/pins/sanguino/pins_MELZI.h
  55. 2
      Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h
  56. 2
      Marlin/src/pins/sanguino/pins_MELZI_MAKR3D.h
  57. 2
      Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h
  58. 2
      Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h
  59. 2
      Marlin/src/pins/sanguino/pins_MELZI_V2.h
  60. 2
      Marlin/src/pins/sanguino/pins_STB_11.h
  61. 2
      Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_MZ_V1_0.h
  62. 2
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D_V1_1.h
  63. 2
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_V1_1.h
  64. 2
      Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h
  65. 2
      Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h
  66. 2
      Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h
  67. 2
      buildroot/bin/mftest
  68. 9
      buildroot/share/PlatformIO/scripts/common-cxxflags.py
  69. 9
      buildroot/share/PlatformIO/scripts/common-dependencies.py
  70. 15
      buildroot/share/PlatformIO/scripts/download_mks_assets.py
  71. 47
      buildroot/share/PlatformIO/scripts/lerdge.py
  72. 16
      buildroot/share/PlatformIO/scripts/marlin.py
  73. 8
      buildroot/share/PlatformIO/scripts/pioutil.py
  74. 11
      buildroot/share/PlatformIO/scripts/preflight-checks.py
  75. 4
      ini/stm32f4.ini

3
.github/workflows/check-pr.yml

@ -6,7 +6,8 @@
name: PR Bad Target
on:
pull_request:
pull_request_target:
types: [opened]
branches:
- 1.0.x
- 1.1.x

1
Marlin/Configuration_adv.h

@ -2313,6 +2313,7 @@
*/
//#define EVENT_GCODE_TOOLCHANGE_T0 "G28 A\nG1 A0" // Extra G-code to run while executing tool-change command T0
//#define EVENT_GCODE_TOOLCHANGE_T1 "G1 A10" // Extra G-code to run while executing tool-change command T1
//#define EVENT_GCODE_TOOLCHANGE_ALWAYS_RUN // Always execute above G-code sequences. Use with caution!
/**
* Tool Sensors detect when tools have been picked up or dropped.

16
Marlin/src/inc/Conditionals_adv.h

@ -132,17 +132,15 @@
#define HID_E6 6
#define HID_E7 7
#define ANY_TEMP_SENSOR_IS(n) (n == TEMP_SENSOR_0 || n == TEMP_SENSOR_1 || n == TEMP_SENSOR_2 || n == TEMP_SENSOR_3 \
|| n == TEMP_SENSOR_4 || n == TEMP_SENSOR_5 || n == TEMP_SENSOR_6 || n == TEMP_SENSOR_7 \
|| n == TEMP_SENSOR_BED \
|| n == TEMP_SENSOR_PROBE \
|| n == TEMP_SENSOR_CHAMBER \
|| n == TEMP_SENSOR_COOLER \
|| n == TEMP_SENSOR_REDUNDANT )
#if ANY_TEMP_SENSOR_IS(1000)
#define _SENSOR_IS(I,N) || (TEMP_SENSOR_##N == I)
#define _E_SENSOR_IS(I,N) _SENSOR_IS(N,I)
#define ANY_THERMISTOR_IS(N) (0 REPEAT2(HOTENDS, _E_SENSOR_IS, N) \
_SENSOR_IS(N,BED) _SENSOR_IS(N,PROBE) _SENSOR_IS(N,CHAMBER) \
_SENSOR_IS(N,COOLER) _SENSOR_IS(N,BOARD) _SENSOR_IS(N,REDUNDANT) )
#if ANY_THERMISTOR_IS(1000)
#define HAS_USER_THERMISTORS 1
#endif
#undef ANY_TEMP_SENSOR_IS
#if TEMP_SENSOR_REDUNDANT
#define _HEATER_ID(M) HID_##M

70
Marlin/src/inc/SanityCheck.h

@ -2193,68 +2193,12 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#elif !PIN_EXISTS(TEMP_7) && !TEMP_SENSOR_7_IS_DUMMY
#error "TEMP_7_PIN not defined for this board."
#endif
#elif TEMP_SENSOR_7 != 0
#error "TEMP_SENSOR_7 shouldn't be set with only 7 HOTENDS."
#endif
#elif TEMP_SENSOR_6 != 0
#error "TEMP_SENSOR_6 shouldn't be set with only 6 HOTENDS."
#elif TEMP_SENSOR_7 != 0
#error "TEMP_SENSOR_7 shouldn't be set with only 6 HOTENDS."
#endif
#elif TEMP_SENSOR_5 != 0
#error "TEMP_SENSOR_5 shouldn't be set with only 5 HOTENDS."
#elif TEMP_SENSOR_6 != 0
#error "TEMP_SENSOR_6 shouldn't be set with only 5 HOTENDS."
#elif TEMP_SENSOR_7 != 0
#error "TEMP_SENSOR_7 shouldn't be set with only 5 HOTENDS."
#endif
#elif TEMP_SENSOR_4 != 0
#error "TEMP_SENSOR_4 shouldn't be set with only 4 HOTENDS."
#elif TEMP_SENSOR_5 != 0
#error "TEMP_SENSOR_5 shouldn't be set with only 4 HOTENDS."
#elif TEMP_SENSOR_6 != 0
#error "TEMP_SENSOR_6 shouldn't be set with only 4 HOTENDS."
#elif TEMP_SENSOR_7 != 0
#error "TEMP_SENSOR_7 shouldn't be set with only 4 HOTENDS."
#endif
#elif TEMP_SENSOR_3 != 0
#error "TEMP_SENSOR_3 shouldn't be set with only 3 HOTENDS."
#elif TEMP_SENSOR_4 != 0
#error "TEMP_SENSOR_4 shouldn't be set with only 3 HOTENDS."
#elif TEMP_SENSOR_5 != 0
#error "TEMP_SENSOR_5 shouldn't be set with only 3 HOTENDS."
#elif TEMP_SENSOR_6 != 0
#error "TEMP_SENSOR_6 shouldn't be set with only 3 HOTENDS."
#elif TEMP_SENSOR_7 != 0
#error "TEMP_SENSOR_7 shouldn't be set with only 3 HOTENDS."
#endif
#elif TEMP_SENSOR_2 != 0
#error "TEMP_SENSOR_2 shouldn't be set with only 2 HOTENDS."
#elif TEMP_SENSOR_3 != 0
#error "TEMP_SENSOR_3 shouldn't be set with only 2 HOTENDS."
#elif TEMP_SENSOR_4 != 0
#error "TEMP_SENSOR_4 shouldn't be set with only 2 HOTENDS."
#elif TEMP_SENSOR_5 != 0
#error "TEMP_SENSOR_5 shouldn't be set with only 2 HOTENDS."
#elif TEMP_SENSOR_6 != 0
#error "TEMP_SENSOR_6 shouldn't be set with only 2 HOTENDS."
#elif TEMP_SENSOR_7 != 0
#error "TEMP_SENSOR_7 shouldn't be set with only 2 HOTENDS."
#endif
#elif TEMP_SENSOR_1 != 0
#error "TEMP_SENSOR_1 shouldn't be set with only 1 HOTEND."
#elif TEMP_SENSOR_2 != 0
#error "TEMP_SENSOR_2 shouldn't be set with only 1 HOTEND."
#elif TEMP_SENSOR_3 != 0
#error "TEMP_SENSOR_3 shouldn't be set with only 1 HOTEND."
#elif TEMP_SENSOR_4 != 0
#error "TEMP_SENSOR_4 shouldn't be set with only 1 HOTEND."
#elif TEMP_SENSOR_5 != 0
#error "TEMP_SENSOR_5 shouldn't be set with only 1 HOTEND."
#elif TEMP_SENSOR_6 != 0
#error "TEMP_SENSOR_6 shouldn't be set with only 1 HOTEND."
#elif TEMP_SENSOR_7 != 0
#error "TEMP_SENSOR_7 shouldn't be set with only 1 HOTEND."
#endif // HOTENDS > 7
#endif // HOTENDS > 6
#endif // HOTENDS > 5
#endif // HOTENDS > 4
#endif // HOTENDS > 3
#endif // HOTENDS > 2
#endif // HAS_MULTI_HOTEND
/**
@ -3288,7 +3232,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#if HAS_MOTOR_CURRENT_I2C
#if BOTH(DIGIPOT_MCP4018, DIGIPOT_MCP4451)
#error "Enable only one of DIGIPOT_MCP4018 or DIGIPOT_MCP4451."
#elif !MB(MKS_SBASE, AZTEEG_X5_GT, AZTEEG_X5_MINI, AZTEEG_X5_MINI_WIFI) \
#elif !MB(MKS_SBASE, AZTEEG_X5_GT, AZTEEG_X5_MINI, AZTEEG_X5_MINI_WIFI) \
&& (!defined(DIGIPOTS_I2C_SDA_X) || !defined(DIGIPOTS_I2C_SDA_Y) || !defined(DIGIPOTS_I2C_SDA_Z) || !defined(DIGIPOTS_I2C_SDA_E0) || !defined(DIGIPOTS_I2C_SDA_E1))
#error "DIGIPOT_MCP4018/4451 requires DIGIPOTS_I2C_SDA_* pins to be defined."
#endif

20
Marlin/src/inc/Warnings.cpp

@ -35,6 +35,26 @@
#warning "WARNING! Disable MARLIN_DEV_MODE for the final build!"
#endif
// Safety Features
#if DISABLED(USE_WATCHDOG)
#warning "Safety Alert! Enable USE_WATCHDOG for the final build!"
#endif
#if HAS_HOTEND && DISABLED(THERMAL_PROTECTION_HOTENDS)
#warning "Safety Alert! Enable THERMAL_PROTECTION_HOTENDS for the final build!"
#endif
#if HAS_HEATED_BED && DISABLED(THERMAL_PROTECTION_BED)
#warning "Safety Alert! Enable THERMAL_PROTECTION_BED for the final build!"
#endif
#if HAS_HEATED_CHAMBER && DISABLED(THERMAL_PROTECTION_CHAMBER)
#warning "Safety Alert! Enable THERMAL_PROTECTION_CHAMBER for the final build!"
#endif
#if HAS_COOLER && DISABLED(THERMAL_PROTECTION_COOLER)
#warning "Safety Alert! Enable THERMAL_PROTECTION_COOLER for the final build!"
#endif
#if ANY_THERMISTOR_IS(998) || ANY_THERMISTOR_IS(999)
#warning "Warning! Don't use dummy thermistors (998/999) for final build!"
#endif
#if NONE(HAS_RESUME_CONTINUE, HOST_PROMPT_SUPPORT)
#warning "Your Configuration provides no method to acquire user feedback!"
#endif

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

@ -419,7 +419,7 @@ void CrealityDWINClass::Draw_Float(float value, uint8_t row, bool selected/*=fal
if (isnan(value))
DWIN_Draw_String(true, DWIN_FONT_MENU, Color_White, bColor, xpos - 8, MBASE(row), F(" NaN"));
else {
DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_MENU, Color_White, bColor, digits - log10(minunit) + 1, log10(minunit), xpos, MBASE(row), (value < 0 ? -value : value) * minunit);
DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_MENU, Color_White, bColor, digits - log10(minunit) + 1, log10(minunit), xpos, MBASE(row), (value < 0 ? -value : value));
DWIN_Draw_String(true, DWIN_FONT_MENU, Color_White, bColor, xpos - 8, MBASE(row), value < 0 ? F("-") : F(" "));
}
}
@ -855,7 +855,7 @@ void CrealityDWINClass::Draw_Status_Area(bool icons/*=false*/) {
}
if (zoffsetvalue != offset) {
offset = zoffsetvalue;
DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 2, 2, 207, 417, (zoffsetvalue < 0 ? -zoffsetvalue : zoffsetvalue) * 100);
DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 2, 2, 207, 417, (zoffsetvalue < 0 ? -zoffsetvalue : zoffsetvalue));
DWIN_Draw_String(true, DWIN_FONT_MENU, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 205, 419, zoffsetvalue < 0 ? F("-") : F(" "));
}
#endif

2
Marlin/src/lcd/e3v2/marlinui/lcdprint_dwin.cpp

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/

2
Marlin/src/lcd/e3v2/marlinui/marlinui_dwin.h

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once

2
Marlin/src/lcd/e3v2/marlinui/ui_common.cpp

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/

2
Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/

2
Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/

2
Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.h

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once

2
Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/

2
Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.h

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once

2
Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/

2
Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once

2
Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/

2
Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.h

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once

2
Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/

2
Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.h

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once

2
Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Addr.h

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once

2
Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Constants.h

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once

2
Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Control.h

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once

2
Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Data.h

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once

2
Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Screen.h

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once

2
Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.cpp

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/

2
Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.h

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once

2
Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.cpp

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/

2
Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.h

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once

2
Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VP.h

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once

2
Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.cpp

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/

2
Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.h

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once

2
Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/

16
Marlin/src/module/temperature.cpp

@ -2207,22 +2207,22 @@ void Temperature::init() {
// Thermistor activation by MCU pin
#if PIN_EXISTS(TEMP_0_TR_ENABLE)
OUT_WRITE(TEMP_0_TR_ENABLE_PIN,
OUT_WRITE(TEMP_0_TR_ENABLE_PIN, (
#if TEMP_SENSOR_IS_ANY_MAX_TC(0)
1
HIGH
#else
0
LOW
#endif
);
));
#endif
#if PIN_EXISTS(TEMP_1_TR_ENABLE)
OUT_WRITE(TEMP_1_TR_ENABLE_PIN,
OUT_WRITE(TEMP_1_TR_ENABLE_PIN, (
#if TEMP_SENSOR_IS_ANY_MAX_TC(1)
1
HIGH
#else
0
LOW
#endif
);
));
#endif
#if HAS_HEATER_0

12
Marlin/src/module/thermistor/thermistors.h

@ -42,18 +42,6 @@
#define OV_SCALE(N) (N)
#define OV(N) int16_t(OV_SCALE(N) * (OVERSAMPLENR) * (THERMISTOR_TABLE_SCALE))
#define TEMP_SENSOR_IS(n,H) (n == TEMP_SENSOR_##H)
#define ANY_THERMISTOR_IS(n) ( TEMP_SENSOR_IS(n, 0) || TEMP_SENSOR_IS(n, 1) \
|| TEMP_SENSOR_IS(n, 2) || TEMP_SENSOR_IS(n, 3) \
|| TEMP_SENSOR_IS(n, 4) || TEMP_SENSOR_IS(n, 5) \
|| TEMP_SENSOR_IS(n, 6) || TEMP_SENSOR_IS(n, 7) \
|| TEMP_SENSOR_IS(n, BED) \
|| TEMP_SENSOR_IS(n, CHAMBER) \
|| TEMP_SENSOR_IS(n, COOLER) \
|| TEMP_SENSOR_IS(n, PROBE) \
|| TEMP_SENSOR_IS(n, BOARD) \
|| TEMP_SENSOR_IS(n, REDUNDANT) )
typedef struct { int16_t value; celsius_t celsius; } temp_entry_t;
// Pt1000 and Pt100 handling

4
Marlin/src/module/tool_change.cpp

@ -954,7 +954,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0.
#if ENABLED(TOOLCHANGE_NO_RETURN)
const float temp = destination.z;
destination = current_position;
destination.z = temp.z;
destination.z = temp;
#endif
prepare_internal_move_to_destination(TERN(TOOLCHANGE_NO_RETURN, planner.settings.max_feedrate_mm_s[Z_AXIS], MMM_TO_MMS(TOOLCHANGE_PARK_XY_FEEDRATE)));
}
@ -1307,7 +1307,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
TERN_(HAS_FANMUX, fanmux_switch(active_extruder));
if (!no_move) {
if (ENABLED(EVENT_GCODE_TOOLCHANGE_ALWAYS_RUN) || !no_move) {
#ifdef EVENT_GCODE_TOOLCHANGE_T0
if (new_tool == 0)
gcode.process_subcommands_now_P(PSTR(EVENT_GCODE_TOOLCHANGE_T0));

2
Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h

@ -31,4 +31,4 @@
// Include SKR 1.4 pins
//
#define REQUIRE_LPC1769
#include "../lpc1768/pins_BTT_SKR_V1_4.h"
#include "../lpc1768/pins_BTT_SKR_V1_4.h" // ... BTT_SKR_common

298
Marlin/src/pins/pinsDebug_list.h

@ -26,9 +26,9 @@
// If the new pin name is over 28 characters long then pinsDebug.h will need to be modified.
#if TARGET_LPC1768
#define ANALOG_OK(PN) ((PN) == P0_02 || (PN) == P0_03 || (PN) == P0_23 || (PN) == P0_24 || (PN) == P0_25 || (PN) == P0_26 || (PN) == P1_30 || (PN) == P1_31)
#define ANALOG_OK(PN) (WITHIN(PN, P0_02, P0_03) || WITHIN(PN, P0_23, P0_26) || WITHIN(PN, P1_30, P1_31))
#else
#define ANALOG_OK(PN) ((PN) >= 0 && (PN) < NUM_ANALOG_INPUTS)
#define ANALOG_OK(PN) WITHIN(PN, 0, NUM_ANALOG_INPUTS - 1)
#endif
#line 35 // set __LINE__ to a known value for both passes
@ -37,86 +37,130 @@
// Analog Pin Assignments
//
#if defined(EXT_AUX_A0) && ANALOG_OK(EXT_AUX_A0)
#define _EXISTS(PN,V...) (defined(PN##V) && PN##V >= 0)
#if _EXISTS(EXT_AUX_A0)
#if ANALOG_OK(EXT_AUX_A0)
REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A0)
#endif
#if defined(EXT_AUX_A1) && ANALOG_OK(EXT_AUX_A0)
REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A1)
#endif
#if defined(EXT_AUX_A2) && ANALOG_OK(EXT_AUX_A0)
REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A2)
#if _EXISTS(EXT_AUX_A1)
#if ANALOG_OK(EXT_AUX_A0)
REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A0)
#endif
#endif
#if defined(EXT_AUX_A3) && ANALOG_OK(EXT_AUX_A0)
REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A3)
#if _EXISTS(EXT_AUX_A2)
#if ANALOG_OK(EXT_AUX_A0)
REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A0)
#endif
#endif
#if _EXISTS(EXT_AUX_A3)
#if ANALOG_OK(EXT_AUX_A0)
REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A0)
#endif
#endif
#if defined(EXT_AUX_A4) && ANALOG_OK(EXT_AUX_A0)
REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A4)
#if _EXISTS(EXT_AUX_A4)
#if ANALOG_OK(EXT_AUX_A0)
REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A0)
#endif
#endif
#if PIN_EXISTS(FILWIDTH) && ANALOG_OK(FILWIDTH_PIN)
REPORT_NAME_ANALOG(__LINE__, FILWIDTH_PIN)
#if PIN_EXISTS(FILWIDTH)
#if ANALOG_OK(FILWIDTH_PIN)
REPORT_NAME_ANALOG(__LINE__, FILWIDTH_PIN)
#endif
#endif
#if PIN_EXISTS(MAIN_VOLTAGE_MEASURE) && ANALOG_OK(MAIN_VOLTAGE_MEASURE_PIN)
REPORT_NAME_ANALOG(__LINE__, MAIN_VOLTAGE_MEASURE_PIN)
#if PIN_EXISTS(MAIN_VOLTAGE_MEASURE)
#if ANALOG_OK(MAIN_VOLTAGE_MEASURE_PIN)
REPORT_NAME_ANALOG(__LINE__, MAIN_VOLTAGE_MEASURE_PIN)
#endif
#endif
#if !defined(ARDUINO_ARCH_SAM) && !defined(ARDUINO_ARCH_SAMD) // TC1 & TC2 are macros in the SAM/SAMD tool chain
#if defined(TC1) && ANALOG_OK(TC1)
#if _EXISTS(TC1)
#if ANALOG_OK(TC1)
REPORT_NAME_ANALOG(__LINE__, TC1)
#endif
#if defined(TC2) && ANALOG_OK(TC1)
REPORT_NAME_ANALOG(__LINE__, TC2)
#endif
#if _EXISTS(TC2)
#if ANALOG_OK(TC1)
REPORT_NAME_ANALOG(__LINE__, TC1)
#endif
#endif
#endif
#if PIN_EXISTS(TEMP_0) && ANALOG_OK(TEMP_0_PIN)
REPORT_NAME_ANALOG(__LINE__, TEMP_0_PIN)
#if PIN_EXISTS(TEMP_0)
#if ANALOG_OK(TEMP_0_PIN)
REPORT_NAME_ANALOG(__LINE__, TEMP_0_PIN)
#endif
#endif
#if PIN_EXISTS(TEMP_1) && ANALOG_OK(TEMP_1_PIN)
REPORT_NAME_ANALOG(__LINE__, TEMP_1_PIN)
#if PIN_EXISTS(TEMP_1)
#if ANALOG_OK(TEMP_1_PIN)
REPORT_NAME_ANALOG(__LINE__, TEMP_1_PIN)
#endif
#endif
#if PIN_EXISTS(TEMP_2) && ANALOG_OK(TEMP_2_PIN)
REPORT_NAME_ANALOG(__LINE__, TEMP_2_PIN)
#if PIN_EXISTS(TEMP_2)
#if ANALOG_OK(TEMP_2_PIN)
REPORT_NAME_ANALOG(__LINE__, TEMP_2_PIN)
#endif
#endif
#if PIN_EXISTS(TEMP_3) && ANALOG_OK(TEMP_3_PIN)
REPORT_NAME_ANALOG(__LINE__, TEMP_3_PIN)
#if PIN_EXISTS(TEMP_3)
#if ANALOG_OK(TEMP_3_PIN)
REPORT_NAME_ANALOG(__LINE__, TEMP_3_PIN)
#endif
#endif
#if PIN_EXISTS(TEMP_4) && ANALOG_OK(TEMP_4_PIN)
REPORT_NAME_ANALOG(__LINE__, TEMP_4_PIN)
#if PIN_EXISTS(TEMP_4)
#if ANALOG_OK(TEMP_4_PIN)
REPORT_NAME_ANALOG(__LINE__, TEMP_4_PIN)
#endif
#endif
#if PIN_EXISTS(TEMP_5) && ANALOG_OK(TEMP_5_PIN)
REPORT_NAME_ANALOG(__LINE__, TEMP_5_PIN)
#if PIN_EXISTS(TEMP_5)
#if ANALOG_OK(TEMP_5_PIN)
REPORT_NAME_ANALOG(__LINE__, TEMP_5_PIN)
#endif
#endif
#if PIN_EXISTS(TEMP_6) && ANALOG_OK(TEMP_6_PIN)
REPORT_NAME_ANALOG(__LINE__, TEMP_6_PIN)
#if PIN_EXISTS(TEMP_6)
#if ANALOG_OK(TEMP_6_PIN)
REPORT_NAME_ANALOG(__LINE__, TEMP_6_PIN)
#endif
#endif
#if PIN_EXISTS(TEMP_7) && ANALOG_OK(TEMP_7_PIN)
REPORT_NAME_ANALOG(__LINE__, TEMP_7_PIN)
#if PIN_EXISTS(TEMP_7)
#if ANALOG_OK(TEMP_7_PIN)
REPORT_NAME_ANALOG(__LINE__, TEMP_7_PIN)
#endif
#endif
#if PIN_EXISTS(TEMP_BED) && ANALOG_OK(TEMP_BED_PIN)
REPORT_NAME_ANALOG(__LINE__, TEMP_BED_PIN)
#if PIN_EXISTS(TEMP_BED)
#if ANALOG_OK(TEMP_BED_PIN)
REPORT_NAME_ANALOG(__LINE__, TEMP_BED_PIN)
#endif
#endif
#if PIN_EXISTS(TEMP_CHAMBER) && ANALOG_OK(TEMP_CHAMBER_PIN)
REPORT_NAME_ANALOG(__LINE__, TEMP_CHAMBER_PIN)
#if PIN_EXISTS(TEMP_CHAMBER)
#if ANALOG_OK(TEMP_CHAMBER_PIN)
REPORT_NAME_ANALOG(__LINE__, TEMP_CHAMBER_PIN)
#endif
#endif
#if PIN_EXISTS(TEMP_COOLER) && ANALOG_OK(TEMP_COOLER_PIN)
REPORT_NAME_ANALOG(__LINE__, TEMP_COOLER_PIN)
#if PIN_EXISTS(TEMP_COOLER)
#if ANALOG_OK(TEMP_COOLER_PIN)
REPORT_NAME_ANALOG(__LINE__, TEMP_COOLER_PIN)
#endif
#endif
#if PIN_EXISTS(ADC_KEYPAD) && ANALOG_OK(ADC_KEYPAD_PIN)
REPORT_NAME_ANALOG(__LINE__, ADC_KEYPAD_PIN)
#if PIN_EXISTS(ADC_KEYPAD)
#if ANALOG_OK(ADC_KEYPAD_PIN)
REPORT_NAME_ANALOG(__LINE__, ADC_KEYPAD_PIN)
#endif
#endif
//
// Digital Pin Assignments
//
#if defined(__FD) && __FD >= 0
#if _EXISTS(__FD)
REPORT_NAME_DIGITAL(__LINE__, __FD)
#endif
#if defined(__FS) && __FS >= 0
#if _EXISTS(__FS)
REPORT_NAME_DIGITAL(__LINE__, __FS)
#endif
#if defined(__GD) && __GD >= 0
#if _EXISTS(__GD)
REPORT_NAME_DIGITAL(__LINE__, __GD)
#endif
#if defined(__GS) && __GS >= 0
#if _EXISTS(__GS)
REPORT_NAME_DIGITAL(__LINE__, __GS)
#endif
#if PIN_EXISTS(AVR_MISO)
@ -137,46 +181,46 @@
#if PIN_EXISTS(BEEPER)
REPORT_NAME_DIGITAL(__LINE__, BEEPER_PIN)
#endif
#if defined(BTN_BACK) && BTN_BACK >= 0
#if _EXISTS(BTN_BACK)
REPORT_NAME_DIGITAL(__LINE__, BTN_BACK)
#endif
#if defined(BTN_CENTER) && BTN_CENTER >= 0
#if _EXISTS(BTN_CENTER)
REPORT_NAME_DIGITAL(__LINE__, BTN_CENTER)
#endif
#if defined(BTN_DOWN) && BTN_DOWN >= 0
#if _EXISTS(BTN_DOWN)
REPORT_NAME_DIGITAL(__LINE__, BTN_DOWN)
#endif
#if defined(BTN_DWN) && BTN_DWN >= 0
#if _EXISTS(BTN_DWN)
REPORT_NAME_DIGITAL(__LINE__, BTN_DWN)
#endif
#if defined(BTN_EN1) && BTN_EN1 >= 0
#if _EXISTS(BTN_EN1)
REPORT_NAME_DIGITAL(__LINE__, BTN_EN1)
#endif
#if defined(BTN_EN2) && BTN_EN2 >= 0
#if _EXISTS(BTN_EN2)
REPORT_NAME_DIGITAL(__LINE__, BTN_EN2)
#endif
#if defined(BTN_ENC_EN) && BTN_ENC_EN >= 0
#if _EXISTS(BTN_ENC_EN)
REPORT_NAME_DIGITAL(__LINE__, BTN_ENC_EN)
#endif
#if defined(BTN_ENC) && BTN_ENC >= 0
#if _EXISTS(BTN_ENC)
REPORT_NAME_DIGITAL(__LINE__, BTN_ENC)
#endif
#if defined(BTN_HOME) && BTN_HOME >= 0
#if _EXISTS(BTN_HOME)
REPORT_NAME_DIGITAL(__LINE__, BTN_HOME)
#endif
#if defined(BTN_LEFT) && BTN_LEFT >= 0
#if _EXISTS(BTN_LEFT)
REPORT_NAME_DIGITAL(__LINE__, BTN_LEFT)
#endif
#if defined(BTN_LFT) && BTN_LFT >= 0
#if _EXISTS(BTN_LFT)
REPORT_NAME_DIGITAL(__LINE__, BTN_LFT)
#endif
#if defined(BTN_RIGHT) && BTN_RIGHT >= 0
#if _EXISTS(BTN_RIGHT)
REPORT_NAME_DIGITAL(__LINE__, BTN_RIGHT)
#endif
#if defined(BTN_RT) && BTN_RT >= 0
#if _EXISTS(BTN_RT)
REPORT_NAME_DIGITAL(__LINE__, BTN_RT)
#endif
#if defined(BTN_UP) && BTN_UP >= 0
#if _EXISTS(BTN_UP)
REPORT_NAME_DIGITAL(__LINE__, BTN_UP)
#endif
#if PIN_EXISTS(JOY_X)
@ -287,10 +331,10 @@
#if PIN_EXISTS(CUTOFF_TEST)
REPORT_NAME_DIGITAL(__LINE__, CUTOFF_TEST_PIN)
#endif
#if defined(D57) && D57 >= 0
#if _EXISTS(D57)
REPORT_NAME_DIGITAL(__LINE__, D57)
#endif
#if defined(D58) && D58 >= 0
#if _EXISTS(D58)
REPORT_NAME_DIGITAL(__LINE__, D58)
#endif
#if PIN_EXISTS(DAC_DISABLE)
@ -305,49 +349,49 @@
#if PIN_EXISTS(DEBUG)
REPORT_NAME_DIGITAL(__LINE__, DEBUG_PIN)
#endif
#if defined(DIGIPOTS_I2C_SCL) && DIGIPOTS_I2C_SCL >= 0
#if _EXISTS(DIGIPOTS_I2C_SCL)
REPORT_NAME_DIGITAL(__LINE__, DIGIPOTS_I2C_SCL)
#endif
#if defined(DIGIPOTS_I2C_SDA_E0) && DIGIPOTS_I2C_SDA_E0 >= 0
#if _EXISTS(DIGIPOTS_I2C_SDA_E0)
REPORT_NAME_DIGITAL(__LINE__, DIGIPOTS_I2C_SDA_E0)
#endif
#if defined(DIGIPOTS_I2C_SDA_E1) && DIGIPOTS_I2C_SDA_E1 >= 0
#if _EXISTS(DIGIPOTS_I2C_SDA_E1)
REPORT_NAME_DIGITAL(__LINE__, DIGIPOTS_I2C_SDA_E1)
#endif
#if defined(DIGIPOTS_I2C_SDA_X) && DIGIPOTS_I2C_SDA_X >= 0
#if _EXISTS(DIGIPOTS_I2C_SDA_X)
REPORT_NAME_DIGITAL(__LINE__, DIGIPOTS_I2C_SDA_X)
#endif
#if defined(DIGIPOTS_I2C_SDA_Y) && DIGIPOTS_I2C_SDA_Y >= 0
#if _EXISTS(DIGIPOTS_I2C_SDA_Y)
REPORT_NAME_DIGITAL(__LINE__, DIGIPOTS_I2C_SDA_Y)
#endif
#if defined(DIGIPOTS_I2C_SDA_Z) && DIGIPOTS_I2C_SDA_Z >= 0
#if _EXISTS(DIGIPOTS_I2C_SDA_Z)
REPORT_NAME_DIGITAL(__LINE__, DIGIPOTS_I2C_SDA_Z)
#endif
#if PIN_EXISTS(DIGIPOTSS)
REPORT_NAME_DIGITAL(__LINE__, DIGIPOTSS_PIN)
#endif
#if defined(DOGLCD_A0) && DOGLCD_A0 >= 0
#if _EXISTS(DOGLCD_A0)
REPORT_NAME_DIGITAL(__LINE__, DOGLCD_A0)
#endif
#if defined(DOGLCD_CS) && DOGLCD_CS >= 0
#if _EXISTS(DOGLCD_CS)
REPORT_NAME_DIGITAL(__LINE__, DOGLCD_CS)
#endif
#if defined(DOGLCD_MOSI) && DOGLCD_MOSI >= 0
#if _EXISTS(DOGLCD_MOSI)
REPORT_NAME_DIGITAL(__LINE__, DOGLCD_MOSI)
#endif
#if defined(DOGLCD_SCK) && DOGLCD_SCK >= 0
#if _EXISTS(DOGLCD_SCK)
REPORT_NAME_DIGITAL(__LINE__, DOGLCD_SCK)
#endif
#if defined(TMC_SW_MISO) && TMC_SW_MISO >= 0
#if _EXISTS(TMC_SW_MISO)
REPORT_NAME_DIGITAL(__LINE__, TMC_SW_MISO)
#endif
#if defined(TMC_SW_MOSI) && TMC_SW_MOSI >= 0
#if _EXISTS(TMC_SW_MOSI)
REPORT_NAME_DIGITAL(__LINE__, TMC_SW_MOSI)
#endif
#if defined(TMC_SW_SCK) && TMC_SW_SCK >= 0
#if _EXISTS(TMC_SW_SCK)
REPORT_NAME_DIGITAL(__LINE__, TMC_SW_SCK)
#endif
#if defined(TFTGLCD_CS) && TFTGLCD_CS >= 0
#if _EXISTS(TFTGLCD_CS)
REPORT_NAME_DIGITAL(__LINE__, TFTGLCD_CS)
#endif
#if PIN_EXISTS(E_MUX0)
@ -557,71 +601,71 @@
#if PIN_EXISTS(E7_STEP)
REPORT_NAME_DIGITAL(__LINE__, E7_STEP_PIN)
#endif
#if defined(ENET_CRS) && ENET_CRS >= 0
#if _EXISTS(ENET_CRS)
REPORT_NAME_DIGITAL(__LINE__, ENET_CRS)
#endif
#if defined(ENET_MDIO) && ENET_MDIO >= 0
#if _EXISTS(ENET_MDIO)
REPORT_NAME_DIGITAL(__LINE__, ENET_MDIO)
#endif
#if defined(ENET_MOC) && ENET_MOC >= 0
#if _EXISTS(ENET_MOC)
REPORT_NAME_DIGITAL(__LINE__, ENET_MOC)
#endif
#if defined(ENET_RX_ER) && ENET_RX_ER >= 0
#if _EXISTS(ENET_RX_ER)
REPORT_NAME_DIGITAL(__LINE__, ENET_RX_ER)
#endif
#if defined(ENET_RXD0) && ENET_RXD0 >= 0
#if _EXISTS(ENET_RXD0)
REPORT_NAME_DIGITAL(__LINE__, ENET_RXD0)
#endif
#if defined(ENET_RXD1) && ENET_RXD1 >= 0
#if _EXISTS(ENET_RXD1)
REPORT_NAME_DIGITAL(__LINE__, ENET_RXD1)
#endif
#if defined(ENET_TX_EN) && ENET_TX_EN >= 0
#if _EXISTS(ENET_TX_EN)
REPORT_NAME_DIGITAL(__LINE__, ENET_TX_EN)
#endif
#if defined(ENET_TXD0) && ENET_TXD0 >= 0
#if _EXISTS(ENET_TXD0)
REPORT_NAME_DIGITAL(__LINE__, ENET_TXD0)
#endif
#if defined(ENET_TXD1) && ENET_TXD1 >= 0
#if _EXISTS(ENET_TXD1)
REPORT_NAME_DIGITAL(__LINE__, ENET_TXD1)
#endif
#if PIN_EXISTS(EXP_VOLTAGE_LEVEL)
REPORT_NAME_DIGITAL(__LINE__, EXP_VOLTAGE_LEVEL_PIN)
#endif
#if defined(EXT_AUX_A0_IO) && EXT_AUX_A0_IO >= 0
#if _EXISTS(EXT_AUX_A0_IO)
REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_A0_IO)
#endif
#if defined(EXT_AUX_A1_IO) && EXT_AUX_A1_IO >= 0
#if _EXISTS(EXT_AUX_A1_IO)
REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_A1_IO)
#endif
#if defined(EXT_AUX_A2_IO) && EXT_AUX_A2_IO >= 0
#if _EXISTS(EXT_AUX_A2_IO)
REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_A2_IO)
#endif
#if defined(EXT_AUX_A3_IO) && EXT_AUX_A3_IO >= 0
#if _EXISTS(EXT_AUX_A3_IO)
REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_A3_IO)
#endif
#if defined(EXT_AUX_A4_IO) && EXT_AUX_A4_IO >= 0
#if _EXISTS(EXT_AUX_A4_IO)
REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_A4_IO)
#endif
#if defined(EXT_AUX_PWM_D24) && EXT_AUX_PWM_D24 >= 0
#if _EXISTS(EXT_AUX_PWM_D24)
REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_PWM_D24)
#endif
#if defined(EXT_AUX_RX1_D2) && EXT_AUX_RX1_D2 >= 0
#if _EXISTS(EXT_AUX_RX1_D2)
REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_RX1_D2)
#endif
#if defined(EXT_AUX_SCL_D0) && EXT_AUX_SCL_D0 >= 0
#if _EXISTS(EXT_AUX_SCL_D0)
REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_SCL_D0)
#endif
#if defined(EXT_AUX_SDA_D1) && EXT_AUX_SDA_D1 >= 0
#if _EXISTS(EXT_AUX_SDA_D1)
REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_SDA_D1)
#endif
#if defined(EXT_AUX_TX1_D3) && EXT_AUX_TX1_D3 >= 0
#if _EXISTS(EXT_AUX_TX1_D3)
REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_TX1_D3)
#endif
#if defined(EXTRUDER_0_AUTO_FAN) && EXTRUDER_0_AUTO_FAN >= 0
#if _EXISTS(EXTRUDER_0_AUTO_FAN)
REPORT_NAME_DIGITAL(__LINE__, EXTRUDER_0_AUTO_FAN)
#endif
#if defined(EXTRUDER_1_AUTO_FAN) && EXTRUDER_1_AUTO_FAN >= 0
#if _EXISTS(EXTRUDER_1_AUTO_FAN)
REPORT_NAME_DIGITAL(__LINE__, EXTRUDER_1_AUTO_FAN)
#endif
#if PIN_EXISTS(FAN)
@ -735,25 +779,25 @@
#if PIN_EXISTS(LCD_BACKLIGHT)
REPORT_NAME_DIGITAL(__LINE__, LCD_BACKLIGHT_PIN)
#endif
#if defined(LCD_PINS_D4) && LCD_PINS_D4 >= 0
#if _EXISTS(LCD_PINS_D4)
REPORT_NAME_DIGITAL(__LINE__, LCD_PINS_D4)
#endif
#if defined(LCD_PINS_D5) && LCD_PINS_D5 >= 0
#if _EXISTS(LCD_PINS_D5)
REPORT_NAME_DIGITAL(__LINE__, LCD_PINS_D5)
#endif
#if defined(LCD_PINS_D6) && LCD_PINS_D6 >= 0
#if _EXISTS(LCD_PINS_D6)
REPORT_NAME_DIGITAL(__LINE__, LCD_PINS_D6)
#endif
#if defined(LCD_PINS_D7) && LCD_PINS_D7 >= 0
#if _EXISTS(LCD_PINS_D7)
REPORT_NAME_DIGITAL(__LINE__, LCD_PINS_D7)
#endif
#if defined(LCD_PINS_ENABLE) && LCD_PINS_ENABLE >= 0
#if _EXISTS(LCD_PINS_ENABLE)
REPORT_NAME_DIGITAL(__LINE__, LCD_PINS_ENABLE)
#endif
#if defined(LCD_PINS_RS) && LCD_PINS_RS >= 0
#if _EXISTS(LCD_PINS_RS)
REPORT_NAME_DIGITAL(__LINE__, LCD_PINS_RS)
#endif
#if defined(LCD_SDSS) && LCD_SDSS >= 0
#if _EXISTS(LCD_SDSS)
REPORT_NAME_DIGITAL(__LINE__, LCD_SDSS)
#endif
#if PIN_EXISTS(LED_GREEN)
@ -799,9 +843,9 @@
REPORT_NAME_DIGITAL(__LINE__, MAX7219_LOAD_PIN)
#endif
// #if defined(MISO) && MISO >= 0
// REPORT_NAME_DIGITAL(__LINE__, MISO)
// #endif
//#if _EXISTS(MISO)
// REPORT_NAME_DIGITAL(__LINE__, MISO)
//#endif
#if PIN_EXISTS(MISO)
REPORT_NAME_DIGITAL(__LINE__, SD_MISO_PIN)
#endif
@ -817,9 +861,9 @@
#if PIN_EXISTS(MOSFET_D)
REPORT_NAME_DIGITAL(__LINE__, MOSFET_D_PIN)
#endif
// #if defined(MOSI) && MOSI >= 0
// REPORT_NAME_DIGITAL(__LINE__, MOSI)
// #endif
//#if _EXISTS(MOSI)
// REPORT_NAME_DIGITAL(__LINE__, MOSI)
//#endif
#if PIN_EXISTS(MOSI)
REPORT_NAME_DIGITAL(__LINE__, SD_MOSI_PIN)
#endif
@ -862,7 +906,7 @@
#if PIN_EXISTS(PWM_2)
REPORT_NAME_DIGITAL(__LINE__, PWM_2_PIN)
#endif
#if defined(REF_CLK) && REF_CLK >= 0
#if _EXISTS(REF_CLK)
REPORT_NAME_DIGITAL(__LINE__, REF_CLK)
#endif
#if PIN_EXISTS(RAMPS_D10)
@ -898,28 +942,28 @@
#if PIN_EXISTS(SAFETY_TRIGGERED)
REPORT_NAME_DIGITAL(__LINE__, SAFETY_TRIGGERED_PIN)
#endif
// #if defined(SCK) && SCK >= 0
// REPORT_NAME_DIGITAL(__LINE__, SCK)
// #endif
//#if _EXISTS(SCK)
// REPORT_NAME_DIGITAL(__LINE__, SCK)
//#endif
#if PIN_EXISTS(SCK)
REPORT_NAME_DIGITAL(__LINE__, SD_SCK_PIN)
#endif
// #if defined(SCL) && SCL >= 0
// REPORT_NAME_DIGITAL(__LINE__, SCL)
// #endif
//#if _EXISTS(SCL)
// REPORT_NAME_DIGITAL(__LINE__, SCL)
//#endif
#if PIN_EXISTS(SD_DETECT)
REPORT_NAME_DIGITAL(__LINE__, SD_DETECT_PIN)
#endif
// #if defined(SDA) && SDA >= 0
// REPORT_NAME_DIGITAL(__LINE__, SDA)
// #endif
//#if _EXISTS(SDA)
// REPORT_NAME_DIGITAL(__LINE__, SDA)
//#endif
#if PIN_EXISTS(SDPOWER)
REPORT_NAME_DIGITAL(__LINE__, SDPOWER_PIN)
#endif
#if defined(SDSS) && SDSS >= 0
#if _EXISTS(SDSS)
REPORT_NAME_DIGITAL(__LINE__, SDSS)
#endif
#if defined(SERVO0) && SERVO0 >= 0
#if _EXISTS(SERVO0)
REPORT_NAME_DIGITAL(__LINE__, SERVO0)
#endif
#if PIN_EXISTS(SERVO0)
@ -976,7 +1020,7 @@
#if PIN_EXISTS(SOL7)
REPORT_NAME_DIGITAL(__LINE__, SOL7_PIN)
#endif
#if defined(SPARE_IO) && SPARE_IO >= 0
#if _EXISTS(SPARE_IO)
REPORT_NAME_DIGITAL(__LINE__, SPARE_IO)
#endif
#if PIN_EXISTS(SPI_EEPROM1_CS)
@ -1015,7 +1059,7 @@
#if PIN_EXISTS(STAT_LED_BLUE)
REPORT_NAME_DIGITAL(__LINE__, STAT_LED_BLUE_PIN)
#endif
#if defined(STAT_LED_RED_LED) && STAT_LED_RED_LED >= 0
#if _EXISTS(STAT_LED_RED_LED)
REPORT_NAME_DIGITAL(__LINE__, STAT_LED_RED_LED)
#endif
#if PIN_EXISTS(STAT_LED_RED)
@ -1069,13 +1113,13 @@
#if PIN_EXISTS(TX_ENABLE)
REPORT_NAME_DIGITAL(__LINE__, TX_ENABLE_PIN)
#endif
#if defined(UI1) && UI1 >= 0
#if _EXISTS(UI1)
REPORT_NAME_DIGITAL(__LINE__, UI1)
#endif
#if defined(UI2) && UI2 >= 0
#if _EXISTS(UI2)
REPORT_NAME_DIGITAL(__LINE__, UI2)
#endif
#if defined(UNUSED_PWM) && UNUSED_PWM >= 0
#if _EXISTS(UNUSED_PWM)
REPORT_NAME_DIGITAL(__LINE__, UNUSED_PWM)
#endif
#if PIN_EXISTS(X_ATT)

2
Marlin/src/pins/ramps/pins_AZTEEG_X3.h

@ -43,7 +43,7 @@
#define SERVO0_PIN 44 // SERVO1 port
#define SERVO1_PIN 55 // SERVO2 port
#include "pins_RAMPS_13.h"
#include "pins_RAMPS_13.h" // ... RAMPS
//
// LCD / Controller

2
Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h

@ -115,7 +115,7 @@
//
// Import RAMPS 1.3 pins
//
#include "pins_RAMPS_13.h"
#include "pins_RAMPS_13.h" // ... RAMPS
//
// Used by the Hephestos 2 heated bed upgrade kit

2
Marlin/src/pins/ramps/pins_K8200.h

@ -30,4 +30,4 @@
#define DEFAULT_MACHINE_NAME "K8200"
#define DEFAULT_SOURCE_CODE_URL "github.com/CONSULitAS/Marlin-K8200"
#include "pins_3DRAG.h"
#include "pins_3DRAG.h" // ... RAMPS

2
Marlin/src/pins/ramps/pins_K8400.h

@ -50,7 +50,7 @@
#define X_STOP_PIN 3
#define Y_STOP_PIN 14
#include "pins_3DRAG.h"
#include "pins_3DRAG.h" // ... RAMPS
//
// Heaters / Fans

2
Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h

@ -117,4 +117,4 @@
// Other RAMPS 1.3 pins
//
#define IS_RAMPS_EFB // Override autodetection. Bed will be undefined.
#include "pins_RAMPS_13.h"
#include "pins_RAMPS_13.h" // ... RAMPS

2
Marlin/src/pins/ramps/pins_MKS_BASE_10.h

@ -34,4 +34,4 @@
#define BOARD_INFO_NAME "MKS BASE 1.0"
#define MKS_BASE_VERSION 10
#include "pins_MKS_BASE_common.h"
#include "pins_MKS_BASE_common.h" // ... RAMPS

2
Marlin/src/pins/ramps/pins_MKS_BASE_14.h

@ -58,7 +58,7 @@
#define CASE_LIGHT_PIN 11 // PB5 ** Pin24 ** PWM11
#endif
#include "pins_MKS_BASE_common.h"
#include "pins_MKS_BASE_common.h" // ... RAMPS
/*
Available connectors on MKS BASE v1.4

2
Marlin/src/pins/ramps/pins_MKS_BASE_15.h

@ -32,4 +32,4 @@
#define BOARD_INFO_NAME "MKS BASE 1.5"
#define MKS_BASE_VERSION 15
#include "pins_MKS_BASE_common.h"
#include "pins_MKS_BASE_common.h" // ... RAMPS

2
Marlin/src/pins/ramps/pins_MKS_BASE_16.h

@ -56,4 +56,4 @@
#define PS_ON_PIN -1
#endif
#include "pins_MKS_BASE_common.h"
#include "pins_MKS_BASE_common.h" // ... RAMPS

2
Marlin/src/pins/ramps/pins_MKS_BASE_HEROIC.h

@ -25,7 +25,7 @@
* MKS BASE with Heroic HR4982 stepper drivers
*/
#include "pins_MKS_BASE_15.h"
#include "pins_MKS_BASE_15.h" // ... MKS_BASE_common ... RAMPS
/**
* Some new boards use HR4982 (Heroic) instead of the A4982 (Allegro) stepper drivers.

2
Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h

@ -27,7 +27,7 @@
#define BOARD_INFO_NAME "RigidBoard V2"
#include "pins_RIGIDBOARD.h"
#include "pins_RIGIDBOARD.h" // ... RAMPS
//
// Steppers

2
Marlin/src/pins/ramps/pins_TRIGORILLA_13.h

@ -41,4 +41,4 @@
#define E0_AUTO_FAN_PIN 9
#endif
#include "pins_RAMPS_13.h"
#include "pins_RAMPS_13.h" // ... RAMPS

2
Marlin/src/pins/ramps/pins_ZRIB_V20.h

@ -26,7 +26,7 @@
* V2 and V3 Boards only differ in USB controller, nothing affecting the pins.
*/
#include "pins_MKS_GEN_13.h"
#include "pins_MKS_GEN_13.h" // ... RAMPS
#define ZRIB_V20_D6_PIN 6 // Fan
#define ZRIB_V20_D9_PIN 9 // Fan2

2
Marlin/src/pins/ramps/pins_ZRIB_V52.h

@ -48,7 +48,7 @@
#define E2_ENABLE_PIN 22
#define HEATER_1_PIN 7
#include "pins_MKS_BASE_common.h"
#include "pins_MKS_BASE_common.h" // ... RAMPS
/*
Available connectors on MKS BASE v1.4 (Basically same as ZRIB V5.2)

2
Marlin/src/pins/sanguino/pins_AZTEEG_X1.h

@ -27,4 +27,4 @@
#define BOARD_INFO_NAME "Azteeg X1"
#include "pins_SANGUINOLOLU_12.h"
#include "pins_SANGUINOLOLU_12.h" // ... SANGUINOLOLU_11

2
Marlin/src/pins/sanguino/pins_MELZI.h

@ -44,4 +44,4 @@
#endif
#endif
#include "pins_SANGUINOLOLU_12.h"
#include "pins_SANGUINOLOLU_12.h" // ... SANGUINOLOLU_11

2
Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h

@ -42,7 +42,7 @@
#define BOARD_ST7920_DELAY_3 125
#endif
#include "pins_MELZI.h"
#include "pins_MELZI.h" // ... SANGUINOLOLU_12 ... SANGUINOLOLU_11
//
// For the stock CR-10 enable CR10_STOCKDISPLAY in Configuration.h

2
Marlin/src/pins/sanguino/pins_MELZI_MAKR3D.h

@ -26,4 +26,4 @@
*/
#define BOARD_INFO_NAME "Melzi (ATmega1284)"
#include "pins_MELZI.h"
#include "pins_MELZI.h" // ... SANGUINOLOLU_12 ... SANGUINOLOLU_11

2
Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h

@ -27,7 +27,7 @@
#define BOARD_INFO_NAME "Melzi (Malyan)"
#include "pins_MELZI.h"
#include "pins_MELZI.h" // ... SANGUINOLOLU_12 ... SANGUINOLOLU_11
#undef LCD_SDSS
#undef LCD_PINS_RS

2
Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h

@ -34,7 +34,7 @@
#define BOARD_ST7920_DELAY_3 0
#endif
#include "pins_MELZI.h"
#include "pins_MELZI.h" // ... SANGUINOLOLU_12 ... SANGUINOLOLU_11
#undef Z_ENABLE_PIN
#undef LCD_PINS_RS

2
Marlin/src/pins/sanguino/pins_MELZI_V2.h

@ -34,4 +34,4 @@
#define BOARD_ST7920_DELAY_3 0
#endif
#include "pins_MELZI.h"
#include "pins_MELZI.h" // ... SANGUINOLOLU_12 ... SANGUINOLOLU_11

2
Marlin/src/pins/sanguino/pins_STB_11.h

@ -27,4 +27,4 @@
#define BOARD_INFO_NAME "STB V1.1"
#include "pins_SANGUINOLOLU_12.h"
#include "pins_SANGUINOLOLU_12.h" // ... SANGUINOLOLU_11

2
Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_MZ_V1_0.h

@ -23,4 +23,4 @@
#define BOARD_INFO_NAME "BTT SKR Mini MZ V1.0"
#include "pins_BTT_SKR_MINI_E3_V2_0.h"
#include "pins_BTT_SKR_MINI_E3_V2_0.h" // ... BTT_SKR_MINI_E3_common

2
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D_V1_1.h

@ -64,4 +64,4 @@
#endif
#endif
#include "pins_MKS_ROBIN_E3_V1_1_common.h"
#include "pins_MKS_ROBIN_E3_V1_1_common.h" // ... MKS_ROBIN_E3_common

2
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_V1_1.h

@ -33,4 +33,4 @@
#define BOARD_INFO_NAME "MKS Robin E3 V1.1"
#endif
#include "pins_MKS_ROBIN_E3_V1_1_common.h"
#include "pins_MKS_ROBIN_E3_V1_1_common.h" // ... MKS_ROBIN_E3_common

2
Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once

2
Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once

2
Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h

@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once

2
buildroot/bin/mftest

@ -155,7 +155,7 @@ if ((AUTO_BUILD)); then
BLINE=$( grep -E "define\s+BOARD_$MB\b" Marlin/src/core/boards.h )
BNUM=$( $SED -E 's/^.+BOARD_[^ ]+ +([0-9]+).+$/\1/' <<<"$BLINE" )
BDESC=$( $SED -E 's/^.+\/\/ *(.+)$/\1/' <<<"$BLINE" )
[[ -z $BNUM ]] && { echo "Error - Can't find $MB in boards list." ; exit 1 ; }
[[ -z $BNUM ]] && { echo "Error - Can't find BOARD_$MB in core/boards.h." ; exit 1 ; }
ENVS=( $( grep -EA1 "MB\(.*\b$MB\b.*\)" Marlin/src/pins/pins.h | grep -E "#include.+//.+(env|$SYS):[^ ]+" | grep -oE "(env|$SYS):[^ ]+" | $SED -E "s/(env|$SYS)://" ) )
[[ -z $ENVS ]] && { errout "Error - Can't find target(s) for $MB ($BNUM)." ; exit 1 ; }
ECOUNT=${#ENVS[*]}

9
buildroot/share/PlatformIO/scripts/common-cxxflags.py

@ -3,13 +3,16 @@
# Convenience script to apply customizations to CPP flags
#
Import("env")
env.Append(CXXFLAGS=[
"-Wno-register"
cxxflags = [
#"-Wno-incompatible-pointer-types",
#"-Wno-unused-const-variable",
#"-Wno-maybe-uninitialized",
#"-Wno-sign-compare"
])
]
if "teensy" not in env['PIOENV']:
cxxflags += ["-Wno-register"]
env.Append(CXXFLAGS=cxxflags)
#
# Add CPU frequency as a compile time constant instead of a runtime variable

9
buildroot/share/PlatformIO/scripts/common-dependencies.py

@ -2,7 +2,12 @@
# common-dependencies.py
# Convenience script to check dependencies and add libs and sources for Marlin Enabled Features
#
import subprocess,os,re
import subprocess,os,re,pioutil
Import("env")
# Detect that 'vscode init' is running
if pioutil.is_vscode_init():
env.Exit(0)
PIO_VERSION_MIN = (5, 0, 3)
try:
@ -31,8 +36,6 @@ except:
from platformio.package.meta import PackageSpec
from platformio.project.config import ProjectConfig
Import("env")
#print(env.Dump())
try:

15
buildroot/share/PlatformIO/scripts/download_mks_assets.py

@ -3,10 +3,15 @@
# Added by HAS_TFT_LVGL_UI to download assets from Makerbase repo
#
Import("env")
import os,requests,zipfile,tempfile,shutil
import os,requests,zipfile,tempfile,shutil,pioutil
url = "https://github.com/makerbase-mks/Mks-Robin-Nano-Marlin2.0-Firmware/archive/master.zip"
zip_path = os.path.join(env.Dictionary("PROJECT_LIBDEPS_DIR"), "mks-assets.zip")
# Detect that 'vscode init' is running
if pioutil.is_vscode_init():
env.Exit(0)
url = "https://github.com/makerbase-mks/Mks-Robin-Nano-Marlin2.0-Firmware/archive/0263cdaccf.zip"
deps_path = env.Dictionary("PROJECT_LIBDEPS_DIR")
zip_path = os.path.join(deps_path, "mks-assets.zip")
assets_path = os.path.join(env.Dictionary("PROJECT_BUILD_DIR"), env.Dictionary("PIOENV"), "assets")
def download_mks_assets():
@ -14,8 +19,8 @@ def download_mks_assets():
r = requests.get(url, stream=True)
# the user may have a very clean workspace,
# so create the PROJECT_LIBDEPS_DIR directory if not exits
if os.path.exists(env.Dictionary("PROJECT_LIBDEPS_DIR")) == False:
os.mkdir(env.Dictionary("PROJECT_LIBDEPS_DIR"))
if os.path.exists(deps_path) == False:
os.mkdir(deps_path)
with open(zip_path, 'wb') as fd:
for chunk in r.iter_content(chunk_size=128):
fd.write(chunk)

47
buildroot/share/PlatformIO/scripts/lerdge.py

@ -12,37 +12,36 @@ from SCons.Script import DefaultEnvironment
board = DefaultEnvironment().BoardConfig()
def encryptByte(byte):
byte = 0xFF & ((byte << 6) | (byte >> 2))
i = 0x58 + byte
j = 0x05 + byte + (i >> 8)
byte = (0xF8 & i) | (0x07 & j)
return byte
byte = 0xFF & ((byte << 6) | (byte >> 2))
i = 0x58 + byte
j = 0x05 + byte + (i >> 8)
byte = (0xF8 & i) | (0x07 & j)
return byte
def encrypt_file(input, output_file, file_length):
input_file = bytearray(input.read())
for i in range(len(input_file)):
result = encryptByte(input_file[i])
input_file[i] = result
output_file.write(input_file)
return
input_file = bytearray(input.read())
for i in range(len(input_file)):
input_file[i] = encryptByte(input_file[i])
output_file.write(input_file)
# Encrypt ${PROGNAME}.bin and save it with the name given in build.encrypt
def encrypt(source, target, env):
fwname = board.get("build.encrypt")
print("Encrypting %s to %s" % (target[0].path, fwname))
firmware = open(target[0].path, "rb")
renamed = open(target[0].dir.path + "/" + fwname, "wb")
length = os.path.getsize(target[0].path)
fwpath = target[0].path
enname = board.get("build.encrypt")
print("Encrypting %s to %s" % (fwpath, enname))
fwfile = open(fwpath, "rb")
enfile = open(target[0].dir.path + "/" + enname, "wb")
length = os.path.getsize(fwpath)
encrypt_file(firmware, renamed, length)
encrypt_file(fwfile, enfile, length)
firmware.close()
renamed.close()
fwfile.close()
enfile.close()
os.remove(fwpath)
if 'encrypt' in board.get("build").keys():
if board.get("build.encrypt") != "":
marlin.add_post_action(encrypt)
if board.get("build.encrypt") != "":
marlin.add_post_action(encrypt)
else:
print("LERDGE builds require output file via board_build.encrypt = 'filename' parameter")
exit(1)
print("LERDGE builds require output file via board_build.encrypt = 'filename' parameter")
exit(1)

16
buildroot/share/PlatformIO/scripts/marlin.py

@ -48,22 +48,24 @@ def encrypt_mks(source, target, env, new_name):
key = [0xA3, 0xBD, 0xAD, 0x0D, 0x41, 0x11, 0xBB, 0x8D, 0xDC, 0x80, 0x2D, 0xD0, 0xD2, 0xC4, 0x9B, 0x1E, 0x26, 0xEB, 0xE3, 0x33, 0x4A, 0x15, 0xE4, 0x0A, 0xB3, 0xB1, 0x3C, 0x93, 0xBB, 0xAF, 0xF7, 0x3E]
firmware = open(target[0].path, "rb")
renamed = open(target[0].dir.path + "/" + new_name, "wb")
length = os.path.getsize(target[0].path)
fwpath = target[0].path
fwfile = open(fwpath, "rb")
enfile = open(target[0].dir.path + "/" + new_name, "wb")
length = os.path.getsize(fwpath)
position = 0
try:
while position < length:
byte = firmware.read(1)
byte = fwfile.read(1)
if position >= 320 and position < 31040:
byte = chr(ord(byte) ^ key[position & 31])
if sys.version_info[0] > 2:
byte = bytes(byte, 'latin1')
renamed.write(byte)
enfile.write(byte)
position += 1
finally:
firmware.close()
renamed.close()
fwfile.close()
enfile.close()
os.remove(fwpath)
def add_post_action(action):
env.AddPostAction(join("$BUILD_DIR", "${PROGNAME}.bin"), action);

8
buildroot/share/PlatformIO/scripts/pioutil.py

@ -0,0 +1,8 @@
#
# buildroot/share/PlatformIO/scripts/pioutil.py
#
# Detect that 'vscode init' is running
def is_vscode_init():
from SCons.Script import COMMAND_LINE_TARGETS
return "idedata" in COMMAND_LINE_TARGETS or "_idedata" in COMMAND_LINE_TARGETS

11
buildroot/share/PlatformIO/scripts/preflight-checks.py

@ -2,9 +2,13 @@
# preflight-checks.py
# Check for common issues prior to compiling
#
import os,re,sys
import os,re,sys,pioutil
Import("env")
# Detect that 'vscode init' is running
if pioutil.is_vscode_init():
env.Exit(0)
def get_envs_for_board(board):
with open(os.path.join("Marlin", "src", "pins", "pins.h"), "r") as file:
@ -94,7 +98,4 @@ def sanity_check_target():
err = "ERROR: Old files fell into your Marlin folder. Remove %s and try again" % ", ".join(mixedin)
raise SystemExit(err)
# Detect that 'vscode init' is running
from SCons.Script import COMMAND_LINE_TARGETS
if "idedata" not in COMMAND_LINE_TARGETS:
sanity_check_target()
sanity_check_target()

4
ini/stm32f4.ini

@ -263,13 +263,13 @@ platform = ${common_stm32.platform}
extends = stm32_variant
board = marlin_STM32F407ZGT6
board_build.variant = MARLIN_LERDGE
board_build.encrypt = firmware.bin
board_build.offset = 0x10000
build_flags = ${stm32_variant.build_flags}
-DSTM32F4 -DSTM32F4xx -DTARGET_STM32F4
-DDISABLE_GENERIC_SERIALUSB -DARDUINO_ARCH_STM32 -DLERDGE_TFT35
build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
extra_scripts = ${stm32_variant.extra_scripts}
extra_scripts = ${common_stm32.extra_scripts}
pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
buildroot/share/PlatformIO/scripts/lerdge.py
#

Loading…
Cancel
Save