Skip to content

Support Makerbase MKSTHR36 and MKSTHR42 Boards #2819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
462 changes: 462 additions & 0 deletions boards.txt

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions package/package_pico_index.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,12 @@
{
"name": "iLabs Challenger 2350 BConnect"
},
{
"name": "Makerbase MKS THR36"
},
{
"name": "Makerbase MKS THR42"
},
{
"name": "Melopero Cookie RP2040"
},
Expand Down
55 changes: 55 additions & 0 deletions tools/json/mksthr36.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x2E8A",
"usb_pid": "0x000A"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-DARDUINO_MAKERBASE_MKSTHR36 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250 ",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
],
[
"0x2E8A",
"0x000A"
]
],
"mcu": "rp2040",
"variant": "mksthr36"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "MKS THR36",
"upload": {
"maximum_ram_size": 262144,
"maximum_size": 1048576,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"blackmagic",
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "Makerbase"
}
55 changes: 55 additions & 0 deletions tools/json/mksthr42.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x2E8A",
"usb_pid": "0x000A"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-DARDUINO_MAKERBASE_MKSTHR42 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250 ",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
],
[
"0x2E8A",
"0x000A"
]
],
"mcu": "rp2040",
"variant": "mksthr42"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "MKS THR42",
"upload": {
"maximum_ram_size": 262144,
"maximum_size": 1048576,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"blackmagic",
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "Makerbase"
}
4 changes: 4 additions & 0 deletions tools/makeboards.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,10 @@ def MakeBoardJSON(name, chip, vendor_name, product_name, vid, pid, pwr, boarddef
MakeBoard("challenger_2350_wifi6_ble5", "rp2350", "iLabs", "Challenger 2350 WiFi/BLE", "0x2e8a", "0x109a", 500, "CHALLENGER_2350_WIFI_BLE_RP2350", 8, 8, "none")
MakeBoard("challenger_2350_bconnect", "rp2350", "iLabs", "Challenger 2350 BConnect", "0x2e8a", "0x109b", 500, "CHALLENGER_2350_BCONNECT_RP2350", 8, 8, "none")

# Makerbase
MakeBoard("mksthr36", "rp2040", "Makerbase", "MKS THR36", "0x2e8a", "0x000a", 250, "MAKERBASE_MKSTHR36", 1, 0, "boot2_w25q080_2_padded_checksum")
MakeBoard("mksthr42", "rp2040", "Makerbase", "MKS THR42", "0x2e8a", "0x000a", 250, "MAKERBASE_MKSTHR42", 1, 0, "boot2_w25q080_2_padded_checksum")

# Melopero
MakeBoard("melopero_cookie_rp2040", "rp2040", "Melopero", "Cookie RP2040", "0x2e8a", "0x1011", 250, "MELOPERO_COOKIE_RP2040", 8, 0, "boot2_w25q080_2_padded_checksum")
MakeBoard("melopero_shake_rp2040", "rp2040", "Melopero", "Shake RP2040", "0x2e8a", "0x1005", 250, "MELOPERO_SHAKE_RP2040", 16, 0, "boot2_w25q080_2_padded_checksum")
Expand Down
58 changes: 58 additions & 0 deletions variants/mksthr36/pins_arduino.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#pragma once

// Pin definitions taken from:
// https://datasheets.raspberrypi.org/pico/pico-datasheet.pdf

#define PIN_HE0 (0u)

#define PIN_FAN0 (1u)
#define PIN_FAN1 (2u)
#define PIN_FAN2 (3u)

#define PIN_E0_DIR (4u)
#define PIN_E0_STEP (5u)

#define PIN_SERIAL1_TX (6u)
#define PIN_E0_UART (6u)
#define PIN_SERIAL1_RX (31u)
#define PIN_E0_DIAG (7u)
#define PIN_E0_EN (10u)

#define PIN_CAN_RX (8u)
#define PIN_CAN_TX (9u)
#define PIN_SERIAL2_TX (8u)
#define PIN_SERIAL2_RX (9u)

#define PIN_3D_TOUCH (11u)

//SPI
#define PIN_SPI1_MISO (12u)
#define PIN_SPI1_MOSI (15u)
#define PIN_SPI1_SCK (14u)
#define PIN_SPI1_SS (13u)

#define PIN_SPI0_MISO (16u)
#define PIN_SPI0_MOSI (19u)
#define PIN_SPI0_SCK (18u)
#define PIN_SPI0_SS (17u)

#define PIN_NEOPIXEL (20u)
#define PIN_ZPLUS (21u)

// Wire
#define PIN_WIRE0_SDA (22u)
#define PIN_WIRE0_SCL (23u)
#define PIN_I2C_SDA (22u)
#define PIN_I2C_SCL (23u)

#define PIN_IO24 (24u)
#define PIN_IO25 (25u)

#define PIN_TH0 (26u)
#define PIN_IPO29 (29u)

#define SERIAL_HOWMANY (3u)
#define SPI_HOWMANY (2u)
#define WIRE_HOWMANY (1u)

#include "../generic/common.h"
58 changes: 58 additions & 0 deletions variants/mksthr42/pins_arduino.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#pragma once

// Pin definitions taken from:
// https://datasheets.raspberrypi.org/pico/pico-datasheet.pdf

#define PIN_HE0 (0u)

#define PIN_FAN0 (1u)
#define PIN_FAN1 (2u)
#define PIN_FAN2 (3u)

#define PIN_E0_DIR (4u)
#define PIN_E0_STEP (5u)

#define PIN_SERIAL1_TX (6u)
#define PIN_E0_UART (6u)
#define PIN_SERIAL1_RX (31u)
#define PIN_E0_DIAG (7u)
#define PIN_E0_EN (10u)

#define PIN_CAN_RX (8u)
#define PIN_CAN_TX (9u)
#define PIN_SERIAL2_TX (8u)
#define PIN_SERIAL2_RX (9u)

#define PIN_3D_TOUCH (11u)

//SPI
#define PIN_SPI1_MISO (12u)
#define PIN_SPI1_MOSI (15u)
#define PIN_SPI1_SCK (14u)
#define PIN_SPI1_SS (13u)

#define PIN_SPI0_MISO (16u)
#define PIN_SPI0_MOSI (19u)
#define PIN_SPI0_SCK (18u)
#define PIN_SPI0_SS (17u)

#define PIN_NEOPIXEL (20u)
#define PIN_ZPLUS (21u)

// Wire
#define PIN_WIRE0_SDA (22u)
#define PIN_WIRE0_SCL (23u)
#define PIN_I2C_SDA (22u)
#define PIN_I2C_SCL (23u)

#define PIN_IO24 (24u)
#define PIN_IO25 (25u)

#define PIN_TH0 (26u)
#define PIN_IPO29 (29u)

#define SERIAL_HOWMANY (3u)
#define SPI_HOWMANY (2u)
#define WIRE_HOWMANY (1u)

#include "../generic/common.h"