Skip to content

Commit f20c07a

Browse files
committed
✨ BTT SKR Pico
1 parent 03319b0 commit f20c07a

File tree

6 files changed

+212
-0
lines changed

6 files changed

+212
-0
lines changed

Marlin/src/core/boards.h

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

458458
#define BOARD_RP2040 6200 // Generic RP2040 Test board
459+
#define BOARD_BTT_SKR_PICO 6201 // BigTreeTech SKR Pico 1.x
459460

460461
//
461462
// Custom board

Marlin/src/pins/pins.h

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

752752
#elif MB(RP2040)
753753
#include "rp2040/pins_RP2040.h" // RP2040 env:RP2040
754+
#elif MB(BTT_SKR_PICO)
755+
#include "rp2040/pins_BTT_SKR_Pico.h" // RP2040 env:SKR_Pico env:SKR_Pico_UART
754756

755757
//
756758
// 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 target platform '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

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

ini/raspberrypi.ini

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

0 commit comments

Comments
 (0)