Skip to content

Commit 2945aa7

Browse files
committed
BTT SKR Pico
1 parent c361d28 commit 2945aa7

File tree

10 files changed

+224
-37
lines changed

10 files changed

+224
-37
lines changed

.github/workflows/test-builds.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ jobs:
3535
test-platform:
3636
# Base Environments
3737

38+
- SKR_Pico
39+
3840
- DUE
3941
- DUE_archim
4042
- esp32

Marlin/src/core/boards.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,7 @@
455455
//
456456

457457
#define BOARD_RP2040 6200 // Generic RP2040 Test board
458+
#define BOARD_BTT_SKR_PICO 6201 // BigTreeTech SKR Pico 1.x
458459

459460
//
460461
// Custom board

Marlin/src/pins/pins.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,8 @@
749749

750750
#elif MB(RP2040)
751751
#include "rp2040/pins_RP2040.h" // RP2040 env:RP2040
752+
#elif MB(BTT_SKR_PICO)
753+
#include "rp2040/pins_BTT_SKR_Pico.h" // RP2040 env:SKR_Pico env:SKR_Pico_UART
752754

753755
//
754756
// Custom board (with custom PIO env)

Marlin/src/pins/rp2040/env_validate.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/**
2+
* Marlin 3D Printer Firmware
3+
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4+
*
5+
* Based on Sprinter and grbl.
6+
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7+
*
8+
* This program is free software: you can redistribute it and/or modify
9+
* it under the terms of the GNU General Public License as published by
10+
* the Free Software Foundation, either version 3 of the License, or
11+
* (at your option) any later version.
12+
*
13+
* This program is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* GNU General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU General Public License
19+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
20+
*
21+
*/
22+
#pragma once
23+
24+
#if NOT_TARGET(__PLAT_RP2040__)
25+
#error "Oops! Make sure to build with environment 'RP2040'."
26+
#endif
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
/**
2+
* Marlin 3D Printer Firmware
3+
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4+
*
5+
* Based on Sprinter and grbl.
6+
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7+
*
8+
* This program is free software: you can redistribute it and/or modify
9+
* it under the terms of the GNU General Public License as published by
10+
* the Free Software Foundation, either version 3 of the License, or
11+
* (at your option) any later version.
12+
*
13+
* This program is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* GNU General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU General Public License
19+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
20+
*
21+
*/
22+
#pragma once
23+
24+
/**
25+
* BigTreeTech SKR Pico
26+
* https://github.com/bigtreetech/SKR-Pico
27+
*/
28+
29+
#include "env_validate.h"
30+
31+
#define BOARD_INFO_NAME "BTT SKR Pico"
32+
#define DEFAULT_MACHINE_NAME "BIQU 3D Printer"
33+
34+
#define USBCON
35+
36+
#ifndef MARLIN_EEPROM_SIZE
37+
#define MARLIN_EEPROM_SIZE 0x2000 // 8KB
38+
#endif
39+
40+
//
41+
// Servos
42+
//
43+
#define SERVO0_PIN 29
44+
45+
//
46+
// Limit Switches
47+
//
48+
#define X_DIAG_PIN 4
49+
#define Y_DIAG_PIN 3
50+
#define Z_DIAG_PIN 25 // probe:z_virtual_endstop
51+
52+
#define X_STOP_PIN X_DIAG_PIN
53+
#define Y_STOP_PIN Y_DIAG_PIN
54+
#define Z_STOP_PIN Z_DIAG_PIN
55+
56+
#ifndef FIL_RUNOUT_PIN
57+
#define FIL_RUNOUT_PIN 16 // E0-STOP
58+
#endif
59+
60+
#ifndef Z_MIN_PROBE_PIN
61+
#define Z_MIN_PROBE_PIN 22
62+
#endif
63+
64+
//
65+
// Steppers
66+
//
67+
#define X_STEP_PIN 11
68+
#define X_DIR_PIN 10
69+
#define X_ENABLE_PIN 12
70+
71+
#define Y_STEP_PIN 6
72+
#define Y_DIR_PIN 5
73+
#define Y_ENABLE_PIN 7
74+
75+
#define Z_STEP_PIN 19
76+
#define Z_DIR_PIN 28
77+
#define Z_ENABLE_PIN 2
78+
79+
#define E0_STEP_PIN 14
80+
#define E0_DIR_PIN 13
81+
#define E0_ENABLE_PIN 15
82+
83+
//
84+
// Temperature Sensors
85+
//
86+
#define TEMP_0_PIN 27 // Analog Input
87+
#define TEMP_BED_PIN 26 // Analog Input
88+
89+
//
90+
// Heaters / Fans
91+
//
92+
#define HEATER_0_PIN 23
93+
#define HEATER_BED_PIN 21
94+
95+
#define FAN_PIN 17
96+
#define FAN1_PIN 18
97+
98+
#if HAS_CUTTER
99+
#define SPINDLE_LASER_ENA_PIN 0
100+
#define SPINDLE_LASER_PWM_PIN 1
101+
#else
102+
#define FAN2_PIN 20
103+
#endif
104+
105+
//
106+
// Misc. Functions
107+
//
108+
#define NEOPIXEL_PIN 24
109+
110+
/**
111+
* TMC2208/TMC2209 stepper drivers
112+
*/
113+
#if HAS_TMC_UART
114+
/**
115+
* Hardware serial communication ports.
116+
* If undefined software serial is used according to the pins below
117+
*/
118+
//#define X_HARDWARE_SERIAL Serial1
119+
//#define X2_HARDWARE_SERIAL Serial1
120+
//#define Y_HARDWARE_SERIAL Serial1
121+
//#define Y2_HARDWARE_SERIAL Serial1
122+
//#define Z_HARDWARE_SERIAL MSerial1
123+
//#define Z2_HARDWARE_SERIAL Serial1
124+
//#define E0_HARDWARE_SERIAL Serial1
125+
//#define E1_HARDWARE_SERIAL Serial1
126+
//#define E2_HARDWARE_SERIAL Serial1
127+
//#define E3_HARDWARE_SERIAL Serial1
128+
//#define E4_HARDWARE_SERIAL Serial1
129+
130+
/**
131+
* Software serial
132+
*/
133+
#ifndef X_SERIAL_TX_PIN
134+
#define X_SERIAL_TX_PIN 8
135+
#endif
136+
#ifndef X_SERIAL_RX_PIN
137+
#define X_SERIAL_RX_PIN 9
138+
#endif
139+
#ifndef Y_SERIAL_TX_PIN
140+
#define Y_SERIAL_TX_PIN 8
141+
#endif
142+
#ifndef Y_SERIAL_RX_PIN
143+
#define Y_SERIAL_RX_PIN 9
144+
#endif
145+
#ifndef Z_SERIAL_TX_PIN
146+
#define Z_SERIAL_TX_PIN 8
147+
#endif
148+
#ifndef Z_SERIAL_RX_PIN
149+
#define Z_SERIAL_RX_PIN 9
150+
#endif
151+
#ifndef E0_SERIAL_TX_PIN
152+
#define E0_SERIAL_TX_PIN 8
153+
#endif
154+
#ifndef E0_SERIAL_RX_PIN
155+
#define E0_SERIAL_RX_PIN 9
156+
#endif
157+
#endif

Marlin/src/pins/rp2040/pins_RP2040.h

Lines changed: 8 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -21,37 +21,10 @@
2121
*/
2222
#pragma once
2323

24-
/**
25-
* Arduino Mega with RAMPS v1.4 (or v1.3) pin assignments
26-
*
27-
* Applies to the following boards:
28-
*
29-
* RAMPS_14_EFB (Hotend, Fan, Bed)
30-
* RAMPS_14_EEB (Hotend0, Hotend1, Bed)
31-
* RAMPS_14_EFF (Hotend, Fan0, Fan1)
32-
* RAMPS_14_EEF (Hotend0, Hotend1, Fan)
33-
* RAMPS_14_SF (Spindle, Controller Fan)
34-
*
35-
* RAMPS_13_EFB (Hotend, Fan, Bed)
36-
* RAMPS_13_EEB (Hotend0, Hotend1, Bed)
37-
* RAMPS_13_EFF (Hotend, Fan0, Fan1)
38-
* RAMPS_13_EEF (Hotend0, Hotend1, Fan)
39-
* RAMPS_13_SF (Spindle, Controller Fan)
40-
*
41-
* Other pins_MYBOARD.h files may override these defaults
42-
*
43-
* Differences between
44-
* RAMPS_13 | RAMPS_14
45-
* 7 | 11
46-
*/
24+
#include "env_validate.h"
4725

48-
#ifndef BOARD_INFO_NAME
49-
#define BOARD_INFO_NAME "RP2040 Test"
50-
#endif
51-
52-
#ifndef DEFAULT_MACHINE_NAME
53-
#define DEFAULT_MACHINE_NAME "RP2040 Test"
54-
#endif
26+
#define BOARD_INFO_NAME "RP2040 Test"
27+
#define DEFAULT_MACHINE_NAME "RP2040 Test"
5528

5629
#ifndef MARLIN_EEPROM_SIZE
5730
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB
@@ -66,13 +39,13 @@
6639
//
6740
// Limit Switches
6841
//
69-
#define X_MIN_PIN 13
70-
#define Y_MIN_PIN 3
71-
#define Z_MIN_PIN 2
42+
#define X_STOP_PIN 13
43+
#define Y_STOP_PIN 3
44+
#define Z_STOP_PIN 2
7245

7346
//
7447
// Steppers
75-
48+
//
7649
#define X_STEP_PIN 29
7750
#define X_DIR_PIN 29
7851
#define X_ENABLE_PIN 29
@@ -130,7 +103,7 @@
130103

131104
//
132105
// Heaters / Fans
133-
106+
//
134107
#define HEATER_0_PIN 24
135108

136109
// Non-specific are "EFB" (i.e., "EFBF" or "EFBE")

buildroot/tests/SKR_Pico

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Build tests for BTT SKR Pico
4+
#
5+
6+
# exit on first failure
7+
set -e
8+
9+
#
10+
# Build with the default configurations
11+
#
12+
restore_configs
13+
opt_set MOTHERBOARD BOARD_BTT_SKR_PICO
14+
exec_test $1 $2 "Default Configuration" "$3"
15+
16+
# clean up
17+
restore_configs

buildroot/tests/at90usb1286_cdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
#
3-
# Build tests for AT90USB1286 ARMED
3+
# Build tests for AT90USB1286 (CDC)
44
#
55

66
# exit on first failure

buildroot/tests/at90usb1286_dfu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
#
3-
# Build tests for AT90USB1286 ARMED
3+
# Build tests for AT90USB1286 (DFU)
44
#
55

66
# exit on first failure

ini/raspberrypi.ini

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,12 @@ lib_ignore = WiFi
1616
build_flags = ${common.build_flags} -D__PLAT_RP2040__ -Wno-expansion-to-defined
1717
#debug_tool = jlink
1818
#upload_protocol = jlink
19+
20+
#
21+
# BigTreeTech SKR Pico 1.x
22+
#
23+
[env:SKR_Pico]
24+
extends = env:RP2040
25+
26+
[env:SKR_Pico_UART]
27+
extends = env:SKR_Pico

0 commit comments

Comments
 (0)