Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x
This commit is contained in:
@@ -2021,9 +2021,9 @@
|
||||
// calibration.
|
||||
//#define BTC_PROBE_TEMP 30 // (°C)
|
||||
|
||||
// Height above Z=0.0f to raise the nozzle. Lowering this can help the probe to heat faster.
|
||||
// Note: the Z=0.0f offset is determined by the probe offset which can be set using M851.
|
||||
//#define PTC_PROBE_HEATING_OFFSET 0.5f
|
||||
// Height above Z=0.0 to raise the nozzle. Lowering this can help the probe to heat faster.
|
||||
// Note: the Z=0.0 offset is determined by the probe offset which can be set using M851.
|
||||
//#define PTC_PROBE_HEATING_OFFSET 0.5
|
||||
|
||||
// Height to raise the Z-probe between heating and taking the next measurement. Some probes
|
||||
// may fail to untrigger if they have been triggered for a long time, which can be solved by
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@
|
||||
* here we define this default string as the date where the latest release
|
||||
* version was tagged.
|
||||
*/
|
||||
//#define STRING_DISTRIBUTION_DATE "2021-07-19"
|
||||
//#define STRING_DISTRIBUTION_DATE "2021-07-21"
|
||||
|
||||
/**
|
||||
* Defines a generic printer name to be output to the LCD after booting Marlin.
|
||||
|
||||
+13
-12
@@ -333,18 +333,19 @@
|
||||
#define BOARD_CCROBOT_MEEB_3DP 4035 // ccrobot-online.com MEEB_3DP (STM32F103RC)
|
||||
#define BOARD_CHITU3D_V5 4036 // Chitu3D TronXY X5SA V5 Board
|
||||
#define BOARD_CHITU3D_V6 4037 // Chitu3D TronXY X5SA V6 Board
|
||||
#define BOARD_CREALITY_V4 4038 // Creality v4.x (STM32F103RE)
|
||||
#define BOARD_CREALITY_V427 4039 // Creality v4.2.7 (STM32F103RE)
|
||||
#define BOARD_CREALITY_V4210 4040 // Creality v4.2.10 (STM32F103RE) as found in the CR-30
|
||||
#define BOARD_CREALITY_V431 4041 // Creality v4.3.1 (STM32F103RE)
|
||||
#define BOARD_CREALITY_V452 4042 // Creality v4.5.2 (STM32F103RE)
|
||||
#define BOARD_CREALITY_V453 4043 // Creality v4.5.3 (STM32F103RE)
|
||||
#define BOARD_TRIGORILLA_PRO 4044 // Trigorilla Pro (STM32F103ZET6)
|
||||
#define BOARD_FLY_MINI 4045 // FLYmaker FLY MINI (STM32F103RCT6)
|
||||
#define BOARD_FLSUN_HISPEED 4046 // FLSUN HiSpeedV1 (STM32F103VET6)
|
||||
#define BOARD_BEAST 4047 // STM32F103RET6 Libmaple-based controller
|
||||
#define BOARD_MINGDA_MPX_ARM_MINI 4048 // STM32F103ZET6 Mingda MD-16
|
||||
#define BOARD_GTM32_PRO_VD 4049 // STM32F103VET6 controller
|
||||
#define BOARD_CHITU3D_V9 4038 // Chitu3D TronXY X5SA V9 Board
|
||||
#define BOARD_CREALITY_V4 4039 // Creality v4.x (STM32F103RE)
|
||||
#define BOARD_CREALITY_V427 4040 // Creality v4.2.7 (STM32F103RE)
|
||||
#define BOARD_CREALITY_V4210 4041 // Creality v4.2.10 (STM32F103RE) as found in the CR-30
|
||||
#define BOARD_CREALITY_V431 4042 // Creality v4.3.1 (STM32F103RE)
|
||||
#define BOARD_CREALITY_V452 4043 // Creality v4.5.2 (STM32F103RE)
|
||||
#define BOARD_CREALITY_V453 4044 // Creality v4.5.3 (STM32F103RE)
|
||||
#define BOARD_TRIGORILLA_PRO 4045 // Trigorilla Pro (STM32F103ZET6)
|
||||
#define BOARD_FLY_MINI 4046 // FLYmaker FLY MINI (STM32F103RCT6)
|
||||
#define BOARD_FLSUN_HISPEED 4047 // FLSUN HiSpeedV1 (STM32F103VET6)
|
||||
#define BOARD_BEAST 4048 // STM32F103RET6 Libmaple-based controller
|
||||
#define BOARD_MINGDA_MPX_ARM_MINI 4049 // STM32F103ZET6 Mingda MD-16
|
||||
#define BOARD_GTM32_PRO_VD 4050 // STM32F103VET6 controller
|
||||
|
||||
//
|
||||
// ARM Cortex-M4F
|
||||
|
||||
@@ -70,7 +70,8 @@ void GcodeSuite::G29() {
|
||||
return;
|
||||
}
|
||||
|
||||
int8_t ix, iy = 0;
|
||||
int8_t ix, iy;
|
||||
ix = iy = 0;
|
||||
|
||||
switch (state) {
|
||||
case MeshReport:
|
||||
|
||||
@@ -83,12 +83,13 @@ void plan_arc(
|
||||
#endif
|
||||
|
||||
// Angle of rotation between position and target from the circle center.
|
||||
float angular_travel;
|
||||
float angular_travel, abs_angular_travel;
|
||||
|
||||
// Do a full circle if starting and ending positions are "identical"
|
||||
if (NEAR(current_position[p_axis], cart[p_axis]) && NEAR(current_position[q_axis], cart[q_axis])) {
|
||||
// Preserve direction for circles
|
||||
angular_travel = clockwise ? -RADIANS(360) : RADIANS(360);
|
||||
abs_angular_travel = RADIANS(360);
|
||||
}
|
||||
else {
|
||||
// Calculate the angle
|
||||
@@ -103,8 +104,10 @@ void plan_arc(
|
||||
case 2: angular_travel += RADIANS(360); break; // Negative but CCW? Reverse direction.
|
||||
}
|
||||
|
||||
abs_angular_travel = ABS(angular_travel);
|
||||
|
||||
#ifdef MIN_ARC_SEGMENTS
|
||||
min_segments = CEIL(min_segments * ABS(angular_travel) / RADIANS(360));
|
||||
min_segments = CEIL(min_segments * abs_angular_travel / RADIANS(360));
|
||||
NOLESS(min_segments, 1U);
|
||||
#endif
|
||||
}
|
||||
@@ -117,8 +120,8 @@ void plan_arc(
|
||||
#endif
|
||||
|
||||
// If circling around...
|
||||
if (ENABLED(ARC_P_CIRCLES) && circles) {
|
||||
const float total_angular = angular_travel + circles * RADIANS(360), // Total rotation with all circles and remainder
|
||||
if (TERN0(ARC_P_CIRCLES, circles)) {
|
||||
const float total_angular = abs_angular_travel + circles * RADIANS(360), // Total rotation with all circles and remainder
|
||||
part_per_circle = RADIANS(360) / total_angular; // Each circle's part of the total
|
||||
|
||||
#if HAS_Z_AXIS
|
||||
@@ -138,8 +141,8 @@ void plan_arc(
|
||||
TERN_(HAS_EXTRUDERS, extruder_travel = cart.e - current_position.e);
|
||||
}
|
||||
|
||||
const float flat_mm = radius * angular_travel,
|
||||
mm_of_travel = TERN_(HAS_Z_AXIS, linear_travel ? HYPOT(flat_mm, linear_travel) :) ABS(flat_mm);
|
||||
const float flat_mm = radius * abs_angular_travel,
|
||||
mm_of_travel = TERN_(HAS_Z_AXIS, linear_travel ? HYPOT(flat_mm, linear_travel) :) flat_mm;
|
||||
if (mm_of_travel < 0.001f) return;
|
||||
|
||||
const feedRate_t scaled_fr_mm_s = MMS_SCALED(feedrate_mm_s);
|
||||
|
||||
@@ -623,7 +623,7 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
|
||||
static_assert(_test_btc_sample_start != 12.3f, "BTC_SAMPLE_START must be a whole number.");
|
||||
#endif
|
||||
#ifdef BTC_SAMPLE_RES
|
||||
constexpr _btc_sample_res = BTC_SAMPLE_RES;
|
||||
constexpr auto _btc_sample_res = BTC_SAMPLE_RES;
|
||||
constexpr decltype(_btc_sample_res) _test_btc_sample_res = 12.3f;
|
||||
static_assert(_test_btc_sample_res != 12.3f, "BTC_SAMPLE_RES must be a whole number.");
|
||||
#endif
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
* version was tagged.
|
||||
*/
|
||||
#ifndef STRING_DISTRIBUTION_DATE
|
||||
#define STRING_DISTRIBUTION_DATE "2021-07-19"
|
||||
#define STRING_DISTRIBUTION_DATE "2021-07-21"
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@@ -264,29 +264,33 @@ FORCE_INLINE void _draw_centered_temp(const celsius_t temp, const uint8_t tx, co
|
||||
#define HOTEND_BITMAP(N,S) status_hotend_a_bmp
|
||||
#endif
|
||||
|
||||
if (PAGE_CONTAINS(STATUS_HEATERS_Y, STATUS_HEATERS_BOT)) {
|
||||
#if DISABLED(STATUS_COMBINE_HEATERS)
|
||||
|
||||
#define BAR_TALL (STATUS_HEATERS_HEIGHT - 2)
|
||||
if (PAGE_CONTAINS(STATUS_HEATERS_Y, STATUS_HEATERS_BOT)) {
|
||||
|
||||
const float prop = target - 20,
|
||||
perc = prop > 0 && temp >= 20 ? (temp - 20) / prop : 0;
|
||||
uint8_t tall = uint8_t(perc * BAR_TALL + 0.5f);
|
||||
NOMORE(tall, BAR_TALL);
|
||||
#define BAR_TALL (STATUS_HEATERS_HEIGHT - 2)
|
||||
|
||||
// Draw hotend bitmap, either whole or split by the heating percent
|
||||
const uint8_t hx = STATUS_HOTEND_X(heater_id),
|
||||
bw = STATUS_HOTEND_BYTEWIDTH(heater_id);
|
||||
#if ENABLED(STATUS_HEAT_PERCENT)
|
||||
if (isHeat && tall <= BAR_TALL) {
|
||||
const uint8_t ph = STATUS_HEATERS_HEIGHT - 1 - tall;
|
||||
u8g.drawBitmapP(hx, STATUS_HEATERS_Y, bw, ph, HOTEND_BITMAP(TERN(HAS_MMU, active_extruder, heater_id), false));
|
||||
u8g.drawBitmapP(hx, STATUS_HEATERS_Y + ph, bw, tall + 1, HOTEND_BITMAP(TERN(HAS_MMU, active_extruder, heater_id), true) + ph * bw);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
u8g.drawBitmapP(hx, STATUS_HEATERS_Y, bw, STATUS_HEATERS_HEIGHT, HOTEND_BITMAP(TERN(HAS_MMU, active_extruder, heater_id), isHeat));
|
||||
const float prop = target - 20,
|
||||
perc = prop > 0 && temp >= 20 ? (temp - 20) / prop : 0;
|
||||
uint8_t tall = uint8_t(perc * BAR_TALL + 0.5f);
|
||||
NOMORE(tall, BAR_TALL);
|
||||
|
||||
} // PAGE_CONTAINS
|
||||
// Draw hotend bitmap, either whole or split by the heating percent
|
||||
const uint8_t hx = STATUS_HOTEND_X(heater_id),
|
||||
bw = STATUS_HOTEND_BYTEWIDTH(heater_id);
|
||||
#if ENABLED(STATUS_HEAT_PERCENT)
|
||||
if (isHeat && tall <= BAR_TALL) {
|
||||
const uint8_t ph = STATUS_HEATERS_HEIGHT - 1 - tall;
|
||||
u8g.drawBitmapP(hx, STATUS_HEATERS_Y, bw, ph, HOTEND_BITMAP(TERN(HAS_MMU, active_extruder, heater_id), false));
|
||||
u8g.drawBitmapP(hx, STATUS_HEATERS_Y + ph, bw, tall + 1, HOTEND_BITMAP(TERN(HAS_MMU, active_extruder, heater_id), true) + ph * bw);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
u8g.drawBitmapP(hx, STATUS_HEATERS_Y, bw, STATUS_HEATERS_HEIGHT, HOTEND_BITMAP(TERN(HAS_MMU, active_extruder, heater_id), isHeat));
|
||||
|
||||
} // PAGE_CONTAINS
|
||||
|
||||
#endif // !STATUS_COMBINE_HEATERS
|
||||
|
||||
if (PAGE_UNDER(7)) {
|
||||
#if HEATER_IDLE_HANDLER
|
||||
|
||||
@@ -39,7 +39,7 @@ enum {
|
||||
};
|
||||
|
||||
#if ENABLED(MKS_TEST)
|
||||
extern uint8_t curent_disp_ui;
|
||||
extern uint8_t current_disp_ui;
|
||||
#endif
|
||||
|
||||
static void event_handler(lv_obj_t *obj, lv_event_t event) {
|
||||
@@ -49,7 +49,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
|
||||
case ID_T_USB_DISK: card.changeMedia(&card.media_driver_usbFlash); break;
|
||||
case ID_T_SD_DISK: card.changeMedia(&card.media_driver_sdcard); break;
|
||||
case ID_T_RETURN:
|
||||
TERN_(MKS_TEST, curent_disp_ui = 1);
|
||||
TERN_(MKS_TEST, current_disp_ui = 1);
|
||||
lv_draw_ready_print();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ static lv_obj_t *buttonExt1, *labelExt1, *buttonFanstate, *labelFan;
|
||||
#endif
|
||||
|
||||
#if ENABLED(MKS_TEST)
|
||||
uint8_t curent_disp_ui = 0;
|
||||
uint8_t current_disp_ui = 0;
|
||||
#endif
|
||||
|
||||
enum { ID_TOOL = 1, ID_SET, ID_PRINT, ID_INFO_EXT, ID_INFO_BED, ID_INFO_FAN };
|
||||
@@ -106,8 +106,10 @@ void disp_det_error() {
|
||||
lv_obj_t *e1, *e2, *e3, *bed;
|
||||
void mks_disp_test() {
|
||||
char buf[30] = {0};
|
||||
sprintf_P(buf, PSTR("e1:%d"), thermalManager.wholeDegHotend(0));
|
||||
lv_label_set_text(e1, buf);
|
||||
#if HAS_HOTEND
|
||||
sprintf_P(buf, PSTR("e1:%d"), thermalManager.wholeDegHotend(0));
|
||||
lv_label_set_text(e1, buf);
|
||||
#endif
|
||||
#if HAS_MULTI_HOTEND
|
||||
sprintf_P(buf, PSTR("e2:%d"), thermalManager.wholeDegHotend(1));
|
||||
lv_label_set_text(e2, buf);
|
||||
@@ -126,7 +128,7 @@ void lv_draw_ready_print() {
|
||||
ZERO(disp_state_stack._disp_state);
|
||||
scr = lv_screen_create(PRINT_READY_UI, "");
|
||||
|
||||
if (TERN0(SDSUPPORT, mks_test_flag == 0x1E)) {
|
||||
if (mks_test_flag == 0x1E) {
|
||||
// Create image buttons
|
||||
buttonTool = lv_imgbtn_create(scr, "F:/bmp_tool.bin", event_handler, ID_TOOL);
|
||||
|
||||
@@ -147,7 +149,7 @@ void lv_draw_ready_print() {
|
||||
#if HAS_MULTI_HOTEND
|
||||
e2 = lv_label_create_empty(scr);
|
||||
lv_obj_set_pos(e2, 20, 45);
|
||||
sprintf_P(buf, PSTR("e1: %d"), thermalManager.wholeDegHotend(1));
|
||||
sprintf_P(buf, PSTR("e2: %d"), thermalManager.wholeDegHotend(1));
|
||||
lv_label_set_text(e2, buf);
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
|
||||
@@ -45,7 +45,7 @@ enum {
|
||||
};
|
||||
|
||||
#if ENABLED(MKS_TEST)
|
||||
extern uint8_t curent_disp_ui;
|
||||
extern uint8_t current_disp_ui;
|
||||
#endif
|
||||
|
||||
static void event_handler(lv_obj_t *obj, lv_event_t event) {
|
||||
@@ -75,7 +75,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
|
||||
lv_draw_more();
|
||||
break;
|
||||
case ID_T_RETURN:
|
||||
TERN_(MKS_TEST, curent_disp_ui = 1);
|
||||
TERN_(MKS_TEST, current_disp_ui = 1);
|
||||
lv_draw_ready_print();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,10 @@
|
||||
static lv_obj_t *scr;
|
||||
static lv_obj_t *status_label;
|
||||
|
||||
#if ENABLED(MKS_TEST)
|
||||
extern uint8_t current_disp_ui;
|
||||
#endif
|
||||
|
||||
static void event_handler(lv_obj_t *obj, lv_event_t event);
|
||||
|
||||
enum {
|
||||
@@ -93,7 +97,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
|
||||
if (event != LV_EVENT_RELEASED) return;
|
||||
switch (obj->mks_obj_id) {
|
||||
case ID_TC_RETURN:
|
||||
TERN_(MKS_TEST, curent_disp_ui = 1);
|
||||
TERN_(MKS_TEST, current_disp_ui = 1);
|
||||
lv_clear_touch_calibration_screen();
|
||||
draw_return_ui();
|
||||
break;
|
||||
|
||||
@@ -38,12 +38,44 @@
|
||||
#if ENABLED(MKS_TEST)
|
||||
|
||||
#include "mks_hardware.h"
|
||||
#include "../../../module/endstops.h"
|
||||
|
||||
bool pw_det_sta, pw_off_sta, mt_det_sta;
|
||||
#if PIN_EXISTS(MT_DET_2)
|
||||
bool mt_det2_sta;
|
||||
#endif
|
||||
bool endstopx1_sta, endstopx2_sta, endstopy1_sta, endstopy2_sta, endstopz1_sta, endstopz2_sta;
|
||||
#if HAS_X_MIN || HAS_X_MAX
|
||||
bool endstopx1_sta;
|
||||
#else
|
||||
constexpr static bool endstopx1_sta = true;
|
||||
#endif
|
||||
#if HAS_X2_MIN || HAS_X2_MAX
|
||||
bool endstopx2_sta;
|
||||
#else
|
||||
constexpr static bool endstopx2_sta = true;
|
||||
#endif
|
||||
#if HAS_Y_MIN || HAS_Y_MAX
|
||||
bool endstopy1_sta;
|
||||
#else
|
||||
constexpr static bool endstopy1_sta = true;
|
||||
#endif
|
||||
#if HAS_Y2_MIN || HAS_Y2_MAX
|
||||
bool endstopy2_sta;
|
||||
#else
|
||||
constexpr static bool endstopy2_sta = true;
|
||||
#endif
|
||||
#if HAS_Z_MIN || HAS_Z_MAX
|
||||
bool endstopz1_sta;
|
||||
#else
|
||||
constexpr static bool endstopz1_sta = true;
|
||||
#endif
|
||||
#if HAS_Z2_MIN || HAS_Z2_MAX
|
||||
bool endstopz2_sta;
|
||||
#else
|
||||
constexpr static bool endstopz2_sta = true;
|
||||
#endif
|
||||
|
||||
#define ESTATE(S) (READ(S##_PIN) != S##_ENDSTOP_INVERTING)
|
||||
|
||||
void test_gpio_readlevel_L() {
|
||||
WRITE(WIFI_IO0_PIN, HIGH);
|
||||
@@ -54,10 +86,36 @@
|
||||
#if PIN_EXISTS(MT_DET_2)
|
||||
mt_det2_sta = (READ(MT_DET_2_PIN) == LOW);
|
||||
#endif
|
||||
endstopx1_sta = (READ(X_MIN_PIN) == LOW);
|
||||
endstopy1_sta = (READ(Y_MIN_PIN) == LOW);
|
||||
endstopz1_sta = (READ(Z_MIN_PIN) == LOW);
|
||||
endstopz2_sta = (READ(Z_MAX_PIN) == LOW);
|
||||
#if HAS_X_MIN
|
||||
endstopx1_sta = ESTATE(X_MIN);
|
||||
#elif HAS_X_MAX
|
||||
endstopx1_sta = ESTATE(X_MAX);
|
||||
#endif
|
||||
#if HAS_X2_MIN
|
||||
endstopx2_sta = ESTATE(X2_MIN);
|
||||
#elif HAS_X2_MAX
|
||||
endstopx2_sta = ESTATE(X2_MAX);
|
||||
#endif
|
||||
#if HAS_Y_MIN
|
||||
endstopy1_sta = ESTATE(Y_MIN);
|
||||
#elif HAS_Y_MAX
|
||||
endstopy1_sta = ESTATE(Y_MAX);
|
||||
#endif
|
||||
#if HAS_Y2_MIN
|
||||
endstopy2_sta = ESTATE(Y2_MIN);
|
||||
#elif HAS_Y2_MAX
|
||||
endstopy2_sta = ESTATE(Y2_MAX);
|
||||
#endif
|
||||
#if HAS_Z_MIN
|
||||
endstopz1_sta = ESTATE(Z_MIN);
|
||||
#elif HAS_Z_MAX
|
||||
endstopz1_sta = ESTATE(Z_MAX);
|
||||
#endif
|
||||
#if HAS_Z2_MIN
|
||||
endstopz2_sta = ESTATE(Z2_MIN);
|
||||
#elif HAS_Z2_MAX
|
||||
endstopz2_sta = ESTATE(Z2_MAX);
|
||||
#endif
|
||||
}
|
||||
|
||||
void test_gpio_readlevel_H() {
|
||||
@@ -69,44 +127,66 @@
|
||||
#if PIN_EXISTS(MT_DET_2)
|
||||
mt_det2_sta = (READ(MT_DET_2_PIN) == HIGH);
|
||||
#endif
|
||||
endstopx1_sta = (READ(X_MIN_PIN) == HIGH);
|
||||
endstopy1_sta = (READ(Y_MIN_PIN) == HIGH);
|
||||
endstopz1_sta = (READ(Z_MIN_PIN) == HIGH);
|
||||
endstopz2_sta = (READ(Z_MAX_PIN) == HIGH);
|
||||
#if HAS_X_MIN
|
||||
endstopx1_sta = !ESTATE(X_MIN);
|
||||
#elif HAS_X_MAX
|
||||
endstopx1_sta = !ESTATE(X_MAX);
|
||||
#endif
|
||||
#if HAS_X2_MIN
|
||||
endstopx2_sta = !ESTATE(X2_MIN);
|
||||
#elif HAS_X2_MAX
|
||||
endstopx2_sta = !ESTATE(X2_MAX);
|
||||
#endif
|
||||
#if HAS_Y_MIN
|
||||
endstopy1_sta = !ESTATE(Y_MIN);
|
||||
#elif HAS_Y_MAX
|
||||
endstopy1_sta = !ESTATE(Y_MAX);
|
||||
#endif
|
||||
#if HAS_Y2_MIN
|
||||
endstopy2_sta = !ESTATE(Y2_MIN);
|
||||
#elif HAS_Y2_MAX
|
||||
endstopy2_sta = !ESTATE(Y2_MAX);
|
||||
#endif
|
||||
#if HAS_Z_MIN
|
||||
endstopz1_sta = !ESTATE(Z_MIN);
|
||||
#elif HAS_Z_MAX
|
||||
endstopz1_sta = !ESTATE(Z_MAX);
|
||||
#endif
|
||||
#if HAS_Z2_MIN
|
||||
endstopz2_sta = !ESTATE(Z2_MIN);
|
||||
#elif HAS_Z2_MAX
|
||||
endstopz2_sta = !ESTATE(Z2_MAX);
|
||||
#endif
|
||||
}
|
||||
|
||||
void init_test_gpio() {
|
||||
SET_INPUT_PULLUP(X_MIN_PIN);
|
||||
SET_INPUT_PULLUP(Y_MIN_PIN);
|
||||
SET_INPUT_PULLUP(Z_MIN_PIN);
|
||||
SET_INPUT_PULLUP(Z_MAX_PIN);
|
||||
endstops.init();
|
||||
|
||||
SET_OUTPUT(WIFI_IO0_PIN);
|
||||
|
||||
SET_INPUT_PULLUP(MT_DET_1_PIN);
|
||||
#if PIN_EXISTS(MT_DET_1)
|
||||
SET_INPUT_PULLUP(MT_DET_1_PIN);
|
||||
#endif
|
||||
#if PIN_EXISTS(MT_DET_2)
|
||||
SET_INPUT_PULLUP(MT_DET_2_PIN);
|
||||
#endif
|
||||
|
||||
SET_INPUT_PULLUP(MKS_TEST_POWER_LOSS_PIN);
|
||||
SET_INPUT_PULLUP(MKS_TEST_PS_ON_PIN);
|
||||
|
||||
SET_INPUT_PULLUP(SERVO0_PIN);
|
||||
|
||||
SET_OUTPUT(X_ENABLE_PIN);
|
||||
SET_OUTPUT(Y_ENABLE_PIN);
|
||||
SET_OUTPUT(Z_ENABLE_PIN);
|
||||
SET_OUTPUT(E0_ENABLE_PIN);
|
||||
#if DISABLED(MKS_HARDWARE_TEST_ONLY_E0)
|
||||
SET_OUTPUT(E1_ENABLE_PIN);
|
||||
OUT_WRITE(X_ENABLE_PIN, LOW);
|
||||
#if HAS_Y_AXIS
|
||||
OUT_WRITE(Y_ENABLE_PIN, LOW);
|
||||
#endif
|
||||
|
||||
WRITE(X_ENABLE_PIN, LOW);
|
||||
WRITE(Y_ENABLE_PIN, LOW);
|
||||
WRITE(Z_ENABLE_PIN, LOW);
|
||||
WRITE(E0_ENABLE_PIN, LOW);
|
||||
#if DISABLED(MKS_HARDWARE_TEST_ONLY_E0)
|
||||
WRITE(E1_ENABLE_PIN, LOW);
|
||||
#if HAS_Z_AXIS
|
||||
OUT_WRITE(Z_ENABLE_PIN, LOW);
|
||||
#endif
|
||||
#if HAS_EXTRUDERS
|
||||
OUT_WRITE(E0_ENABLE_PIN, LOW);
|
||||
#endif
|
||||
#if HAS_MULTI_EXTRUDER && DISABLED(MKS_HARDWARE_TEST_ONLY_E0)
|
||||
OUT_WRITE(E1_ENABLE_PIN, LOW);
|
||||
#endif
|
||||
|
||||
#if ENABLED(MKS_HARDWARE_TEST_ONLY_E0)
|
||||
@@ -127,77 +207,101 @@
|
||||
delay(100);
|
||||
}
|
||||
|
||||
void mks_gpio_test() {
|
||||
init_test_gpio();
|
||||
#if ENABLED(SDSUPPORT)
|
||||
|
||||
test_gpio_readlevel_L();
|
||||
test_gpio_readlevel_H();
|
||||
test_gpio_readlevel_L();
|
||||
if (pw_det_sta && pw_off_sta && mt_det_sta
|
||||
#if PIN_EXISTS(MT_DET_2)
|
||||
&& mt_det2_sta
|
||||
#endif
|
||||
#if ENABLED(MKS_HARDWARE_TEST_ONLY_E0)
|
||||
&& (READ(PA1) == LOW)
|
||||
&& (READ(PA3) == LOW)
|
||||
&& (READ(PC2) == LOW)
|
||||
&& (READ(PD8) == LOW)
|
||||
&& (READ(PE5) == LOW)
|
||||
&& (READ(PE6) == LOW)
|
||||
&& (READ(PE7) == LOW)
|
||||
#endif
|
||||
)
|
||||
disp_det_ok();
|
||||
else
|
||||
disp_det_error();
|
||||
void mks_gpio_test() {
|
||||
init_test_gpio();
|
||||
|
||||
if (endstopx1_sta && endstopy1_sta && endstopz1_sta && endstopz2_sta)
|
||||
disp_Limit_ok();
|
||||
else
|
||||
disp_Limit_error();
|
||||
}
|
||||
test_gpio_readlevel_L();
|
||||
test_gpio_readlevel_H();
|
||||
test_gpio_readlevel_L();
|
||||
if (pw_det_sta && pw_off_sta && mt_det_sta
|
||||
#if PIN_EXISTS(MT_DET_2)
|
||||
&& mt_det2_sta
|
||||
#endif
|
||||
#if ENABLED(MKS_HARDWARE_TEST_ONLY_E0)
|
||||
&& (READ(PA1) == LOW)
|
||||
&& (READ(PA3) == LOW)
|
||||
&& (READ(PC2) == LOW)
|
||||
&& (READ(PD8) == LOW)
|
||||
&& (READ(PE5) == LOW)
|
||||
&& (READ(PE6) == LOW)
|
||||
&& (READ(PE7) == LOW)
|
||||
#endif
|
||||
)
|
||||
disp_det_ok();
|
||||
else
|
||||
disp_det_error();
|
||||
|
||||
void mks_hardware_test() {
|
||||
if (millis() % 2000 < 1000) {
|
||||
WRITE(X_DIR_PIN, LOW);
|
||||
WRITE(Y_DIR_PIN, LOW);
|
||||
WRITE(Z_DIR_PIN, LOW);
|
||||
WRITE(E0_DIR_PIN, LOW);
|
||||
#if DISABLED(MKS_HARDWARE_TEST_ONLY_E0)
|
||||
WRITE(E1_DIR_PIN, LOW);
|
||||
#endif
|
||||
thermalManager.fan_speed[0] = 255;
|
||||
#if DISABLED(MKS_HARDWARE_TEST_ONLY_E0)
|
||||
WRITE(HEATER_1_PIN, HIGH); // HE1
|
||||
#endif
|
||||
WRITE(HEATER_0_PIN, HIGH); // HE0
|
||||
WRITE(HEATER_BED_PIN, HIGH); // HOT-BED
|
||||
}
|
||||
else {
|
||||
WRITE(X_DIR_PIN, HIGH);
|
||||
WRITE(Y_DIR_PIN, HIGH);
|
||||
WRITE(Z_DIR_PIN, HIGH);
|
||||
WRITE(E0_DIR_PIN, HIGH);
|
||||
#if DISABLED(MKS_HARDWARE_TEST_ONLY_E0)
|
||||
WRITE(E1_DIR_PIN, HIGH);
|
||||
#endif
|
||||
thermalManager.fan_speed[0] = 0;
|
||||
#if DISABLED(MKS_HARDWARE_TEST_ONLY_E0)
|
||||
WRITE(HEATER_1_PIN, LOW); // HE1
|
||||
#endif
|
||||
WRITE(HEATER_0_PIN, LOW); // HE0
|
||||
WRITE(HEATER_BED_PIN, LOW); // HOT-BED
|
||||
if (endstopx1_sta && endstopy1_sta && endstopz1_sta && endstopz2_sta)
|
||||
disp_Limit_ok();
|
||||
else
|
||||
disp_Limit_error();
|
||||
}
|
||||
|
||||
if (endstopx1_sta && endstopx2_sta && endstopy1_sta && endstopy2_sta && endstopz1_sta && endstopz2_sta) {
|
||||
// nothing here
|
||||
}
|
||||
else {
|
||||
void mks_hardware_test() {
|
||||
if (millis() % 2000 < 1000) {
|
||||
thermalManager.fan_speed[0] = 255;
|
||||
WRITE(X_DIR_PIN, LOW);
|
||||
#if HAS_Y_AXIS
|
||||
WRITE(Y_DIR_PIN, LOW);
|
||||
#endif
|
||||
#if HAS_Z_AXIS
|
||||
WRITE(Z_DIR_PIN, LOW);
|
||||
#endif
|
||||
#if HAS_EXTRUDERS
|
||||
WRITE(E0_DIR_PIN, LOW);
|
||||
#endif
|
||||
#if HAS_MULTI_EXTRUDER && DISABLED(MKS_HARDWARE_TEST_ONLY_E0)
|
||||
WRITE(E1_DIR_PIN, LOW);
|
||||
#endif
|
||||
#if HAS_MULTI_HOTEND && DISABLED(MKS_HARDWARE_TEST_ONLY_E0)
|
||||
WRITE(HEATER_1_PIN, HIGH); // HE1
|
||||
#endif
|
||||
#if HAS_HOTEND
|
||||
WRITE(HEATER_0_PIN, HIGH); // HE0
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
WRITE(HEATER_BED_PIN, HIGH); // HOT-BED
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
thermalManager.fan_speed[0] = 0;
|
||||
WRITE(X_DIR_PIN, HIGH);
|
||||
#if HAS_Y_AXIS
|
||||
WRITE(Y_DIR_PIN, HIGH);
|
||||
#endif
|
||||
#if HAS_Y_AXIS
|
||||
WRITE(Z_DIR_PIN, HIGH);
|
||||
#endif
|
||||
#if HAS_EXTRUDERS
|
||||
WRITE(E0_DIR_PIN, HIGH);
|
||||
#endif
|
||||
#if HAS_MULTI_EXTRUDER && DISABLED(MKS_HARDWARE_TEST_ONLY_E0)
|
||||
WRITE(E1_DIR_PIN, HIGH);
|
||||
#endif
|
||||
#if HAS_MULTI_HOTEND && DISABLED(MKS_HARDWARE_TEST_ONLY_E0)
|
||||
WRITE(HEATER_1_PIN, LOW); // HE1
|
||||
#endif
|
||||
#if HAS_HOTEND
|
||||
WRITE(HEATER_0_PIN, LOW); // HE0
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
WRITE(HEATER_BED_PIN, LOW); // HOT-BED
|
||||
#endif
|
||||
}
|
||||
|
||||
if (endstopx1_sta && endstopx2_sta && endstopy1_sta && endstopy2_sta && endstopz1_sta && endstopz2_sta) {
|
||||
// nothing here
|
||||
}
|
||||
else {
|
||||
}
|
||||
|
||||
if (disp_state == PRINT_READY_UI)
|
||||
mks_disp_test();
|
||||
}
|
||||
|
||||
if (disp_state == PRINT_READY_UI)
|
||||
mks_disp_test();
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // MKS_TEST
|
||||
|
||||
@@ -613,7 +717,7 @@ void disp_assets_update_progress(const char *msg) {
|
||||
disp_string(100, 165, buf, 0xFFFF, 0x0000);
|
||||
}
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
#if BOTH(MKS_TEST, SDSUPPORT)
|
||||
uint8_t mks_test_flag = 0;
|
||||
const char *MKSTestPath = "MKS_TEST";
|
||||
void mks_test_get() {
|
||||
|
||||
@@ -26,17 +26,16 @@
|
||||
#include <lvgl.h>
|
||||
|
||||
// Functions for MKS_TEST
|
||||
#if ENABLED(MKS_TEST)
|
||||
void mks_gpio_test();
|
||||
#if BOTH(MKS_TEST, SDSUPPORT)
|
||||
void mks_hardware_test();
|
||||
void mks_test_get();
|
||||
void mks_gpio_test();
|
||||
extern uint8_t mks_test_flag;
|
||||
#else
|
||||
#define mks_test_flag 0
|
||||
#endif
|
||||
|
||||
// String display and assets
|
||||
void disp_string(uint16_t x, uint16_t y, const char * string, uint16_t charColor, uint16_t bkColor);
|
||||
void disp_assets_update();
|
||||
void disp_assets_update_progress(const char *msg);
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
extern uint8_t mks_test_flag;
|
||||
#endif
|
||||
|
||||
@@ -139,7 +139,7 @@ void tft_lvgl_init() {
|
||||
#if ENABLED(SDSUPPORT)
|
||||
UpdateAssets();
|
||||
watchdog_refresh(); // LVGL init takes time
|
||||
mks_test_get();
|
||||
TERN_(MKS_TEST, mks_test_get());
|
||||
#endif
|
||||
|
||||
touch.Init();
|
||||
|
||||
@@ -104,9 +104,9 @@ matrix_3x3 matrix_3x3::create_from_rows(const vector_3 &row_0, const vector_3 &r
|
||||
//row_1.debug(PSTR("row_1"));
|
||||
//row_2.debug(PSTR("row_2"));
|
||||
matrix_3x3 new_matrix;
|
||||
new_matrix.vectors[0].x = row_0.x; new_matrix.vectors[1].y = row_0.y; new_matrix.vectors[2].z = row_0.z;
|
||||
new_matrix.vectors[3].x = row_1.x; new_matrix.vectors[4].y = row_1.y; new_matrix.vectors[5].z = row_1.z;
|
||||
new_matrix.vectors[6].x = row_2.x; new_matrix.vectors[7].y = row_2.y; new_matrix.vectors[8].z = row_2.z;
|
||||
new_matrix.vectors[0] = row_0;
|
||||
new_matrix.vectors[1] = row_1;
|
||||
new_matrix.vectors[2] = row_2;
|
||||
//new_matrix.debug(PSTR("new_matrix"));
|
||||
return new_matrix;
|
||||
}
|
||||
|
||||
@@ -865,9 +865,11 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai
|
||||
#if HAS_CURRENT_HOME(Z)
|
||||
static int16_t saved_current_Z;
|
||||
#endif
|
||||
auto debug_current_on = [](PGM_P const s, const int16_t a, const int16_t b) {
|
||||
if (DEBUGGING(LEVELING)) { DEBUG_ECHOPGM_P(s); DEBUG_ECHOLNPAIR(" current: ", a, " -> ", b); }
|
||||
};
|
||||
#if ((ENABLED(DELTA) && (HAS_CURRENT_HOME(X) || HAS_CURRENT_HOME(Y))) || HAS_CURRENT_HOME(Z))
|
||||
auto debug_current_on = [](PGM_P const s, const int16_t a, const int16_t b) {
|
||||
if (DEBUGGING(LEVELING)) { DEBUG_ECHOPGM_P(s); DEBUG_ECHOLNPAIR(" current: ", a, " -> ", b); }
|
||||
};
|
||||
#endif
|
||||
if (onoff) {
|
||||
#if ENABLED(DELTA)
|
||||
#if HAS_CURRENT_HOME(X)
|
||||
|
||||
@@ -537,6 +537,8 @@
|
||||
#include "stm32f1/pins_CHITU3D_V5.h" // STM32F1 env:chitu_f103 env:chitu_f103_maple env:chitu_v5_gpio_init env:chitu_v5_gpio_init_maple
|
||||
#elif MB(CHITU3D_V6)
|
||||
#include "stm32f1/pins_CHITU3D_V6.h" // STM32F1 env:chitu_f103 env:chitu_f103_maple
|
||||
#elif MB(CHITU3D_V9)
|
||||
#include "stm32f1/pins_CHITU3D_V9.h" // STM32F1 env:chitu_f103 env:chitu_f103_maple
|
||||
#elif MB(CREALITY_V4)
|
||||
#include "stm32f1/pins_CREALITY_V4.h" // STM32F1 env:STM32F103RET6_creality env:STM32F103RET6_creality_maple
|
||||
#elif MB(CREALITY_V4210)
|
||||
|
||||
@@ -81,12 +81,7 @@
|
||||
// Heaters / Fans
|
||||
//
|
||||
#define HEATER_0_PIN PD12 // HOT-END
|
||||
#define HEATER_1_PIN -1
|
||||
#define HEATER_2_PIN -1
|
||||
|
||||
#define HEATER_BED_PIN PG11 // HOT-BED
|
||||
#define HEATER_BED2_PIN -1 // BED2
|
||||
#define HEATER_BED3_PIN -1 // BED3
|
||||
|
||||
#ifndef FAN_PIN
|
||||
#define FAN_PIN PG14 // MAIN BOARD FAN
|
||||
@@ -97,8 +92,8 @@
|
||||
//
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_BED_PIN PA0 // Analog Input
|
||||
#define TEMP_0_PIN PA1 // Analog Input
|
||||
#define TEMP_BED_PIN PA0 // Analog Input
|
||||
|
||||
//
|
||||
// LCD Pins
|
||||
|
||||
@@ -21,148 +21,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "env_validate.h"
|
||||
#define BOARD_INFO_NAME "Chitu3D V5"
|
||||
|
||||
/**
|
||||
* 2017 Victor Perez Marlin for stm32f1 test
|
||||
*/
|
||||
#define Z_STOP_PIN PG9
|
||||
|
||||
#define BOARD_INFO_NAME "Chitu3D V5"
|
||||
#define DEFAULT_MACHINE_NAME "STM32F103ZET6"
|
||||
|
||||
#define BOARD_NO_NATIVE_USB
|
||||
|
||||
#define DISABLE_JTAG
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
#if ENABLED(FLASH_EEPROM_EMULATION)
|
||||
// SoC Flash (framework-arduinoststm32-maple/STM32F1/libraries/EEPROM/EEPROM.h)
|
||||
#define EEPROM_START_ADDRESS (0x8000000UL + (512 * 1024) - 2 * EEPROM_PAGE_SIZE)
|
||||
#define EEPROM_PAGE_SIZE (0x800U) // 2KB, but will use 2x more (4KB)
|
||||
#define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE
|
||||
#else
|
||||
#define MARLIN_EEPROM_SIZE 0x800U // On SD, Limit to 2KB, require this amount of RAM
|
||||
#endif
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#define X_STOP_PIN PG10
|
||||
#define Y_STOP_PIN PA12
|
||||
#define Z_STOP_PIN PA14
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_ENABLE_PIN PC13
|
||||
#define X_STEP_PIN PE5
|
||||
#define X_DIR_PIN PE6
|
||||
|
||||
#define Y_ENABLE_PIN PE4
|
||||
#define Y_STEP_PIN PE2
|
||||
#define Y_DIR_PIN PE3
|
||||
|
||||
#define Z_ENABLE_PIN PE1
|
||||
#define Z_STEP_PIN PB9
|
||||
#define Z_DIR_PIN PE0
|
||||
|
||||
#define E0_ENABLE_PIN PB8
|
||||
#define E0_STEP_PIN PB4
|
||||
#define E0_DIR_PIN PB5
|
||||
|
||||
#define E1_ENABLE_PIN PG8
|
||||
#define E1_STEP_PIN PC7
|
||||
#define E1_DIR_PIN PC6
|
||||
|
||||
//
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_0_PIN PA1 // TH1
|
||||
#define TEMP_BED_PIN PA0 // TB1
|
||||
|
||||
//
|
||||
// Heaters
|
||||
//
|
||||
#define HEATER_0_PIN PG12 // HEATER1
|
||||
#define HEATER_BED_PIN PG11 // HOT BED
|
||||
|
||||
//
|
||||
// Fans
|
||||
//
|
||||
#define CONTROLLER_FAN_PIN PD6 // BOARD FAN
|
||||
#define FAN_PIN PG13 // FAN
|
||||
#define FAN2_PIN PG14
|
||||
|
||||
//
|
||||
// Misc
|
||||
//
|
||||
#define BEEPER_PIN PB0
|
||||
//#define LED_PIN -1
|
||||
//#define POWER_LOSS_PIN -1
|
||||
#define FIL_RUNOUT_PIN PA15
|
||||
|
||||
// SPI Flash
|
||||
#define HAS_SPI_FLASH 1
|
||||
#if HAS_SPI_FLASH
|
||||
#define SPI_FLASH_SIZE 0x200000 // 2MB
|
||||
#endif
|
||||
|
||||
// SPI 2
|
||||
#define W25QXX_CS_PIN PB12
|
||||
#define W25QXX_MOSI_PIN PB15
|
||||
#define W25QXX_MISO_PIN PB14
|
||||
#define W25QXX_SCK_PIN PB13
|
||||
|
||||
//
|
||||
// TFT with FSMC interface
|
||||
//
|
||||
#if HAS_FSMC_TFT
|
||||
#define TOUCH_CS_PIN PB7 // SPI1_NSS
|
||||
#define TOUCH_SCK_PIN PA5 // SPI1_SCK
|
||||
#define TOUCH_MISO_PIN PA6 // SPI1_MISO
|
||||
#define TOUCH_MOSI_PIN PA7 // SPI1_MOSI
|
||||
|
||||
#define TFT_RESET_PIN PF11
|
||||
#define TFT_BACKLIGHT_PIN PD13
|
||||
|
||||
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
|
||||
#define FSMC_CS_PIN PD7
|
||||
#define FSMC_RS_PIN PD11
|
||||
#define FSMC_DMA_DEV DMA2
|
||||
#define FSMC_DMA_CHANNEL DMA_CH5
|
||||
|
||||
#define TFT_CS_PIN FSMC_CS_PIN
|
||||
#define TFT_RS_PIN FSMC_RS_PIN
|
||||
#endif
|
||||
|
||||
#if ENABLED(TFT_LVGL_UI)
|
||||
// LVGL
|
||||
#define HAS_SPI_FLASH_FONT 1
|
||||
#define HAS_GCODE_PREVIEW 1
|
||||
#define HAS_GCODE_DEFAULT_VIEW_IN_FLASH 0
|
||||
#define HAS_LANG_SELECT_SCREEN 1
|
||||
#define HAS_BAK_VIEW_IN_FLASH 0
|
||||
#define HAS_LOGO_IN_FLASH 0
|
||||
#elif ENABLED(TFT_COLOR_UI)
|
||||
// Color UI
|
||||
#define TFT_BUFFER_SIZE 14400
|
||||
#endif
|
||||
|
||||
// SPI1(PA7)=LCD & SPI3(PB5)=STUFF, are not available
|
||||
// Needs to use SPI2
|
||||
#define SPI_DEVICE 2
|
||||
#define SD_SCK_PIN PB13
|
||||
#define SD_MISO_PIN PB14
|
||||
#define SD_MOSI_PIN PB15
|
||||
#define SD_SS_PIN PB12
|
||||
|
||||
//
|
||||
// SD Card
|
||||
//
|
||||
#define SDIO_SUPPORT
|
||||
#define SD_DETECT_PIN -1 // PF0, but it isn't connected
|
||||
#define SDIO_CLOCK 4500000
|
||||
#define SDIO_READ_RETRIES 16
|
||||
#include "pins_CHITU3D_common.h"
|
||||
|
||||
@@ -21,160 +21,14 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "env_validate.h"
|
||||
|
||||
/**
|
||||
* 2017 Victor Perez Marlin for stm32f1 test
|
||||
*/
|
||||
|
||||
#define BOARD_INFO_NAME "Chitu3D"
|
||||
#define DEFAULT_MACHINE_NAME "STM32F103ZET6"
|
||||
|
||||
#define BOARD_NO_NATIVE_USB
|
||||
|
||||
#define DISABLE_JTAG
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
|
||||
#if NO_EEPROM_SELECTED
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
#endif
|
||||
|
||||
#if ENABLED(FLASH_EEPROM_EMULATION)
|
||||
// SoC Flash (framework-arduinoststm32-maple/STM32F1/libraries/EEPROM/EEPROM.h)
|
||||
#define EEPROM_START_ADDRESS (0x8000000UL + (512 * 1024) - 2 * EEPROM_PAGE_SIZE)
|
||||
#define EEPROM_PAGE_SIZE (0x800U) // 2KB, but will use 2x more (4KB)
|
||||
#define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE
|
||||
#else
|
||||
#define MARLIN_EEPROM_SIZE 0x800U // On SD, Limit to 2KB, require this amount of RAM
|
||||
#endif
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#define X_STOP_PIN PG10
|
||||
#define Y_STOP_PIN PA12
|
||||
#define Z_STOP_PIN PG9
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_ENABLE_PIN PC13
|
||||
#define X_STEP_PIN PE5
|
||||
#define X_DIR_PIN PE6
|
||||
|
||||
#define Y_ENABLE_PIN PE4
|
||||
#define Y_STEP_PIN PE2
|
||||
#define Y_DIR_PIN PE3
|
||||
|
||||
#define Z_ENABLE_PIN PE1
|
||||
#define Z_STEP_PIN PB9
|
||||
#define Z_DIR_PIN PE0
|
||||
#define BOARD_INFO_NAME "Chitu3D V6"
|
||||
|
||||
#define Z2_ENABLE_PIN PF3
|
||||
#define Z2_STEP_PIN PF5
|
||||
#define Z2_DIR_PIN PF1
|
||||
|
||||
#define E0_ENABLE_PIN PB8
|
||||
#define E0_STEP_PIN PB4
|
||||
#define E0_DIR_PIN PB5
|
||||
|
||||
#define E1_ENABLE_PIN PG8
|
||||
#define E1_STEP_PIN PC7
|
||||
#define E1_DIR_PIN PC6
|
||||
|
||||
//
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_0_PIN PA1 // TH1
|
||||
#define TEMP_BED_PIN PA0 // TB1
|
||||
|
||||
//
|
||||
// Heaters
|
||||
//
|
||||
#define HEATER_0_PIN PG12 // HEATER1
|
||||
#define HEATER_BED_PIN PG11 // HOT BED
|
||||
//#define HEATER_BED_INVERTING true
|
||||
|
||||
//
|
||||
// Fans
|
||||
//
|
||||
#define CONTROLLER_FAN_PIN PD6 // BOARD FAN
|
||||
#define FAN_PIN PG13 // FAN
|
||||
#define FAN2_PIN PG14
|
||||
|
||||
//
|
||||
// Misc
|
||||
//
|
||||
#define BEEPER_PIN PB0
|
||||
//#define LED_PIN PD3
|
||||
//#define POWER_LOSS_PIN PG2 // PG4 PW_DET
|
||||
|
||||
#ifndef FIL_RUNOUT_PIN
|
||||
#define FIL_RUNOUT_PIN PA15 // MT_DET
|
||||
#endif
|
||||
#ifndef FIL_RUNOUT2_PIN
|
||||
#define FIL_RUNOUT2_PIN PF13
|
||||
#endif
|
||||
|
||||
// SPI Flash
|
||||
#define HAS_SPI_FLASH 1
|
||||
#if HAS_SPI_FLASH
|
||||
#define SPI_FLASH_SIZE 0x200000 // 2MB
|
||||
#endif
|
||||
|
||||
// SPI 2
|
||||
#define W25QXX_CS_PIN PB12
|
||||
#define W25QXX_MOSI_PIN PB15
|
||||
#define W25QXX_MISO_PIN PB14
|
||||
#define W25QXX_SCK_PIN PB13
|
||||
|
||||
//
|
||||
// TFT with FSMC interface
|
||||
//
|
||||
#if HAS_FSMC_TFT
|
||||
#define TOUCH_CS_PIN PB7 // SPI1_NSS
|
||||
#define TOUCH_SCK_PIN PA5 // SPI1_SCK
|
||||
#define TOUCH_MISO_PIN PA6 // SPI1_MISO
|
||||
#define TOUCH_MOSI_PIN PA7 // SPI1_MOSI
|
||||
|
||||
#define TFT_RESET_PIN PF11
|
||||
#define TFT_BACKLIGHT_PIN PD13
|
||||
|
||||
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
|
||||
#define FSMC_CS_PIN PD7
|
||||
#define FSMC_RS_PIN PD11
|
||||
#define FSMC_DMA_DEV DMA2
|
||||
#define FSMC_DMA_CHANNEL DMA_CH5
|
||||
#endif
|
||||
|
||||
#if ENABLED(TFT_LVGL_UI)
|
||||
// LVGL
|
||||
#define HAS_SPI_FLASH_FONT 1
|
||||
#define HAS_GCODE_PREVIEW 1
|
||||
#define HAS_GCODE_DEFAULT_VIEW_IN_FLASH 0
|
||||
#define HAS_LANG_SELECT_SCREEN 1
|
||||
#define HAS_BAK_VIEW_IN_FLASH 0
|
||||
#define HAS_LOGO_IN_FLASH 0
|
||||
#elif ENABLED(TFT_COLOR_UI)
|
||||
// Color UI
|
||||
#define TFT_BUFFER_SIZE 14400
|
||||
#endif
|
||||
|
||||
// SPI1(PA7)=LCD & SPI3(PB5)=STUFF, are not available
|
||||
// so SPI2 is required.
|
||||
#define SPI_DEVICE 2
|
||||
#define SD_SCK_PIN PB13
|
||||
#define SD_MISO_PIN PB14
|
||||
#define SD_MOSI_PIN PB15
|
||||
#define SD_SS_PIN PB12
|
||||
|
||||
//
|
||||
// SD Card
|
||||
//
|
||||
#define SDIO_SUPPORT
|
||||
#define SD_DETECT_PIN -1 // PF0, but it isn't connected
|
||||
#define SDIO_CLOCK 4500000
|
||||
#define SDIO_READ_RETRIES 16
|
||||
#include "pins_CHITU3D_common.h"
|
||||
|
||||
Executable
+36
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#define BOARD_INFO_NAME "Chitu3D V9"
|
||||
|
||||
#define Z_STOP_PIN PA14
|
||||
|
||||
#define Z2_ENABLE_PIN PF3
|
||||
#define Z2_STEP_PIN PF5
|
||||
#define Z2_DIR_PIN PF1
|
||||
|
||||
#ifndef FIL_RUNOUT2_PIN
|
||||
#define FIL_RUNOUT2_PIN PF13
|
||||
#endif
|
||||
|
||||
#include "pins_CHITU3D_common.h"
|
||||
@@ -0,0 +1,177 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "env_validate.h"
|
||||
|
||||
#ifndef BOARD_INFO_NAME
|
||||
#define BOARD_INFO_NAME "Chitu3D"
|
||||
#endif
|
||||
#ifndef DEFAULT_MACHINE_NAME
|
||||
#define DEFAULT_MACHINE_NAME "STM32F103ZET6"
|
||||
#endif
|
||||
|
||||
#define BOARD_NO_NATIVE_USB
|
||||
#define DISABLE_JTAG
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
|
||||
#if NO_EEPROM_SELECTED
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
#endif
|
||||
|
||||
#if ENABLED(FLASH_EEPROM_EMULATION)
|
||||
// SoC Flash (framework-arduinoststm32-maple/STM32F1/libraries/EEPROM/EEPROM.h)
|
||||
#define EEPROM_START_ADDRESS (0x8000000UL + (512 * 1024) - 2 * EEPROM_PAGE_SIZE)
|
||||
#define EEPROM_PAGE_SIZE (0x800U) // 2KB, but will use 2x more (4KB)
|
||||
#define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE
|
||||
#else
|
||||
#define MARLIN_EEPROM_SIZE 0x800U // On SD, Limit to 2KB, require this amount of RAM
|
||||
#endif
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#define X_STOP_PIN PG10
|
||||
#define Y_STOP_PIN PA12
|
||||
#ifndef Z_STOP_PIN
|
||||
#define Z_STOP_PIN PG9
|
||||
#endif
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_ENABLE_PIN PC13
|
||||
#define X_STEP_PIN PE5
|
||||
#define X_DIR_PIN PE6
|
||||
|
||||
#define Y_ENABLE_PIN PE4
|
||||
#define Y_STEP_PIN PE2
|
||||
#define Y_DIR_PIN PE3
|
||||
|
||||
#define Z_ENABLE_PIN PE1
|
||||
#define Z_STEP_PIN PB9
|
||||
#define Z_DIR_PIN PE0
|
||||
|
||||
#define E0_ENABLE_PIN PB8
|
||||
#define E0_STEP_PIN PB4
|
||||
#define E0_DIR_PIN PB5
|
||||
|
||||
#define E1_ENABLE_PIN PG8
|
||||
#define E1_STEP_PIN PC7
|
||||
#define E1_DIR_PIN PC6
|
||||
|
||||
//
|
||||
// Temperature Sensors
|
||||
//
|
||||
#define TEMP_0_PIN PA1 // TH1 Analog Input
|
||||
#define TEMP_BED_PIN PA0 // TB1 Analog Input
|
||||
|
||||
//
|
||||
// Heaters
|
||||
//
|
||||
#define HEATER_0_PIN PG12 // HEATER1
|
||||
#define HEATER_BED_PIN PG11 // HOT BED
|
||||
//#define HEATER_BED_INVERTING true
|
||||
|
||||
//
|
||||
// Fans
|
||||
//
|
||||
#define CONTROLLER_FAN_PIN PD6 // BOARD FAN
|
||||
#define FAN_PIN PG13 // FAN
|
||||
#define FAN2_PIN PG14
|
||||
|
||||
//
|
||||
// Misc
|
||||
//
|
||||
#define BEEPER_PIN PB0
|
||||
//#define LED_PIN PD3
|
||||
//#define POWER_LOSS_PIN PG2 // PG4 PW_DET
|
||||
|
||||
#ifndef FIL_RUNOUT_PIN
|
||||
#define FIL_RUNOUT_PIN PA15 // MT_DET
|
||||
#endif
|
||||
|
||||
// SPI Flash
|
||||
#define HAS_SPI_FLASH 1
|
||||
#if HAS_SPI_FLASH
|
||||
#define SPI_FLASH_SIZE 0x200000 // 2MB
|
||||
#endif
|
||||
|
||||
// SPI 2
|
||||
#define W25QXX_CS_PIN PB12
|
||||
#define W25QXX_MOSI_PIN PB15
|
||||
#define W25QXX_MISO_PIN PB14
|
||||
#define W25QXX_SCK_PIN PB13
|
||||
|
||||
//
|
||||
// TFT with FSMC interface
|
||||
//
|
||||
#if HAS_FSMC_TFT
|
||||
#define TOUCH_CS_PIN PB7 // SPI1_NSS
|
||||
#define TOUCH_SCK_PIN PA5 // SPI1_SCK
|
||||
#define TOUCH_MISO_PIN PA6 // SPI1_MISO
|
||||
#define TOUCH_MOSI_PIN PA7 // SPI1_MOSI
|
||||
|
||||
#define TFT_RESET_PIN PF11
|
||||
#define TFT_BACKLIGHT_PIN PD13
|
||||
|
||||
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
|
||||
#define FSMC_CS_PIN PD7
|
||||
#define FSMC_RS_PIN PD11
|
||||
#define FSMC_DMA_DEV DMA2
|
||||
#define FSMC_DMA_CHANNEL DMA_CH5
|
||||
|
||||
#define TFT_CS_PIN FSMC_CS_PIN
|
||||
#define TFT_RS_PIN FSMC_RS_PIN
|
||||
#endif
|
||||
|
||||
#if ENABLED(TFT_LVGL_UI)
|
||||
// LVGL
|
||||
#define HAS_SPI_FLASH_FONT 1
|
||||
#define HAS_GCODE_PREVIEW 1
|
||||
#define HAS_GCODE_DEFAULT_VIEW_IN_FLASH 0
|
||||
#define HAS_LANG_SELECT_SCREEN 1
|
||||
#define HAS_BAK_VIEW_IN_FLASH 0
|
||||
#define HAS_LOGO_IN_FLASH 0
|
||||
#elif ENABLED(TFT_COLOR_UI)
|
||||
// Color UI
|
||||
#define TFT_BUFFER_SIZE 14400
|
||||
#endif
|
||||
|
||||
// SPI1(PA7)=LCD & SPI3(PB5)=STUFF, are not available
|
||||
// so SPI2 is required.
|
||||
#define SPI_DEVICE 2
|
||||
#define SD_SCK_PIN PB13
|
||||
#define SD_MISO_PIN PB14
|
||||
#define SD_MOSI_PIN PB15
|
||||
#define SD_SS_PIN PB12
|
||||
|
||||
//
|
||||
// SD Card
|
||||
//
|
||||
#define SDIO_SUPPORT
|
||||
#define SD_DETECT_PIN -1 // PF0, but it isn't connected
|
||||
#define SDIO_CLOCK 4500000
|
||||
#define SDIO_READ_RETRIES 16
|
||||
@@ -500,6 +500,24 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_SPI_TFT
|
||||
#define TFT_CS_PIN EXP2_07_PIN
|
||||
#define TFT_A0_PIN EXP2_04_PIN
|
||||
#define TFT_SCK_PIN EXP2_09_PIN
|
||||
#define TFT_MISO_PIN EXP2_10_PIN
|
||||
#define TFT_MOSI_PIN EXP2_05_PIN
|
||||
|
||||
#define TOUCH_INT_PIN EXP1_04_PIN
|
||||
#define TOUCH_MISO_PIN EXP1_05_PIN
|
||||
#define TOUCH_MOSI_PIN EXP1_08_PIN
|
||||
#define TOUCH_SCK_PIN EXP1_06_PIN
|
||||
#define TOUCH_CS_PIN EXP1_07_PIN
|
||||
|
||||
#define BTN_EN1 EXP2_08_PIN
|
||||
#define BTN_EN2 EXP2_06_PIN
|
||||
#define BTN_ENC EXP1_09_PIN
|
||||
#endif
|
||||
|
||||
//
|
||||
// WIFI
|
||||
//
|
||||
|
||||
@@ -231,27 +231,81 @@
|
||||
|
||||
//
|
||||
// Temperature Sensors
|
||||
// Use ADC pins without pullup for sensors that don't need a pullup.
|
||||
//
|
||||
#define TEMP_0_PIN PF4 // T1 <-> E0
|
||||
#define TEMP_1_PIN PF5 // T2 <-> E1
|
||||
#define TEMP_2_PIN PF6 // T3 <-> E2
|
||||
#define TEMP_BED_PIN PF3 // T0 <-> Bed
|
||||
#if TEMP_SENSOR_0_IS_AD8495 || TEMP_SENSOR_0 == 20
|
||||
#define TEMP_0_PIN PF8
|
||||
#else
|
||||
#define TEMP_0_PIN PF4 // T1 <-> E0
|
||||
#endif
|
||||
#if TEMP_SENSOR_1_IS_AD8495 || TEMP_SENSOR_1 == 20
|
||||
#define TEMP_1_PIN PF9
|
||||
#else
|
||||
#define TEMP_1_PIN PF5 // T2 <-> E1
|
||||
#endif
|
||||
#if TEMP_SENSOR_2_IS_AD8495 || TEMP_SENSOR_2 == 20
|
||||
#define TEMP_2_PIN PF10
|
||||
#else
|
||||
#define TEMP_2_PIN PF6 // T3 <-> E2
|
||||
#endif
|
||||
#if TEMP_SENSOR_BED_IS_AD8495 || TEMP_SENSOR_BED == 20
|
||||
#define TEMP_BED_PIN PF7
|
||||
#else
|
||||
#define TEMP_BED_PIN PF3 // T0 <-> Bed
|
||||
#endif
|
||||
|
||||
#ifdef TEMP_SENSOR_PROBE && !defined(TEMP_PROBE_PIN)
|
||||
#if TEMP_SENSOR_PROBE_IS_AD8495 || TEMP_SENSOR_PROBE == 20
|
||||
#if HOTENDS == 2
|
||||
#define TEMP_PROBE_PIN PF10
|
||||
#elif HOTENDS < 2
|
||||
#define TEMP_PROBE_PIN PF9
|
||||
#endif
|
||||
#else
|
||||
#if HOTENDS == 2
|
||||
#define TEMP_PROBE_PIN TEMP_2_PIN
|
||||
#elif HOTENDS < 2
|
||||
#define TEMP_PROBE_PIN TEMP_1_PIN
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_CHAMBER && !defined(TEMP_CHAMBER_PIN)
|
||||
#if TEMP_SENSOR_CHAMBER_IS_AD8495 || TEMP_SENSOR_CHAMBER == 20
|
||||
#define TEMP_CHAMBER_PIN PF10
|
||||
#else
|
||||
#define TEMP_CHAMBER_PIN TEMP_2_PIN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// Heaters / Fans
|
||||
// Heaters
|
||||
//
|
||||
#define HEATER_0_PIN PB1 // Heater0
|
||||
#define HEATER_1_PIN PD14 // Heater1
|
||||
#define HEATER_2_PIN PB0 // Heater1
|
||||
#if TEMP_SENSOR_CHAMBER && HOTENDS < 3
|
||||
#define HEATER_CHAMBER_PIN PB0 // Heater2
|
||||
#else
|
||||
#define HEATER_2_PIN PB0 // Heater2
|
||||
#endif
|
||||
#define HEATER_BED_PIN PD12 // Hotbed
|
||||
|
||||
//
|
||||
// Fans
|
||||
//
|
||||
#define FAN_PIN PC8 // Fan0
|
||||
#define FAN1_PIN PE5 // Fan1
|
||||
#define FAN2_PIN PE6 // Fan2
|
||||
|
||||
#ifndef E0_AUTO_FAN_PIN
|
||||
#define E0_AUTO_FAN_PIN FAN1_PIN
|
||||
#endif
|
||||
|
||||
#if ENABLED(USE_CONTROLLER_FAN) && HOTENDS < 2
|
||||
#define CONTROLLER_FAN_PIN PE6 // Fan2
|
||||
#else
|
||||
#define FAN2_PIN PE6 // Fan2
|
||||
#endif
|
||||
|
||||
//
|
||||
// Misc. Functions
|
||||
//
|
||||
|
||||
@@ -220,6 +220,12 @@
|
||||
#define WIFI_RESET_PIN PE9 // MKS ESP WIFI RESET PIN
|
||||
#endif
|
||||
|
||||
// MKS TEST
|
||||
#if ENABLED(MKS_TEST)
|
||||
#define MKS_TEST_POWER_LOSS_PIN PA13 // PW_DET
|
||||
#define MKS_TEST_PS_ON_PIN PB2 // PW_OFF
|
||||
#endif
|
||||
|
||||
//
|
||||
// Onboard SD card
|
||||
//
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"build": {
|
||||
"core": "stm32",
|
||||
"cpu": "cortex-m4",
|
||||
"extra_flags": "-DSTM32F401xx",
|
||||
"extra_flags": "-DSTM32F401xx -DARDUINO_STEVAL",
|
||||
"f_cpu": "84000000L",
|
||||
"hwids": [
|
||||
[
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"build": {
|
||||
"core": "stm32",
|
||||
"cpu": "cortex-m4",
|
||||
"extra_flags": "-DSTM32F407xx",
|
||||
"extra_flags": "-DSTM32F407xx -DARDUINO_BLACK_F407VE",
|
||||
"f_cpu": "168000000L",
|
||||
"hwids": [
|
||||
[
|
||||
|
||||
@@ -22,6 +22,7 @@ use_example_configs Mks/Robin
|
||||
opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2
|
||||
opt_disable TFT_INTERFACE_FSMC
|
||||
opt_enable TFT_INTERFACE_SPI MKS_WIFI_MODULE
|
||||
opt_add MKS_TEST
|
||||
exec_test $1 $2 "MKS Robin v2 nano Emulated DOGM SPI, MKS_WIFI_MODULE" "$3"
|
||||
|
||||
#
|
||||
|
||||
@@ -32,6 +32,7 @@ use_example_configs Mks/Robin
|
||||
opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2
|
||||
opt_disable TFT_INTERFACE_FSMC TFT_COLOR_UI TOUCH_SCREEN TFT_RES_320x240 SERIAL_PORT_2
|
||||
opt_enable TFT_INTERFACE_SPI TFT_LVGL_UI TFT_RES_480x320 MKS_WIFI_MODULE
|
||||
opt_add MKS_TEST
|
||||
exec_test $1 $2 "MKS Robin v2 nano LVGL SPI w/ WiFi" "$3"
|
||||
|
||||
#
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
#
|
||||
# Marlin Firmware
|
||||
# PlatformIO Configuration File
|
||||
#
|
||||
|
||||
####################################
|
||||
#
|
||||
# HAL/STM32 Common Environments
|
||||
#
|
||||
####################################
|
||||
|
||||
[common_stm32]
|
||||
platform = ststm32@~12.1
|
||||
board_build.core = stm32
|
||||
build_flags = ${common.build_flags}
|
||||
-std=gnu++14
|
||||
-DUSBCON -DUSBD_USE_CDC
|
||||
-DTIM_IRQ_PRIO=13
|
||||
-DADC_RESOLUTION=12
|
||||
build_unflags = -std=gnu++11
|
||||
src_filter = ${common.default_src_filter} +<src/HAL/STM32> +<src/HAL/shared/backtrace>
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
pre:buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py
|
||||
|
||||
#
|
||||
# STM32 board based on a variant.
|
||||
#
|
||||
[stm32_variant]
|
||||
extends = common_stm32
|
||||
extra_scripts = ${common_stm32.extra_scripts}
|
||||
pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
|
||||
buildroot/share/PlatformIO/scripts/offset_and_rename.py
|
||||
|
||||
#
|
||||
# USB Flash Drive mix-ins for STM32
|
||||
#
|
||||
[stm_flash_drive]
|
||||
platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-3.zip
|
||||
build_flags = ${common_stm32.build_flags}
|
||||
-DHAL_PCD_MODULE_ENABLED -DHAL_HCD_MODULE_ENABLED
|
||||
-DUSBHOST -DUSBH_IRQ_PRIO=3 -DUSBH_IRQ_SUBPRIO=4
|
||||
+6
-4
@@ -27,8 +27,8 @@ platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
board = marlin_malyanM200v2
|
||||
build_flags = ${common_stm32.build_flags} -DHAL_PCD_MODULE_ENABLED
|
||||
-O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing
|
||||
-DCUSTOM_STARTUP_FILE
|
||||
-O2 -ffreestanding -fsigned-char -fno-move-loop-invariants
|
||||
-fno-strict-aliasing -DCUSTOM_STARTUP_FILE
|
||||
|
||||
#
|
||||
# Malyan M200 v2 (STM32F070CB)
|
||||
@@ -38,7 +38,8 @@ platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
board = malyanm200_f070cb
|
||||
build_flags = ${common_stm32.build_flags}
|
||||
-DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB -DHAL_UART_MODULE_ENABLED -DCUSTOM_STARTUP_FILE
|
||||
-DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB
|
||||
-DHAL_UART_MODULE_ENABLED -DCUSTOM_STARTUP_FILE
|
||||
|
||||
#
|
||||
# Malyan M300 (STM32F070CB)
|
||||
@@ -48,5 +49,6 @@ platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
board = malyanm300_f070cb
|
||||
build_flags = ${common_stm32.build_flags}
|
||||
-DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB -DHAL_UART_MODULE_ENABLED
|
||||
-DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB
|
||||
-DHAL_UART_MODULE_ENABLED
|
||||
src_filter = ${common.default_src_filter} +<src/HAL/STM32>
|
||||
|
||||
+179
-213
@@ -10,70 +10,48 @@
|
||||
# Naming Example: STM32F103RCT6
|
||||
#
|
||||
# F : Foundation (sometimes High Performance F2/F4)
|
||||
# 1 : Cortex M1 core
|
||||
# 1 : Cortex M3 core
|
||||
# 03 : Line/Features
|
||||
# R : 64 or 66 pins (V:100, Z:144, I:176)
|
||||
# C : 256KB Flash-memory (D:384KB, E:512KB, G:1024KB)
|
||||
# R : 64 or 66 pins (T:36, C:48, V:100, Z:144, I:176)
|
||||
# C : 256KB Flash-memory (B: 128KB, D:384KB, E:512KB, G:1024KB)
|
||||
# T : LQFP package
|
||||
# 6 : -40...85°C (7: ...105°C)
|
||||
#
|
||||
#################################
|
||||
|
||||
#
|
||||
# HAL/STM32 Base Environment values
|
||||
#
|
||||
[common_stm32]
|
||||
platform = ststm32@~12.1
|
||||
build_flags = ${common.build_flags}
|
||||
-std=gnu++14
|
||||
-DUSBCON -DUSBD_USE_CDC
|
||||
-DTIM_IRQ_PRIO=13
|
||||
-DADC_RESOLUTION=12
|
||||
build_unflags = -std=gnu++11
|
||||
src_filter = ${common.default_src_filter} +<src/HAL/STM32> +<src/HAL/shared/backtrace>
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
pre:buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py
|
||||
|
||||
[stm32f1_variant]
|
||||
extra_scripts = ${common_stm32.extra_scripts}
|
||||
pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
|
||||
buildroot/share/PlatformIO/scripts/offset_and_rename.py
|
||||
|
||||
[common_STM32F103RC]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
[common_STM32F103RC_variant]
|
||||
extends = stm32_variant
|
||||
board = genericSTM32F103RC
|
||||
monitor_speed = 115200
|
||||
board_build.core = stm32
|
||||
board_build.variant = MARLIN_F103Rx
|
||||
extra_scripts = ${stm32f1_variant.extra_scripts}
|
||||
build_flags = ${stm32_variant.build_flags} -DDEBUG_LEVEL=0
|
||||
monitor_speed = 115200
|
||||
|
||||
#
|
||||
# STM32F103RE
|
||||
#
|
||||
[env:STM32F103RE]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
board = genericSTM32F103RE
|
||||
monitor_speed = 115200
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
board = genericSTM32F103RE
|
||||
monitor_speed = 115200
|
||||
|
||||
#
|
||||
# STM32F103VE
|
||||
#
|
||||
[env:STM32F103VE]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
board = genericSTM32F103VE
|
||||
monitor_speed = 115200
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
board = genericSTM32F103VE
|
||||
monitor_speed = 115200
|
||||
|
||||
#
|
||||
# STM32F103ZE
|
||||
#
|
||||
[env:STM32F103ZE]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
board = genericSTM32F103ZE
|
||||
monitor_speed = 115200
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
board = genericSTM32F103ZE
|
||||
monitor_speed = 115200
|
||||
|
||||
#
|
||||
# BigTree SKR Mini V1.1 / SKR Mini E3 & MZ (STM32F103RCT6 ARM Cortex-M3)
|
||||
@@ -82,23 +60,23 @@ monitor_speed = 115200
|
||||
# STM32F103RC_btt_USB ......... RCT6 with 256K (USB mass storage)
|
||||
#
|
||||
[env:STM32F103RC_btt]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_STM32F103RC
|
||||
build_flags = ${common_stm32.build_flags} -DDEBUG_LEVEL=0 -DTIMER_SERVO=TIM5
|
||||
board_build.offset = 0x7000
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_STM32F103RC_variant
|
||||
build_flags = ${common_STM32F103RC_variant.build_flags}
|
||||
-DTIMER_SERVO=TIM5
|
||||
board_build.offset = 0x7000
|
||||
board_upload.offset_address = 0x08007000
|
||||
|
||||
[env:STM32F103RC_btt_USB]
|
||||
extends = env:STM32F103RC_btt
|
||||
platform = ${common_stm32.platform}
|
||||
platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-3.zip
|
||||
extends = env:STM32F103RC_btt
|
||||
platform_packages = ${stm_flash_drive.platform_packages}
|
||||
build_flags = ${env:STM32F103RC_btt.build_flags}
|
||||
-DUSE_USB_FS
|
||||
-DUSBD_IRQ_PRIO=5
|
||||
-DUSBD_IRQ_SUBPRIO=6
|
||||
-DUSBD_USE_CDC_MSC
|
||||
build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC
|
||||
build_flags = ${env:STM32F103RC_btt.build_flags} ${env:stm32_flash_drive.build_flags}
|
||||
-DUSBCON
|
||||
-DUSE_USB_FS
|
||||
-DUSBD_IRQ_PRIO=5
|
||||
-DUSBD_IRQ_SUBPRIO=6
|
||||
-DUSBD_USE_CDC_MSC
|
||||
|
||||
#
|
||||
# MKS Robin (STM32F103ZET6)
|
||||
@@ -106,52 +84,53 @@ build_flags = ${env:STM32F103RC_btt.build_flags} ${env:stm32_flash_drive.b
|
||||
#
|
||||
[env:mks_robin]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
extends = stm32_variant
|
||||
board = genericSTM32F103ZE
|
||||
board_build.core = stm32
|
||||
board_build.variant = MARLIN_F103Zx
|
||||
board_build.offset = 0x7000
|
||||
board_build.encrypt = Robin.bin
|
||||
build_flags = ${common_stm32.build_flags}
|
||||
-DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
|
||||
build_unflags = ${common_stm32.build_unflags}
|
||||
-DUSBCON -DUSBD_USE_CDC
|
||||
extra_scripts = ${stm32f1_variant.extra_scripts}
|
||||
lib_deps =
|
||||
board_build.offset = 0x7000
|
||||
build_flags = ${stm32_variant.build_flags}
|
||||
-DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
|
||||
build_unflags = ${stm32_variant.build_unflags}
|
||||
-DUSBCON -DUSBD_USE_CDC
|
||||
|
||||
#
|
||||
# MKS Robin E3/E3D (STM32F103RCT6) with TMC2209
|
||||
#
|
||||
[env:mks_robin_e3]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_STM32F103RC
|
||||
build_flags = ${common_stm32.build_flags} -DDEBUG_LEVEL=0 -DTIMER_SERVO=TIM5 -DDEFAULT_SPI=3
|
||||
build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
|
||||
monitor_speed = 115200
|
||||
board_build.offset = 0x5000
|
||||
extends = common_STM32F103RC_variant
|
||||
board_build.encrypt = Robin_e3.bin
|
||||
board_build.offset = 0x5000
|
||||
board_upload.offset_address = 0x08005000
|
||||
build_flags = ${common_STM32F103RC_variant.build_flags}
|
||||
-DTIMER_SERVO=TIM5 -DDEFAULT_SPI=3
|
||||
build_unflags = ${common_STM32F103RC_variant.build_unflags}
|
||||
-DUSBCON -DUSBD_USE_CDC
|
||||
monitor_speed = 115200
|
||||
debug_tool = stlink
|
||||
extra_scripts = ${common_STM32F103RC.extra_scripts}
|
||||
|
||||
#
|
||||
# Creality (STM32F103RET6)
|
||||
#
|
||||
[env:STM32F103RET6_creality]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
build_flags = ${common_stm32.build_flags} -DMCU_STM32F103RE -DHAL_SD_MODULE_ENABLED -DSS_TIMER=4 -DTIMER_SERVO=TIM5 -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
|
||||
board = genericSTM32F103RE
|
||||
monitor_speed = 115200
|
||||
board_build.core = stm32
|
||||
board_build.variant = MARLIN_F103Rx
|
||||
board_build.offset = 0x7000
|
||||
platform = ${common_stm32.platform}
|
||||
extends = stm32_variant
|
||||
board = genericSTM32F103RE
|
||||
board_build.variant = MARLIN_F103Rx
|
||||
board_build.offset = 0x7000
|
||||
board_upload.offset_address = 0x08007000
|
||||
build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
|
||||
extra_scripts = ${stm32f1_variant.extra_scripts}
|
||||
pre:buildroot/share/PlatformIO/scripts/random-bin.py
|
||||
debug_tool = jlink
|
||||
upload_protocol = jlink
|
||||
build_flags = ${stm32_variant.build_flags}
|
||||
-DMCU_STM32F103RE -DHAL_SD_MODULE_ENABLED
|
||||
-DSS_TIMER=4 -DTIMER_SERVO=TIM5
|
||||
-DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
|
||||
build_unflags = ${stm32_variant.build_unflags}
|
||||
-DUSBCON -DUSBD_USE_CDC
|
||||
extra_scripts = ${stm32_variant.extra_scripts}
|
||||
pre:buildroot/share/PlatformIO/scripts/random-bin.py
|
||||
monitor_speed = 115200
|
||||
debug_tool = jlink
|
||||
upload_protocol = jlink
|
||||
|
||||
#
|
||||
# BigTree SKR Mini E3 V2.0 & DIP / SKR CR6 (STM32F103RET6 ARM Cortex-M3)
|
||||
@@ -160,80 +139,79 @@ upload_protocol = jlink
|
||||
# STM32F103RE_btt_USB ......... RET6 (USB mass storage)
|
||||
#
|
||||
[env:STM32F103RE_btt]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
build_flags = ${common_stm32.build_flags} -DMCU_STM32F103RE -DHAL_SD_MODULE_ENABLED -DSS_TIMER=4 -DTIMER_SERVO=TIM5 -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
|
||||
board = genericSTM32F103RE
|
||||
monitor_speed = 115200
|
||||
board_build.core = stm32
|
||||
board_build.variant = MARLIN_F103Rx
|
||||
board_build.offset = 0x7000
|
||||
platform = ${common_stm32.platform}
|
||||
extends = stm32_variant
|
||||
board = genericSTM32F103RE
|
||||
board_build.variant = MARLIN_F103Rx
|
||||
board_build.offset = 0x7000
|
||||
board_upload.offset_address = 0x08007000
|
||||
build_unflags = ${common_stm32.build_unflags}
|
||||
extra_scripts = ${stm32f1_variant.extra_scripts}
|
||||
debug_tool = jlink
|
||||
upload_protocol = jlink
|
||||
build_flags = ${stm32_variant.build_flags}
|
||||
-DMCU_STM32F103RE -DHAL_SD_MODULE_ENABLED
|
||||
-DSS_TIMER=4 -DTIMER_SERVO=TIM5
|
||||
-DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
|
||||
monitor_speed = 115200
|
||||
debug_tool = jlink
|
||||
upload_protocol = jlink
|
||||
|
||||
[env:STM32F103RE_btt_USB]
|
||||
extends = env:STM32F103RE_btt
|
||||
platform = ${common_stm32.platform}
|
||||
platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-3.zip
|
||||
build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC
|
||||
build_flags = ${env:STM32F103RE_btt.build_flags} ${env:stm32_flash_drive.build_flags}
|
||||
-DUSBCON
|
||||
-DUSE_USB_FS
|
||||
-DUSBD_IRQ_PRIO=5
|
||||
-DUSBD_IRQ_SUBPRIO=6
|
||||
-DUSBD_USE_CDC_MSC
|
||||
extends = env:STM32F103RE_btt
|
||||
platform_packages = ${stm_flash_drive.platform_packages}
|
||||
build_flags = ${env:STM32F103RE_btt.build_flags}
|
||||
-DUSE_USB_FS -DUSBD_IRQ_PRIO=5
|
||||
-DUSBD_IRQ_SUBPRIO=6 -DUSBD_USE_CDC_MSC
|
||||
build_unflags = ${stm32_variant.build_unflags} -DUSBD_USE_CDC
|
||||
|
||||
#
|
||||
# FLSUN QQS Pro (STM32F103VET6)
|
||||
# board Hispeedv1
|
||||
#
|
||||
[env:flsun_hispeedv1]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
|
||||
board = genericSTM32F103VE
|
||||
board_build.core = stm32
|
||||
board_build.variant = MARLIN_F103Vx
|
||||
board_build.offset = 0x7000
|
||||
board_build.encrypt = Robin_mini.bin
|
||||
platform = ${common_stm32.platform}
|
||||
extends = stm32_variant
|
||||
board = genericSTM32F103VE
|
||||
board_build.variant = MARLIN_F103Vx
|
||||
board_build.encrypt = Robin_mini.bin
|
||||
board_build.offset = 0x7000
|
||||
board_upload.offset_address = 0x08007000
|
||||
build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
|
||||
extra_scripts = ${stm32f1_variant.extra_scripts}
|
||||
build_flags = ${stm32_variant.build_flags}
|
||||
-DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3
|
||||
-DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
|
||||
build_unflags = ${stm32_variant.build_unflags}
|
||||
-DUSBCON -DUSBD_USE_CDC
|
||||
|
||||
#
|
||||
# MKS Robin Nano V1.2 and V2
|
||||
#
|
||||
[env:mks_robin_nano35]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
|
||||
board = genericSTM32F103VE
|
||||
board_build.core = stm32
|
||||
board_build.variant = MARLIN_F103Vx
|
||||
board_build.offset = 0x7000
|
||||
board_build.encrypt = Robin_nano35.bin
|
||||
platform = ${common_stm32.platform}
|
||||
extends = stm32_variant
|
||||
board = genericSTM32F103VE
|
||||
board_build.variant = MARLIN_F103Vx
|
||||
board_build.encrypt = Robin_nano35.bin
|
||||
board_build.offset = 0x7000
|
||||
board_upload.offset_address = 0x08007000
|
||||
build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
|
||||
debug_tool = jlink
|
||||
upload_protocol = jlink
|
||||
extra_scripts = ${stm32f1_variant.extra_scripts}
|
||||
build_flags = ${stm32_variant.build_flags}
|
||||
-DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3
|
||||
-DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
|
||||
build_unflags = ${stm32_variant.build_unflags}
|
||||
-DUSBCON -DUSBD_USE_CDC
|
||||
debug_tool = jlink
|
||||
upload_protocol = jlink
|
||||
|
||||
#
|
||||
# Mingda MPX_ARM_MINI
|
||||
#
|
||||
[env:mingda_mpx_arm_mini]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
extends = stm32_variant
|
||||
board = genericSTM32F103ZE
|
||||
board_build.core = stm32
|
||||
board_build.variant = MARLIN_F103Zx
|
||||
board_build.offset = 0x10000
|
||||
build_flags = ${common_stm32.build_flags} -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
|
||||
build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
|
||||
extra_scripts = ${stm32f1_variant.extra_scripts}
|
||||
build_flags = ${stm32_variant.build_flags}
|
||||
-DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
|
||||
build_unflags = ${stm32_variant.build_unflags}
|
||||
-DUSBCON -DUSBD_USE_CDC
|
||||
|
||||
#
|
||||
# Malyan M200 (STM32F103CB)
|
||||
@@ -243,67 +221,55 @@ platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
board = malyanm200_f103cb
|
||||
build_flags = ${common_stm32.build_flags}
|
||||
-DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB -DHAL_UART_MODULE_ENABLED
|
||||
-DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB
|
||||
-DHAL_UART_MODULE_ENABLED
|
||||
src_filter = ${common.default_src_filter} +<src/HAL/STM32>
|
||||
|
||||
#
|
||||
# FLYmaker FLY Mini (STM32F103RCT6)
|
||||
#
|
||||
[env:FLY_MINI]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
build_flags = ${common_stm32.build_flags} -DSS_TIMER=4
|
||||
board = genericSTM32F103RC
|
||||
board_build.core = stm32
|
||||
board_build.variant = MARLIN_F103Rx
|
||||
board_build.offset = 0x5000
|
||||
platform = ${common_stm32.platform}
|
||||
extends = stm32_variant
|
||||
board = genericSTM32F103RC
|
||||
board_build.variant = MARLIN_F103Rx
|
||||
board_build.offset = 0x5000
|
||||
board_upload.offset_address = 0x08005000
|
||||
extra_scripts = ${stm32f1_variant.extra_scripts}
|
||||
build_flags = ${stm32_variant.build_flags} -DSS_TIMER=4
|
||||
|
||||
#
|
||||
# MKS Robin Mini (STM32F103VET6)
|
||||
#
|
||||
[env:mks_robin_mini]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
board = genericSTM32F103VE
|
||||
board_build.core = stm32
|
||||
board_build.variant = MARLIN_F103Vx
|
||||
board_build.offset = 0x7000
|
||||
board_build.encrypt = Robin_mini.bin
|
||||
build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
|
||||
platform = ${common_stm32.platform}
|
||||
extends = stm32_variant
|
||||
board = genericSTM32F103VE
|
||||
board_build.variant = MARLIN_F103Vx
|
||||
board_build.encrypt = Robin_mini.bin
|
||||
board_build.offset = 0x7000
|
||||
board_upload.offset_address = 0x08007000
|
||||
extra_scripts = ${stm32f1_variant.extra_scripts}
|
||||
build_flags = ${stm32_variant.build_flags}
|
||||
-DMCU_STM32F103VE -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
|
||||
|
||||
#
|
||||
# MKS Robin Lite/Lite2 (STM32F103RCT6)
|
||||
#
|
||||
[env:mks_robin_lite]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
board = genericSTM32F103RC
|
||||
board_build.core = stm32
|
||||
board_build.variant = MARLIN_F103Rx
|
||||
board_build.offset = 0x5000
|
||||
board_build.encrypt = mksLite.bin
|
||||
build_flags = ${common_stm32.build_flags}
|
||||
platform = ${common_stm32.platform}
|
||||
extends = stm32_variant
|
||||
board = genericSTM32F103RC
|
||||
board_build.variant = MARLIN_F103Rx
|
||||
board_build.encrypt = mksLite.bin
|
||||
board_build.offset = 0x5000
|
||||
board_upload.offset_address = 0x08005000
|
||||
extra_scripts = ${stm32f1_variant.extra_scripts}
|
||||
|
||||
#
|
||||
# MKS ROBIN LITE3 (STM32F103RCT6)
|
||||
#
|
||||
[env:mks_robin_lite3]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
board = genericSTM32F103RC
|
||||
board_build.core = stm32
|
||||
board_build.variant = MARLIN_F103Rx
|
||||
board_build.offset = 0x5000
|
||||
board_build.encrypt = mksLite3.bin
|
||||
build_flags = ${common_stm32.build_flags}
|
||||
board_upload.offset_address = 0x08005000
|
||||
extra_scripts = ${stm32f1_variant.extra_scripts}
|
||||
platform = ${common_stm32.platform}
|
||||
extends = env:mks_robin_lite
|
||||
board_build.encrypt = mksLite3.bin
|
||||
|
||||
#
|
||||
# MKS Robin Pro (STM32F103ZET6)
|
||||
@@ -318,44 +284,43 @@ board_build.encrypt = Robin_pro.bin
|
||||
# - LVGL UI
|
||||
#
|
||||
[env:mks_robin_e3p]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
board = genericSTM32F103VE
|
||||
board_build.core = stm32
|
||||
board_build.variant = MARLIN_F103Vx
|
||||
board_build.offset = 0x7000
|
||||
board_build.encrypt = Robin_e3p.bin
|
||||
build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
|
||||
platform = ${common_stm32.platform}
|
||||
extends = stm32_variant
|
||||
board = genericSTM32F103VE
|
||||
board_build.variant = MARLIN_F103Vx
|
||||
board_build.encrypt = Robin_e3p.bin
|
||||
board_build.offset = 0x7000
|
||||
board_upload.offset_address = 0x08007000
|
||||
extra_scripts = ${stm32f1_variant.extra_scripts}
|
||||
debug_tool = jlink
|
||||
upload_protocol = jlink
|
||||
build_flags = ${stm32_variant.build_flags}
|
||||
-DMCU_STM32F103VE -DSS_TIMER=4
|
||||
-DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
|
||||
debug_tool = jlink
|
||||
upload_protocol = jlink
|
||||
|
||||
#
|
||||
# JGAurora A5S A1 (STM32F103ZET6)
|
||||
#
|
||||
[env:jgaurora_a5s_a1]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
board = genericSTM32F103ZE
|
||||
board_build.core = stm32
|
||||
board_build.variant = MARLIN_F103Zx
|
||||
board_build.offset = 0xA000
|
||||
board_build.rename = firmware_for_sd_upload.bin
|
||||
build_flags = ${common_stm32.build_flags} -DSTM32F1xx -DSTM32_XL_DENSITY
|
||||
board_build.address = 0x0800A000
|
||||
extra_scripts = ${stm32f1_variant.extra_scripts}
|
||||
buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
|
||||
platform = ${common_stm32.platform}
|
||||
extends = stm32_variant
|
||||
board = genericSTM32F103ZE
|
||||
board_build.variant = MARLIN_F103Zx
|
||||
board_build.offset = 0xA000
|
||||
board_build.rename = firmware_for_sd_upload.bin
|
||||
board_upload.offset_address = 0x0800A000
|
||||
build_flags = ${stm32_variant.build_flags}
|
||||
-DSTM32F1xx -DSTM32_XL_DENSITY
|
||||
extra_scripts = ${stm32_variant.extra_scripts}
|
||||
buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
|
||||
|
||||
#
|
||||
# FYSETC STM32F103RC
|
||||
#
|
||||
[env:STM32F103RC_fysetc]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_STM32F103RC
|
||||
extra_scripts = ${stm32f1_variant.extra_scripts}
|
||||
buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
|
||||
build_flags = ${common_stm32.build_flags} -DDEBUG_LEVEL=0
|
||||
extends = common_STM32F103RC_variant
|
||||
extra_scripts = ${common_STM32F103RC_variant.extra_scripts}
|
||||
buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
|
||||
lib_ldf_mode = chain
|
||||
debug_tool = stlink
|
||||
upload_protocol = serial
|
||||
@@ -364,20 +329,20 @@ upload_protocol = serial
|
||||
# Longer 3D board in Alfawise U20 (STM32F103VET6)
|
||||
#
|
||||
[env:STM32F103VE_longer]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
board = genericSTM32F103VE
|
||||
board_build.core = stm32
|
||||
board_build.variant = MARLIN_F103Vx
|
||||
board_build.offset = 0x10000
|
||||
board_build.address = 0x08010000
|
||||
build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DU20 -DTS_V12
|
||||
-DLED_BUILTIN=PC2 -UPIN_WIRE_SDA -UPIN_WIRE_SCL -DPIN_WIRE_SDA=PB11 -DPIN_WIRE_SCL=PB10
|
||||
-DHAL_DAC_MODULE_DISABLED -DHAL_I2S_MODULE_DISABLED
|
||||
build_unflags = ${common_stm32.build_unflags}
|
||||
-DUSBCON -DUSBD_USE_CDC -DHAL_PCD_MODULE_ENABLED
|
||||
extra_scripts = ${stm32f1_variant.extra_scripts}
|
||||
buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py
|
||||
platform = ${common_stm32.platform}
|
||||
extends = stm32_variant
|
||||
board = genericSTM32F103VE
|
||||
board_build.variant = MARLIN_F103Vx
|
||||
board_build.offset = 0x10000
|
||||
board_upload.offset_address = 0x08010000
|
||||
build_flags = ${stm32_variant.build_flags}
|
||||
-DMCU_STM32F103VE -DU20 -DTS_V12 -DLED_BUILTIN=PC2 -UPIN_WIRE_SDA
|
||||
-UPIN_WIRE_SCL -DPIN_WIRE_SDA=PB11 -DPIN_WIRE_SCL=PB10
|
||||
-DHAL_DAC_MODULE_DISABLED -DHAL_I2S_MODULE_DISABLED
|
||||
build_unflags = ${stm32_variant.build_unflags}
|
||||
-DUSBCON -DUSBD_USE_CDC -DHAL_PCD_MODULE_ENABLED
|
||||
extra_scripts = ${stm32_variant.extra_scripts}
|
||||
buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py
|
||||
|
||||
#
|
||||
# TRIGORILLA PRO (STM32F103ZET6)
|
||||
@@ -392,15 +357,16 @@ extra_scripts = ${common_stm32.extra_scripts}
|
||||
#
|
||||
[env:chitu_f103]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
extends = stm32_variant
|
||||
board = genericSTM32F103ZE
|
||||
board_build.core = stm32
|
||||
board_build.variant = MARLIN_F103Zx
|
||||
extra_scripts = ${stm32f1_variant.extra_scripts}
|
||||
buildroot/share/PlatformIO/scripts/chitu_crypt.py
|
||||
build_flags = ${common_stm32.build_flags} -DSTM32_XL_DENSITY
|
||||
build_unflags = ${common_stm32.build_unflags}
|
||||
-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG= -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
|
||||
build_flags = ${stm32_variant.build_flags}
|
||||
-DSTM32F1xx -DSTM32_XL_DENSITY
|
||||
build_unflags = ${stm32_variant.build_unflags}
|
||||
-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=
|
||||
-DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
|
||||
extra_scripts = ${stm32_variant.extra_scripts}
|
||||
buildroot/share/PlatformIO/scripts/chitu_crypt.py
|
||||
|
||||
#
|
||||
# Some Chitu V5 boards have a problem with GPIO init.
|
||||
|
||||
+141
-178
@@ -12,8 +12,8 @@
|
||||
# F : Foundation (sometimes High Performance F2/F4)
|
||||
# 4 : Cortex M4 core
|
||||
# 01 : Line/Features
|
||||
# R : 64 or 66 pins (V:100, Z:144, I:176)
|
||||
# G : 1024KB Flash-memory (C:256KB, D:384KB, E:512KB)
|
||||
# R : 64 or 66 pins (T:36, C:48 or 49, M:81, V:100, Z:144, I:176)
|
||||
# G : 1024KB Flash-memory (B:128KB, C:256KB, D:384KB, E:512KB)
|
||||
# T : LQFP package
|
||||
# 6 : -40...85°C (7: ...105°C)
|
||||
#
|
||||
@@ -27,12 +27,7 @@ platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
board = armed_v1
|
||||
build_flags = ${common_stm32.build_flags}
|
||||
-O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing
|
||||
|
||||
[stm32f4_variant]
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
|
||||
buildroot/share/PlatformIO/scripts/offset_and_rename.py
|
||||
-O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing
|
||||
|
||||
#
|
||||
# STM32F401VE
|
||||
@@ -40,49 +35,46 @@ extra_scripts = ${common.extra_scripts}
|
||||
#
|
||||
[env:STM32F401VE_STEVAL]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
extends = stm32_variant
|
||||
board = marlin_STEVAL_STM32F401VE
|
||||
build_flags = ${common_stm32.build_flags}
|
||||
-DARDUINO_STEVAL -DSTM32F401xE
|
||||
-DDISABLE_GENERIC_SERIALUSB -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
|
||||
extra_scripts = ${stm32f4_variant.extra_scripts}
|
||||
build_flags = ${stm32_variant.build_flags}
|
||||
-DSTM32F401xE -DDISABLE_GENERIC_SERIALUSB
|
||||
-DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
|
||||
|
||||
#
|
||||
# STM32F401RC
|
||||
#
|
||||
[env:FYSETC_CHEETAH_V20]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
board = marlin_FYSETC_CHEETAH_V20
|
||||
build_flags = ${common_stm32.build_flags} -DSTM32F401xC -DVECT_TAB_OFFSET=0xC000
|
||||
extra_scripts = ${stm32f4_variant.extra_scripts}
|
||||
platform = ${common_stm32.platform}
|
||||
extends = stm32_variant
|
||||
board = marlin_FYSETC_CHEETAH_V20
|
||||
board_build.offset = 0xC000
|
||||
build_flags = ${stm32_variant.build_flags} -DSTM32F401xC
|
||||
|
||||
#
|
||||
# FLYF407ZG
|
||||
#
|
||||
[env:FLYF407ZG]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
extends = stm32_variant
|
||||
board = marlin_STM32F407ZGT6
|
||||
board_build.variant = MARLIN_FLY_F407ZG
|
||||
board_build.offset = 0x8000
|
||||
upload_protocol = dfu
|
||||
build_flags = ${common_stm32.build_flags}
|
||||
-DVECT_TAB_OFFSET=0x8000
|
||||
extra_scripts = ${stm32f4_variant.extra_scripts}
|
||||
|
||||
#
|
||||
# FYSETC S6 (STM32F446RET6 ARM Cortex-M4)
|
||||
#
|
||||
[env:FYSETC_S6]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
platform_packages = tool-stm32duino
|
||||
board = marlin_fysetc_s6
|
||||
build_flags = ${common_stm32.build_flags} -DVECT_TAB_OFFSET=0x10000 -DHAL_PCD_MODULE_ENABLED
|
||||
extra_scripts = ${stm32f4_variant.extra_scripts}
|
||||
debug_tool = stlink
|
||||
upload_protocol = dfu
|
||||
upload_command = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE"
|
||||
platform = ${common_stm32.platform}
|
||||
extends = stm32_variant
|
||||
board = marlin_fysetc_s6
|
||||
board_build.offset = 0x10000
|
||||
board_upload.offset_address = 0x08010000
|
||||
build_flags = ${stm32_variant.build_flags} -DHAL_PCD_MODULE_ENABLED
|
||||
debug_tool = stlink
|
||||
upload_protocol = dfu
|
||||
upload_command = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE"
|
||||
|
||||
#
|
||||
# FYSETC S6 new bootloader
|
||||
@@ -93,8 +85,6 @@ extends = env:FYSETC_S6
|
||||
board = marlin_fysetc_s6_8000
|
||||
board_build.offset = 0x8000
|
||||
board_upload.offset_address = 0x08008000
|
||||
build_flags = ${common_stm32.build_flags} -DHAL_PCD_MODULE_ENABLED
|
||||
extra_scripts = ${stm32f4_variant.extra_scripts}
|
||||
upload_command = dfu-util -a 0 -s 0x08008000:leave -D "$SOURCE"
|
||||
|
||||
#
|
||||
@@ -104,12 +94,10 @@ upload_command = dfu-util -a 0 -s 0x08008000:leave -D "$SOURCE"
|
||||
#
|
||||
[env:STM32F407VE_black]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
extends = stm32_variant
|
||||
board = marlin_blackSTM32F407VET6
|
||||
build_flags = ${common_stm32.build_flags}
|
||||
-DARDUINO_BLACK_F407VE
|
||||
-DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
|
||||
extra_scripts = ${stm32f4_variant.extra_scripts}
|
||||
build_flags = ${stm32_variant.build_flags}
|
||||
-DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
|
||||
|
||||
#
|
||||
# Anet ET4-MB_V1.x/ET4P-MB_V1.x (STM32F407VGT6 ARM Cortex-M4)
|
||||
@@ -117,120 +105,108 @@ extra_scripts = ${stm32f4_variant.extra_scripts}
|
||||
# Comment out board_build.offset = 0x10000 if you don't plan to use OpenBLT/flashing directly to 0x08000000.
|
||||
#
|
||||
[env:Anet_ET4_OpenBLT]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
build_flags = ${common_stm32.build_flags} -DHAL_SD_MODULE_ENABLED -DHAL_SRAM_MODULE_ENABLED
|
||||
board = marlin_STM32F407VGT6_CCM
|
||||
board_build.core = stm32
|
||||
board_build.variant = MARLIN_F4x7Vx
|
||||
board_build.encrypt = firmware.srec
|
||||
board_build.offset = 0x10000
|
||||
platform = ${common_stm32.platform}
|
||||
extends = stm32_variant
|
||||
board = marlin_STM32F407VGT6_CCM
|
||||
board_build.variant = MARLIN_F4x7Vx
|
||||
board_build.encrypt = firmware.srec
|
||||
board_build.offset = 0x10000
|
||||
board_upload.offset_address = 0x08010000
|
||||
build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
|
||||
debug_tool = jlink
|
||||
upload_protocol = jlink
|
||||
extra_scripts = ${stm32f4_variant.extra_scripts}
|
||||
buildroot/share/PlatformIO/scripts/openblt.py
|
||||
build_flags = ${stm32_variant.build_flags}
|
||||
-DHAL_SD_MODULE_ENABLED -DHAL_SRAM_MODULE_ENABLED
|
||||
build_unflags = ${stm32_variant.build_unflags}
|
||||
-DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
|
||||
extra_scripts = ${stm32_variant.extra_scripts}
|
||||
buildroot/share/PlatformIO/scripts/openblt.py
|
||||
debug_tool = jlink
|
||||
upload_protocol = jlink
|
||||
|
||||
#
|
||||
# BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4)
|
||||
#
|
||||
[env:BIGTREE_SKR_PRO]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
board = marlin_BigTree_SKR_Pro
|
||||
build_flags = ${common_stm32.build_flags}
|
||||
-DSTM32F407_5ZX -DVECT_TAB_OFFSET=0x8000
|
||||
extra_scripts = ${stm32f4_variant.extra_scripts}
|
||||
#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 =
|
||||
|
||||
#
|
||||
# USB Flash Drive mix-ins for STM32
|
||||
#
|
||||
[stm_flash_drive]
|
||||
platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-3.zip
|
||||
build_flags = ${common_stm32.build_flags}
|
||||
-DHAL_PCD_MODULE_ENABLED -DHAL_HCD_MODULE_ENABLED
|
||||
-DUSBHOST -DUSBH_IRQ_PRIO=3 -DUSBH_IRQ_SUBPRIO=4
|
||||
platform = ${common_stm32.platform}
|
||||
extends = stm32_variant
|
||||
board = marlin_BigTree_SKR_Pro
|
||||
board_build.offset = 0x8000
|
||||
build_flags = ${stm32_variant.build_flags} -DSTM32F407_5ZX
|
||||
debug_tool = stlink
|
||||
upload_protocol = stlink
|
||||
|
||||
#
|
||||
# BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4) with USB Flash Drive Support
|
||||
#
|
||||
[env:BIGTREE_SKR_PRO_usb_flash_drive]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = env:BIGTREE_SKR_PRO
|
||||
platform_packages = ${stm_flash_drive.platform_packages}
|
||||
build_unflags = -DUSBCON -DUSBD_USE_CDC
|
||||
build_flags = ${stm_flash_drive.build_flags}
|
||||
-DSTM32F407_5ZX -DVECT_TAB_OFFSET=0x8000
|
||||
build_flags = ${stm_flash_drive.build_flags} -DSTM32F407_5ZX
|
||||
build_unflags = ${env:BIGTREE_SKR_PRO.build_unflags} -DUSBCON -DUSBD_USE_CDC
|
||||
|
||||
#
|
||||
# BigTreeTech E3 RRF (STM32F407VGT6 ARM Cortex-M4)
|
||||
#
|
||||
[env:BIGTREE_E3_RRF]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
extends = stm32_variant
|
||||
board = marlin_STM32F407VGT6_CCM
|
||||
board_build.variant = MARLIN_BIGTREE_E3_RRF
|
||||
build_flags = ${common_stm32.build_flags}
|
||||
-DSTM32F407_5VX -DVECT_TAB_OFFSET=0x8000
|
||||
-DSERIAL_RX_BUFFER_SIZE=255 -DSERIAL_TX_BUFFER_SIZE=255
|
||||
extra_scripts = ${stm32f4_variant.extra_scripts}
|
||||
board_build.offset = 0x8000
|
||||
build_flags = ${stm32_variant.build_flags}
|
||||
-DSTM32F407_5VX
|
||||
-DSERIAL_RX_BUFFER_SIZE=255
|
||||
-DSERIAL_TX_BUFFER_SIZE=255
|
||||
|
||||
#
|
||||
# Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4)
|
||||
#
|
||||
[env:BIGTREE_GTR_V1_0]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
board = marlin_BigTree_GTR_v1
|
||||
extra_scripts = ${stm32f4_variant.extra_scripts}
|
||||
build_flags = ${common_stm32.build_flags}
|
||||
-DSTM32F407IX -DVECT_TAB_OFFSET=0x8000
|
||||
platform = ${common_stm32.platform}
|
||||
extends = stm32_variant
|
||||
board = marlin_BigTree_GTR_v1
|
||||
board_build.offset = 0x8000
|
||||
build_flags = ${stm32_variant.build_flags} -DSTM32F407IX
|
||||
|
||||
#
|
||||
# Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4) with USB Flash Drive Support
|
||||
#
|
||||
[env:BIGTREE_GTR_V1_0_usb_flash_drive]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = env:BIGTREE_GTR_V1_0
|
||||
platform_packages = ${stm_flash_drive.platform_packages}
|
||||
build_unflags = -DUSBCON -DUSBD_USE_CDC
|
||||
build_flags = ${stm_flash_drive.build_flags}
|
||||
-DSTM32F407IX -DVECT_TAB_OFFSET=0x8000
|
||||
build_flags = ${stm_flash_drive.build_flags} -DSTM32F407IX
|
||||
build_unflags = ${env:BIGTREE_GTR_V1_0.build_unflags} -DUSBCON -DUSBD_USE_CDC
|
||||
|
||||
#
|
||||
# BigTreeTech BTT002 V1.0 (STM32F407VGT6 ARM Cortex-M4)
|
||||
#
|
||||
[env:BIGTREE_BTT002]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
board = marlin_BigTree_BTT002
|
||||
build_flags = ${common_stm32.build_flags}
|
||||
-DSTM32F407_5VX -DVECT_TAB_OFFSET=0x8000
|
||||
-DHAVE_HWSERIAL2
|
||||
-DHAVE_HWSERIAL3
|
||||
-DPIN_SERIAL2_RX=PD_6
|
||||
-DPIN_SERIAL2_TX=PD_5
|
||||
extra_scripts = ${stm32f4_variant.extra_scripts}
|
||||
platform = ${common_stm32.platform}
|
||||
extends = stm32_variant
|
||||
board = marlin_BigTree_BTT002
|
||||
board_build.offset = 0x8000
|
||||
build_flags = ${stm32_variant.build_flags}
|
||||
-DSTM32F407_5VX
|
||||
-DHAVE_HWSERIAL2
|
||||
-DHAVE_HWSERIAL3
|
||||
-DPIN_SERIAL2_RX=PD_6
|
||||
-DPIN_SERIAL2_TX=PD_5
|
||||
|
||||
#
|
||||
# BigTreeTech SKR V2.0 (STM32F407VGT6 ARM Cortex-M4) with USB Flash Drive Support
|
||||
#
|
||||
[env:BIGTREE_SKR_2]
|
||||
platform = ${common_stm32.platform}
|
||||
platform_packages = ${stm_flash_drive.platform_packages}
|
||||
extends = common_stm32
|
||||
board = marlin_STM32F407VGT6_CCM
|
||||
board_build.core = stm32
|
||||
board_build.variant = MARLIN_F4x7Vx
|
||||
board_build.offset = 0x8000
|
||||
platform = ${common_stm32.platform}
|
||||
extends = stm32_variant
|
||||
platform_packages = ${stm_flash_drive.platform_packages}
|
||||
board = marlin_STM32F407VGT6_CCM
|
||||
board_build.variant = MARLIN_F4x7Vx
|
||||
board_build.offset = 0x8000
|
||||
board_upload.offset_address = 0x08008000
|
||||
extra_scripts = ${stm32f4_variant.extra_scripts}
|
||||
build_flags = ${stm_flash_drive.build_flags}
|
||||
-DUSE_USBHOST_HS -DUSE_USB_HS_IN_FS -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6
|
||||
-DHSE_VALUE=8000000U -DHAL_SD_MODULE_ENABLED
|
||||
build_flags = ${stm_flash_drive.build_flags}
|
||||
-DUSE_USBHOST_HS -DUSE_USB_HS_IN_FS
|
||||
-DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6
|
||||
-DHSE_VALUE=8000000U -DHAL_SD_MODULE_ENABLED
|
||||
|
||||
#
|
||||
# BigTreeTech SKR V2.0 (STM32F407VGT6 ARM Cortex-M4) with USB Media Share Support
|
||||
@@ -238,49 +214,51 @@ build_flags = ${stm_flash_drive.build_flags}
|
||||
[env:BIGTREE_SKR_2_USB]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = env:BIGTREE_SKR_2
|
||||
platform_packages = ${stm_flash_drive.platform_packages}
|
||||
build_unflags = -DUSBD_USE_CDC
|
||||
build_flags = ${env:BIGTREE_SKR_2.build_flags} -DUSBD_USE_CDC_MSC
|
||||
build_unflags = ${env:BIGTREE_SKR_2.build_unflags} -DUSBD_USE_CDC
|
||||
|
||||
#
|
||||
# BigTreeTech Octopus V1.0/1.1 (STM32F446ZET6 ARM Cortex-M4)
|
||||
#
|
||||
[env:BIGTREE_OCTOPUS_V1]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
board = marlin_BigTree_Octopus_v1
|
||||
extra_scripts = ${stm32f4_variant.extra_scripts}
|
||||
build_flags = ${common_stm32.build_flags}
|
||||
-DSTM32F446_5VX -DVECT_TAB_OFFSET=0x8000 -DUSE_USB_HS_IN_FS
|
||||
platform = ${common_stm32.platform}
|
||||
extends = stm32_variant
|
||||
board = marlin_BigTree_Octopus_v1
|
||||
board_build.offset = 0x8000
|
||||
build_flags = ${stm32_variant.build_flags}
|
||||
-DSTM32F446_5VX -DUSE_USB_HS_IN_FS
|
||||
|
||||
#
|
||||
# BigTreeTech Octopus V1.0/1.1 (STM32F446ZET6 ARM Cortex-M4) with USB Flash Drive Support
|
||||
#
|
||||
[env:BIGTREE_OCTOPUS_V1_USB]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = env:BIGTREE_OCTOPUS_V1
|
||||
platform_packages = ${stm_flash_drive.platform_packages}
|
||||
#build_unflags = -DUSBCON -DUSBD_USE_CDC
|
||||
build_unflags = -DUSBD_USE_CDC
|
||||
build_flags = ${stm_flash_drive.build_flags}
|
||||
-DSTM32F446_5VX -DVECT_TAB_OFFSET=0x8000
|
||||
-DUSBCON -DUSE_USBHOST_HS -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6 -DUSE_USB_HS_IN_FS -DUSBD_USE_CDC_MSC
|
||||
-DSTM32F446_5VX -DUSE_USB_HS_IN_FS
|
||||
-DUSE_USBHOST_HS -DUSBD_IRQ_PRIO=5
|
||||
-DUSBD_IRQ_SUBPRIO=6
|
||||
-DUSBD_USE_CDC_MSC
|
||||
|
||||
#
|
||||
# Lerdge base
|
||||
#
|
||||
[lerdge_common]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
extends = stm32_variant
|
||||
board = marlin_STM32F407ZGT6
|
||||
board_build.variant = MARLIN_LERDGE
|
||||
board_build.offset = 0x10000
|
||||
board_build.encrypt = firmware.bin
|
||||
extra_scripts = ${stm32f4_variant.extra_scripts}
|
||||
board_build.offset = 0x10000
|
||||
build_flags = ${stm32_variant.build_flags}
|
||||
-DSTM32F4 -DSTM32F4xx -DTARGET_STM32F4
|
||||
-DDISABLE_GENERIC_SERIALUSB -DARDUINO_ARCH_STM32 -DARDUINO_LERDGE
|
||||
-DHAL_SRAM_MODULE_ENABLED
|
||||
build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
|
||||
extra_scripts = ${stm32_variant.extra_scripts}
|
||||
buildroot/share/PlatformIO/scripts/lerdge.py
|
||||
build_flags = ${common_stm32.build_flags}
|
||||
-DSTM32F4 -DSTM32F4xx -DTARGET_STM32F4
|
||||
-DDISABLE_GENERIC_SERIALUSB -DARDUINO_ARCH_STM32 -DARDUINO_LERDGE
|
||||
-DHAL_SRAM_MODULE_ENABLED
|
||||
build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
|
||||
|
||||
#
|
||||
# Lerdge X
|
||||
@@ -339,38 +317,33 @@ build_flags = ${stm_flash_drive.build_flags} ${lerdge_common.build_flags}
|
||||
#
|
||||
[env:rumba32]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
build_flags = ${common_stm32.build_flags}
|
||||
-Os
|
||||
-DHAL_PCD_MODULE_ENABLED
|
||||
-DDISABLE_GENERIC_SERIALUSB
|
||||
-DHAL_UART_MODULE_ENABLED
|
||||
-DTIMER_SERIAL=TIM9
|
||||
extends = stm32_variant
|
||||
board = rumba32_f446ve
|
||||
upload_protocol = dfu
|
||||
monitor_speed = 500000
|
||||
board_build.core = stm32
|
||||
board_build.variant = MARLIN_F446VE
|
||||
board_build.offset = 0x0000
|
||||
extra_scripts = ${stm32f4_variant.extra_scripts}
|
||||
build_flags = ${stm32_variant.build_flags}
|
||||
-Os -DHAL_PCD_MODULE_ENABLED
|
||||
-DDISABLE_GENERIC_SERIALUSB
|
||||
-DHAL_UART_MODULE_ENABLED
|
||||
-DTIMER_SERIAL=TIM9
|
||||
monitor_speed = 500000
|
||||
upload_protocol = dfu
|
||||
|
||||
#
|
||||
# MKS Robin Pro V2
|
||||
#
|
||||
[env:mks_robin_pro2]
|
||||
platform = ${common_stm32.platform}
|
||||
platform_packages = ${stm_flash_drive.platform_packages}
|
||||
extends = common_stm32
|
||||
build_flags = ${stm_flash_drive.build_flags}
|
||||
board = genericSTM32F407VET6
|
||||
board_build.core = stm32
|
||||
board_build.variant = MARLIN_F4x7Vx
|
||||
board_build.offset = 0x0000
|
||||
platform = ${common_stm32.platform}
|
||||
extends = stm32_variant
|
||||
platform_packages = ${stm_flash_drive.platform_packages}
|
||||
board = genericSTM32F407VET6
|
||||
board_build.variant = MARLIN_F4x7Vx
|
||||
board_build.offset = 0x0000
|
||||
board_upload.offset_address = 0x08000000
|
||||
build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
|
||||
debug_tool = jlink
|
||||
upload_protocol = jlink
|
||||
extra_scripts = ${stm32f4_variant.extra_scripts}
|
||||
build_flags = ${stm_flash_drive.build_flags}
|
||||
build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC
|
||||
debug_tool = jlink
|
||||
upload_protocol = jlink
|
||||
|
||||
#
|
||||
# This SPI is used by Robin Nano V3
|
||||
@@ -382,34 +355,31 @@ build_flags = -DPIN_WIRE_SCL=PB6 -DPIN_WIRE_SDA=PB7
|
||||
# MKS Robin Nano V3
|
||||
#
|
||||
[env:mks_robin_nano_v3]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
build_flags = ${common_stm32.build_flags} ${stm32f4_I2C1.build_flags} -DHAL_PCD_MODULE_ENABLED -DUSBCON -DUSBD_USE_CDC
|
||||
board = marlin_STM32F407VGT6_CCM
|
||||
board_build.core = stm32
|
||||
board_build.variant = MARLIN_F4x7Vx
|
||||
board_build.rename = Robin_nano_v3.bin
|
||||
board_build.offset = 0xC000
|
||||
platform = ${common_stm32.platform}
|
||||
extends = stm32_variant
|
||||
board = marlin_STM32F407VGT6_CCM
|
||||
board_build.variant = MARLIN_F4x7Vx
|
||||
board_build.offset = 0xC000
|
||||
board_build.rename = Robin_nano_v3.bin
|
||||
board_upload.offset_address = 0x0800C000
|
||||
build_unflags = ${common_stm32.build_unflags}
|
||||
debug_tool = jlink
|
||||
upload_protocol = jlink
|
||||
extra_scripts = ${stm32f4_variant.extra_scripts}
|
||||
build_flags = ${stm32_variant.build_flags} ${stm32f4_I2C1.build_flags}
|
||||
-DHAL_PCD_MODULE_ENABLED
|
||||
debug_tool = jlink
|
||||
upload_protocol = jlink
|
||||
|
||||
#
|
||||
# MKS Robin Nano V3 with USB Flash Drive Support
|
||||
# Currently, using a STM32duino fork, until USB Host get merged
|
||||
#
|
||||
[env:mks_robin_nano_v3_usb_flash_drive]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = env:mks_robin_nano_v3
|
||||
platform_packages = ${stm_flash_drive.platform_packages}
|
||||
build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags}
|
||||
-DUSBCON
|
||||
-DUSE_USBHOST_HS
|
||||
-DUSBD_IRQ_PRIO=5
|
||||
-DUSBD_IRQ_SUBPRIO=6
|
||||
-DUSE_USB_HS_IN_FS
|
||||
-DUSBD_USE_CDC
|
||||
-DUSE_USBHOST_HS
|
||||
-DUSBD_IRQ_PRIO=5
|
||||
-DUSBD_IRQ_SUBPRIO=6
|
||||
-DUSE_USB_HS_IN_FS
|
||||
|
||||
#
|
||||
# MKS Robin Nano V3 with USB Flash Drive Support and Shared Media
|
||||
@@ -417,13 +387,6 @@ build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags}
|
||||
#
|
||||
[env:mks_robin_nano_v3_usb_flash_drive_msc]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = env:mks_robin_nano_v3
|
||||
platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-3.zip
|
||||
build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC
|
||||
build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags}
|
||||
-DUSBCON
|
||||
-DUSE_USBHOST_HS
|
||||
-DUSBD_IRQ_PRIO=5
|
||||
-DUSBD_IRQ_SUBPRIO=6
|
||||
-DUSE_USB_HS_IN_FS
|
||||
-DUSBD_USE_CDC_MSC
|
||||
extends = env:mks_robin_nano_v3_usb_flash_drive
|
||||
build_flags = ${env:mks_robin_nano_v3_usb_flash_drive}
|
||||
-DUSBD_USE_CDC_MSC
|
||||
|
||||
@@ -37,29 +37,3 @@ build_flags = ${common_stm32.build_flags} -DTIMER_SERIAL=TIM9
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
board = remram_v1
|
||||
build_flags = ${common_stm32.build_flags}
|
||||
|
||||
#
|
||||
# BigTreeTech SKR SE BX (STM32H743IIT6 ARM Cortex-M7)
|
||||
#
|
||||
[env:BTT_SKR_SE_BX]
|
||||
platform = ${common_stm32.platform}
|
||||
platform_packages = ${stm_flash_drive.platform_packages}
|
||||
extends = common_stm32
|
||||
board = marlin_BTT_SKR_SE_BX
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
|
||||
build_flags = ${common_stm32.build_flags}
|
||||
${stm_flash_drive.build_flags}
|
||||
-DUSE_USBHOST_HS
|
||||
-DUSE_USB_HS_IN_FS
|
||||
#-DUSBD_USE_CDC_MSC
|
||||
-DVECT_TAB_OFFSET=0x20000
|
||||
-DHAL_DMA2D_MODULE_ENABLED
|
||||
-DHAL_LTDC_MODULE_ENABLED
|
||||
-DHAL_SDRAM_MODULE_ENABLED
|
||||
-DHAL_QSPI_MODULE_ENABLED
|
||||
-DHAL_MDMA_MODULE_ENABLED
|
||||
-DHAL_SD_MODULE_ENABLED
|
||||
upload_protocol = cmsis-dap
|
||||
debug_tool = cmsis-dap
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
#
|
||||
# Marlin Firmware
|
||||
# PlatformIO Configuration File
|
||||
#
|
||||
|
||||
#################################
|
||||
#
|
||||
# STM32H7 Architecture
|
||||
#
|
||||
# Naming Example: STM32H743IIT6
|
||||
#
|
||||
# H : High Performance
|
||||
# 7 : Cortex M7 core
|
||||
# 43 : Line/Features
|
||||
# I : 176 pins
|
||||
# I : 2048KB Flash-memory
|
||||
# T : LQFP package
|
||||
# 6 : -40...85°C (7: ...105°C)
|
||||
#
|
||||
#################################
|
||||
|
||||
#
|
||||
# BigTreeTech SKR SE BX (STM32H743IIT6 ARM Cortex-M7)
|
||||
#
|
||||
[env:BTT_SKR_SE_BX]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = stm32_variant
|
||||
platform_packages = ${stm_flash_drive.platform_packages}
|
||||
board = marlin_BTT_SKR_SE_BX
|
||||
board_build.offset = 0x20000
|
||||
build_flags = ${stm32_variant.build_flags} ${stm_flash_drive.build_flags}
|
||||
-DUSE_USBHOST_HS
|
||||
-DUSE_USB_HS_IN_FS
|
||||
-DHAL_DMA2D_MODULE_ENABLED
|
||||
-DHAL_LTDC_MODULE_ENABLED
|
||||
-DHAL_SDRAM_MODULE_ENABLED
|
||||
-DHAL_QSPI_MODULE_ENABLED
|
||||
-DHAL_MDMA_MODULE_ENABLED
|
||||
-DHAL_SD_MODULE_ENABLED
|
||||
upload_protocol = cmsis-dap
|
||||
debug_tool = cmsis-dap
|
||||
@@ -23,11 +23,13 @@ extra_configs =
|
||||
ini/lpc176x.ini
|
||||
ini/native.ini
|
||||
ini/samd51.ini
|
||||
ini/stm32-common.ini
|
||||
ini/stm32f0.ini
|
||||
ini/stm32f1-maple.ini
|
||||
ini/stm32f1.ini
|
||||
ini/stm32f4.ini
|
||||
ini/stm32f7.ini
|
||||
ini/stm32h7.ini
|
||||
ini/teensy.ini
|
||||
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user