Skip to content
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

mellow support #291

Open
wants to merge 20 commits into
base: v2.1.x
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions boards/mellow-fly-sht-36-pro/98-mellow-fly-sht-36-pro.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Mellow FLY-SHT 36 PRO
SUBSYSTEMS=="usb", ATTRS{idProduct}=="614e", ATTRS{idVendor}=="1d50", ATTRS{serial}=="mellow-fly-sht-36-pro", ACTION=="add", SYMLINK+="mellow-fly-sht-36-pro", RUN+="/home/pi/printer_data/config/RatOS/scripts/klipper-mcu-added.sh"

ACTION=="remove", ENV{DEVLINKS}=="/dev/mellow-fly-sht-36-pro"
35 changes: 35 additions & 0 deletions boards/mellow-fly-sht-36-pro/board-definition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"$schema": "../board-definition.schema.json",
"boardImageFileName": "board.webp",
"wireDiagramFileName": "wiring.drawio.svg",
"isToolboard": true,
"name": "FLY-SHT36-PRO",
"manufacturer": "Mellow",
"id": "mellow-fly-sht-36-pro",
"firmwareBinaryName": "firmware-mellow-fly-sht-36-pro.bin",
"compileScript": "compile.sh",
"flashScript": "flash.sh",
"flashInstructions": "After initial flashing, make sure the RST jumper is not inserted.",
"documentationLink": "https://os.ratrig.com/docs/boards/mellow/fly-sht-36",
"driverCount": 1,
"integratedDrivers": {
"extruder": "MELLOW-FLY-TMC5160"
},
"dfu": {
"flashDevice": "0483:df11",
"dfuBootImage": "dfubooting.png",
"instructions": [
"Add the jumper as shown in the picture",
"Connect the board via USB to the Raspberry Pi",
"Make sure the board is powered on",
"If the board was already connected and powered when you inserted the jumper, click the boot button on the board."
],
"hasBoot0Jumper": true
},
"ADXL345SPI": {
"cs_pin": "gpio9",
"hardware": {
"bus": "spi1"
}
}
}
Binary file added boards/mellow-fly-sht-36-pro/board.webp
Binary file not shown.
19 changes: 19 additions & 0 deletions boards/mellow-fly-sht-36-pro/compile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "ERROR: Please run as root"
exit
fi
cp -f /home/pi/printer_data/config/RatOS/boards/mellow-fly-sht-36-pro/firmware.config /home/pi/klipper/.config
pushd /home/pi/klipper || exit
make olddefconfig
make clean
make

if [ ! -d "/home/pi/printer_data/config/firmware_binaries" ]
then
mkdir /home/pi/printer_data/config/firmware_binaries
chown pi:pi /home/pi/printer_data/config/firmware_binaries
fi
cp -f /home/pi/klipper/out/klipper.bin /home/pi/printer_data/config/firmware_binaries/firmware-mellow-fly-sht-36-pro.bin
chown pi:pi /home/pi/printer_data/config/firmware_binaries/firmware-mellow-fly-sht-36-pro.bin
popd || exit
Binary file added boards/mellow-fly-sht-36-pro/dfubooting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 72 additions & 0 deletions boards/mellow-fly-sht-36-pro/firmware.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
CONFIG_LOW_LEVEL_OPTIONS=y
# CONFIG_MACH_AVR is not set
# CONFIG_MACH_ATSAM is not set
# CONFIG_MACH_ATSAMD is not set
# CONFIG_MACH_LPC176X is not set
# CONFIG_MACH_STM32 is not set
# CONFIG_MACH_HC32F460 is not set
CONFIG_MACH_RP2040=y
# CONFIG_MACH_PRU is not set
# CONFIG_MACH_AR100 is not set
# CONFIG_MACH_LINUX is not set
# CONFIG_MACH_SIMU is not set
CONFIG_BOARD_DIRECTORY="rp2040"
CONFIG_MCU="rp2040"
CONFIG_CLOCK_FREQ=12000000
CONFIG_USBSERIAL=y
CONFIG_FLASH_SIZE=0x200000
CONFIG_FLASH_BOOT_ADDRESS=0x10000100
CONFIG_RAM_START=0x20000000
CONFIG_RAM_SIZE=0x42000
CONFIG_STACK_SIZE=512
CONFIG_FLASH_APPLICATION_ADDRESS=0x10004000
CONFIG_RP2040_SELECT=y
CONFIG_RP2040_HAVE_BOOTLOADER=y
# CONFIG_RP2040_FLASH_START_0100 is not set
CONFIG_RP2040_FLASH_START_4000=y
CONFIG_RP2040_STAGE2_FILE="boot2_w25q080.S"
CONFIG_RP2040_STAGE2_CLKDIV=2
CONFIG_RP2040_USB=y
# CONFIG_RP2040_SERIAL_UART0_PINS_0_1 is not set
# CONFIG_RP2040_SERIAL_UART0_PINS_12_13 is not set
# CONFIG_RP2040_SERIAL_UART0_PINS_16_17 is not set
# CONFIG_RP2040_SERIAL_UART0_PINS_28_29 is not set
# CONFIG_RP2040_SERIAL_UART1_PINS_4_5 is not set
# CONFIG_RP2040_SERIAL_UART1_PINS_8_9 is not set
# CONFIG_RP2040_SERIAL_UART1_PINS_20_21 is not set
# CONFIG_RP2040_SERIAL_UART1_PINS_24_25 is not set
# CONFIG_RP2040_CANBUS is not set
# CONFIG_RP2040_USBCANBUS is not set
CONFIG_RP2040_CANBUS_GPIO_RX=4
CONFIG_RP2040_CANBUS_GPIO_TX=5
CONFIG_USB=y
CONFIG_USB_VENDOR_ID=0x1d50
CONFIG_USB_DEVICE_ID=0x614e
CONFIG_USB_SERIAL_NUMBER_CHIPID=y
CONFIG_USB_SERIAL_NUMBER="12345"

#
# USB ids
#
# end of USB ids

CONFIG_WANT_GPIO_BITBANGING=y
CONFIG_WANT_DISPLAYS=y
CONFIG_WANT_SENSORS=y
CONFIG_WANT_LIS2DW=y
CONFIG_WANT_LDC1612=y
CONFIG_WANT_SOFTWARE_I2C=y
CONFIG_WANT_SOFTWARE_SPI=y
CONFIG_NEED_SENSOR_BULK=y
CONFIG_CANBUS_FREQUENCY=1000000
CONFIG_INITIAL_PINS=""
CONFIG_HAVE_GPIO=y
CONFIG_HAVE_GPIO_ADC=y
CONFIG_HAVE_GPIO_SPI=y
CONFIG_HAVE_GPIO_I2C=y
CONFIG_HAVE_GPIO_HARD_PWM=y
CONFIG_HAVE_STRICT_TIMING=y
CONFIG_HAVE_CHIPID=y
CONFIG_HAVE_STEPPER_BOTH_EDGE=y
CONFIG_HAVE_BOOTLOADER_REQUEST=y
CONFIG_INLINE_STEPPER_HACK=y
9 changes: 9 additions & 0 deletions boards/mellow-fly-sht-36-pro/flash.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
MCU=/dev/mellow-fly-sht-36-pro
if [ "$EUID" -ne 0 ]
then echo "ERROR: Please run as root"
exit
fi
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
FLASH_SCRIPT=$(realpath "$SCRIPT_DIR/../../scripts/flash-path.sh")
$FLASH_SCRIPT $MCU
11 changes: 11 additions & 0 deletions boards/mellow-fly-sht-36-pro/make-and-flash-mcu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

if [ "$EUID" -ne 0 ]
then echo "ERROR: Please run as root"
exit
fi

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

"$SCRIPT_DIR"/compile.sh
"$SCRIPT_DIR"/flash.sh
36 changes: 36 additions & 0 deletions boards/mellow-fly-sht-36-pro/toolboard-config.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# WARNING. DO NOT EDIT THIS FILE.
# To override settings from this file, you can copy and paste the relevant
# sections into your printer.cfg and change it there.
# WARNING: it is NOT recommended to override board_pins aliases,
# use the boards pin names directly in your printer.cfg instead.
# Look up the pins you need in the boards pinout diagram.

[board_pins mellow-fly-sht-36]
mcu: toolboard
aliases:
x_endstop_pin=gpio21,
e_step_pin=gpio23, e_dir_pin=gpio24, e_enable_pin=gpio25, e_uart_pin=20, e_diag_pin=gpio22, e_heater_pin=gpio8, e_sensor_pin=gpio26,
thermocouple_cs=gpio1, thermocouple_miso=gpio12, thermocouple_mosi=gpio11, thermocouple_clk=gpio10,
# accel
adxl345_cs_pin=gpio9, adxl345_miso=gpio12, adxl345_mosi=gpio11, adxl345_clk=gpio10,
# leveling
bltouch_sensor_pin=gpio3, bltouch_control_pin=gpio7,
probe_pin=gpio7,
# fans
fan_part_cooling_pin=gpio15,
fan_toolhead_cooling_pin=gpio14

[mcu toolboard]
serial: /dev/mellow-fly-sht-36-pro

[adxl345 toolboard]
cs_pin: toolboard:adxl345_cs_pin
spi_bus: spi1

[temperature_sensor toolboard]
sensor_type: temperature_mcu
sensor_mcu: toolboard

# The fly sht's use a 1000 ohm pullup resistor on the thermistor ports.
[extruder]
pullup_resistor: 1000
4 changes: 4 additions & 0 deletions boards/mellow-fly-sht-36-pro/wiring.drawio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Mellow Super 8 Pro w/ STM32H723
SUBSYSTEMS=="usb", ATTRS{idProduct}=="614e", ATTRS{idVendor}=="1d50", ATTRS{serial}=="mellow-super-8-pro-h723", ACTION=="add", SYMLINK+="mellow-super-8-pro-h723", RUN+="/home/pi/printer_data/config/RatOS/scripts/klipper-mcu-added.sh"

ACTION=="remove", ENV{DEVLINKS}=="/dev/mellow-super-8-pro-h723"
148 changes: 148 additions & 0 deletions boards/mellow-super-8-pro-h723/board-definition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
{
"$schema": "../board-definition.schema.json",
"boardImageFileName": "board.webp",
"manualFileName": "manual.pdf",
"wireDiagramFileName": "wiring.drawio.svg",
"name": "Mellow Super 8 Pro",
"manufacturer": "Mellow",
"id": "mellow-super-8-pro-h723",
"firmwareBinaryName": "firmware-mellow-super-8-pro-h723.bin",
"compileScript": "compile.sh",
"flashScript": "flash.sh",
"flashInstructions": "Flashing only works if the SD card slot on the Mellow Super 8 Pro is empty.",
"documentationLink": "https://os.ratrig.com/docs/boards/mellow/super-8-pro-h723",
"driverCount": 8,
"driverVoltages": [24, 36, 48, 56],
"dfu": {
"flashDevice": "0483:df11",
"dfuBootImage": "dfubooting.drawio.png",
"instructions": [
"Connect the board via USB to the Raspberry Pi",
"Add the jumper to BT0/3.3V as shown in the picture",
"Make sure the board is powered on",
"If the board was already connected and powered when you inserted the jumper, click the reset button on the board."
],
"hasBoot0Jumper": true
},
"motorSlots": {
"MOTOR0": {
"title": "MOTOR 0",
"enable_pin": "PF11",
"step_pin": "PE2",
"dir_pin": "PC5",
"uart_pin": "PC4",
"cs_pin": "PC4",
"diag_pin": "PG12",
"endstop_pin": "PG12",
"spi_software_mosi_pin": "PB5",
"spi_software_miso_pin": "PB4",
"spi_software_sclk_pin": "PB3"
},
"MOTOR1": {
"title": "MOTOR 1",
"enable_pin": "PF14",
"step_pin": "PE3",
"dir_pin": "PF13",
"uart_pin": "PF12",
"cs_pin": "PF12",
"diag_pin": "PG11",
"endstop_pin": "PG11",
"spi_software_mosi_pin": "PB5",
"spi_software_miso_pin": "PB4",
"spi_software_sclk_pin": "PB3"
},
"MOTOR2": {
"title": "MOTOR 2",
"enable_pin": "PG1",
"step_pin": "PE4",
"dir_pin": "PG0",
"uart_pin": "PF15",
"cs_pin": "PF15",
"diag_pin": "PG10",
"endstop_pin": "PG10",
"spi_software_mosi_pin": "PB5",
"spi_software_miso_pin": "PB4",
"spi_software_sclk_pin": "PB3"
},
"MOTOR3": {
"title": "MOTOR 3",
"enable_pin": "PE9",
"step_pin": "PE14",
"dir_pin": "PE8",
"uart_pin": "PE7",
"cs_pin": "PE7",
"diag_pin": "PG9",
"endstop_pin": "PG9",
"spi_software_mosi_pin": "PB5",
"spi_software_miso_pin": "PB4",
"spi_software_sclk_pin": "PB3"
},
"MOTOR4": {
"title": "MOTOR 4",
"enable_pin": "PF2",
"step_pin": "PE15",
"dir_pin": "PE11",
"uart_pin": "PF10",
"cs_pin": "PF10",
"diag_pin": "PD7",
"endstop_pin": "PD7",
"spi_software_mosi_pin": "PB5",
"spi_software_miso_pin": "PB4",
"spi_software_sclk_pin": "PB3"
},
"MOTOR5": {
"title": "MOTOR 5",
"enable_pin": "PC15",
"step_pin": "PE1",
"dir_pin": "PF0",
"uart_pin": "PF1",
"cs_pin": "PF1",
"diag_pin": "PD6",
"endstop_pin": "PD6",
"spi_software_mosi_pin": "PB5",
"spi_software_miso_pin": "PB4",
"spi_software_sclk_pin": "PB3"
},
"MOTOR6": {
"title": "MOTOR 6",
"enable_pin": "PG4",
"step_pin": "PE0",
"dir_pin": "PG3",
"uart_pin": "PG2",
"cs_pin": "PG2",
"diag_pin": "PA8",
"endstop_pin": "PA8",
"spi_software_mosi_pin": "PB5",
"spi_software_miso_pin": "PB4",
"spi_software_sclk_pin": "PB3"
},
"MOTOR7": {
"title": "MOTOR 7",
"enable_pin": "PG7",
"step_pin": "PE6",
"dir_pin": "PG6",
"uart_pin": "PG5",
"cs_pin": "PG5",
"diag_pin": "PF8",
"endstop_pin": "PF8",
"spi_software_mosi_pin": "PB5",
"spi_software_miso_pin": "PB4",
"spi_software_sclk_pin": "PB3"
}
},
"ADXL345SPI": {
"cs_pin": "PD0",
"software": {
"sclk": "PD3",
"mosi": "PD5",
"miso": "PD4"
}
},
"stepperSPI": {
"software": {
"sclk": "PB3",
"mosi": "PB5",
"miso": "PB4"
}
}
}
Binary file added boards/mellow-super-8-pro-h723/board.webp
Binary file not shown.
22 changes: 22 additions & 0 deletions boards/mellow-super-8-pro-h723/compile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

if [ "$EUID" -ne 0 ]
then echo "ERROR: Please run as root"
exit
fi

cp -f /home/pi/printer_data/config/RatOS/boards/mellow-super-8-pro-h723/firmware.config /home/pi/klipper/.config
pushd /home/pi/klipper || exit
make olddefconfig
make clean
make

if [ ! -d "/home/pi/printer_data/config/firmware_binaries" ]
then
mkdir /home/pi/printer_data/config/firmware_binaries
chown pi:pi /home/pi/printer_data/config/firmware_binaries
fi
cp -f /home/pi/klipper/out/klipper.bin /home/pi/printer_data/config/firmware_binaries/firmware-mellow-super-8-pro-h723.bin
chown pi:pi /home/pi/printer_data/config/firmware_binaries/firmware-mellow-super-8-pro-h723.bin

popd || exit
Loading