MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.19k stars 19.21k forks source link

[FR] Teensy 4.0 Support #16666

Closed limitz closed 3 years ago

limitz commented 4 years ago

Hey!

I thought it might be nice to try and get the new Teensy 4.0 to run Marlin. I've already started a branch, this is a shoutout for collaboration if anyone is thinking about doing the same?

I started with the the teensy35_36 HAL and worked my way up from there. It's still in early stages (it builds but I need to make a test setup). Any advice, help or peer review is appreciated.

I have a branch here: https://github.com/limitz/Marlin/tree/teensy40

teemuatlut commented 4 years ago

You should start your work from the bugfix branch and not the release.

limitz commented 4 years ago

Thanks, just did.

kursatu commented 4 years ago

@limitz What is the status of the teensy 4.0 branch? I see some work being done, I may contribute, waiting on a ramps 1.5 to arrive so that I can clone and try your branch. What is the board you use to with teensy 4.0, is it some ramps board and a shield adapter? Given that teensy 4.0 is so powerful and has all the pins/hw/timers/interrupts ready to use , it would be quite fun to build Marlin on it.

limitz commented 4 years ago

@kursatu I was just breadboarding it with some external mosfets and tmc5160s, don't think you need much more than that. However, I got lost in some preprocessor hell because several dependencies of marlin don't use the marlin HAL (obviously) and the arduino port for teensy didn't work for them (u8g2 for instance). Also tried to fix some PROGMEM stuff instead of just defining it as NOP, but that just opens another can of worms with bugs introduced by the fact that a lot of HALs "fix" pgm compilation errors by just defining it empty (serial writes expecting progmem string called with strings allocated on heap or stack. In the meantime I got an ultratronic board and put this project on the backburner, because I think that the way marlin is structured now is flawed and would rather spend time on fixing those flaws than working around those flaws to get the teensy working :)

Hedda commented 4 years ago

FYI, just submitted a feature request #17973 for Teensy 4.1 board support in Marlin

Teensy 4.1 was just released today and compared to Teensy 4.0 the biggest hardware news with Teensy 4.1 is a MicroSD-card slot, more I/O pins, and integrated 10/100 Mbit Ethernet PHY (physical layer) support. The Ethernet port also has IEEE1588 precision packet timestamping.

https://www.cnx-software.com/2020/05/12/teensy-4-1-board-gets-longer-for-ethernet-microsd-slot-and-more-gpios/

About Teensy 4.1's new features: https://pjrc.com/teensy-4-1-released/

Teensy 4.1 product page: https://pjrc.com/store/teensy41.html

Teensy 4.1 Arduino compatible board is powered by the same NXP i.MX RT1062 Cortex-M7 crossover processor clocked at 600 MHz as Teensy 4.0, ( https://www.nxp.com/imxrt1060 ), however, Teensy 4.1 design is about double in length in order to add a 10/100 Mbit Ethernet PHY, a MicroSD card slot, and offer more I/Os.

Teensy 4.1 specifications:

The software is mostly software compatible with Teensy 4.0, and can also be programmed in Arduino IDE using Teensyduino software add-on.

The bottom side of Teensy 4.1 has locations to solder 2 memory chips as optional memory expansion. Footprints are for 2x extra QSPI chips such as flash or 8MB PSRAM chip. The smaller location is meant for a PSRAM chip. The larger location is intended for flash memory.

PS: I have no direct or indirect affiliation with this or any of its resellers, (I'm just a hobby enthusiast).

github-actions[bot] commented 4 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label / comment or this will be closed in 5 days.

Hedda commented 4 years ago

@limitz and @kursatu What is the status of your Teensy 4.0 branches?

CrazzyFrenchDude commented 4 years ago

Hello to everyone, I am Crazzy French Dude, from France! Nice to be here! Actually developing a BoB named "PeeNaPle" for Teensy 4.1 with the help of some from the Open Pnp community. Not much of a difference with 3D printers, cartesian machines! This board is modular and comes with lots of extension boards and adaptors so you can use your standar and favorite stepper motor driver, power switch, relay etc with it! I am actually seeking serious developers to try to port Marlin to it and any supported Gerber controlling firmware! This project will be Open Hardware and Open Software, If any of you is interested feel free to ask any further information! Thanks much! CFD You can have a glance at the pict below All Fab files available here https://gitlab.com/CrazzyFrenchDude/peenaple_v1.1b/ Screenshot 2020-08-11 at 23 12 35

Hedda commented 4 years ago

@CrazzyFrenchDude That board design looks like it has some great potential! Please be sure to also post in #17973 too -> https://github.com/MarlinFirmware/Marlin/issues/17973

Since integrated ports for stepper-motors and MOSFETs directly on that board it will need something like the RAMPS_1.4.4 or the upcoming RAMPS 1.7 (which is the latest stepper motor shield for 32-bit boards being worked on by MrAlvin and the RepRap community), same has has to be done with the [Re-ARM] controller board (https://reprap.org/wiki/Re-ARM) (which is an open-source hardware 32-bit board by the RepRap community). By the way, Biqu also makes as sell popular closed sourced BigTreeTech branded RAMPS shields in the form of RAMPS 1.6 and RAMPS_1.5

Are you planning on getting any RAMPS yourself to see if can fit pins designed so could work as a plugin shield without wires? For example, checkout how RAMPS_1.4.4 is fitted to plug-into the Re-ARM board here -> https://reprap.org/wiki/File:RAMPS144-02.JPG

Pinout for use with RAMPS 1.4 /RAMPS_1.4.4 is found here -> https://reprap.org/wiki/Re-ARM#Pinout_when_used_with_RAMPS1.4

One idea with that comes to mind is that IMHO you should really think about for the 3D-printing community with your board is that it could be awesome to aim at making an open hardware solution that can compete with the most popular closed sourced 3D-printer hardware boards, like the newest BTT SKR V1.4 (all-in-one board with plug-in stepper motors) or BigTreeTech SKR Mini E3 V2.0 (all-in-one board with embedded stepper motors) boards by Biqu.

Wondering if you are planning on manufacturing small batches and selling boards via sites like Tindie, Crowd Supply, or similar?

CrazzyFrenchDude commented 4 years ago

@CrazzyFrenchDude That board design looks like it has some great potential! Please be sure to also post in #17973 too -> #17973

Since integrated ports for stepper-motors and MOSFETs directly on that board it will need something like the RAMPS_1.4.4 or the upcoming RAMPS 1.7 (which is the latest stepper motor shield for 32-bit boards being worked on by MrAlvin and the RepRap community), same has has to be done with the [Re-ARM] controller board (https://reprap.org/wiki/Re-ARM) (which is an open-source hardware 32-bit board by the RepRap community). By the way, Biqu also makes as sell popular closed sourced BigTreeTech branded RAMPS shields in the form of RAMPS 1.6 and RAMPS_1.5

Are you planning on getting any RAMPS yourself to see if can fit pins designed so could work as a plugin shield without wires? For example, checkout how RAMPS_1.4.4 is fitted to plug-into the Re-ARM board here -> https://reprap.org/wiki/File:RAMPS144-02.JPG

Pinout for use with RAMPS 1.4 /RAMPS_1.4.4 is found here -> https://reprap.org/wiki/Re-ARM#Pinout_when_used_with_RAMPS1.4

One idea with that comes to mind is that IMHO you should really think about for the 3D-printing community with your board is that it could be awesome to aim at making an open hardware solution that can compete with the most popular closed sourced 3D-printer hardware boards, like the newest BTT SKR V1.4 (all-in-one board with plug-in stepper motors) or BigTreeTech SKR Mini E3 V2.0 (all-in-one board with embedded stepper motors) boards by Biqu.

Wondering if you are planning on manufacturing small batches and selling boards via sites like Tindie, Crowd Supply, or similar?

Hello Heda and thanks much for this warm welcome of the PeeNaPle bob! As a matter of fact, this board do not have any stepper drivers or power Mosfet directly on it! This is what makes it modular! Let's say you have a set of your favourite TMC2208 we got you covered! Just plug your driver on the daughter board, plug it to PeeNaPle, set your jumpers and you good to go, same as if you would with a BTT. The reason why I came to this design is sometimes, in the Open Pnp community we need beefy drivers for X and Y Axis, so I have developed a strong and reliable driver for those using big stepper driver in the CnC environment, no need to have those big boxes! If you need more steppers, just plug in the extension board and off you go, you need Wifi, sure, use the UEXT port. This board makes it easy for you build your controller with exactly and only what you need, it has an eco system ready extension package in development, and can't wait to see what extension the makers will build for it as well! Actually in testing phase I am. planning for mass production so It will the coast at a very low entry point what would get the makers interest tick! The only thing I haven't done yet is work on any Firmware. But as you suggested it is good for Open Pnp and for 3D printing as well!

limitz commented 4 years ago

@limitz and @kursatu What is the status of your Teensy 4.0 branches?

I have since switched to ESP32 as my MCU of choice and am not planning to proceed with any Teensy related development.

CrazzyFrenchDude commented 4 years ago

@limitz and @kursatu What is the status of your Teensy 4.0 branches?

I have since switched to ESP32 as my MCU of choice and am not planning to proceed with any Teensy related development.

ok then that's a pity

Gamester17 commented 3 years ago

FYI, it looks like Teensy 4.1 (and Teensy 4.0) support has now been merged via https://github.com/MarlinFirmware/Marlin/pull/19311 via PR from @bilsef

Marlin Firmware bugfix-2.0.x branch README.md now specifically list these as supported controller boards:

https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.0.x/README.md

Teensy 4.0 / 4.1 boards processor speed flash sram logic fpu
Teensy 4.0 IMXRT1062DVL6A ARM-Cortex M7 600MHz 1M 2M 3.3V yes
Teensy 4.1 IMXRT1062DVJ6A ARM-Cortex M7 600MHz 1M 2M 3.3V yes

Teensy 4.x is also supported in MarlinFirmware stable release branch but the description in the readme file is not as good:

https://github.com/MarlinFirmware/Marlin/blob/2.0.x/README.md

Gamester17 commented 3 years ago

Another FYI, just read about newly announced "iMX RT1064 uCOM" board from Embedded Artists so submitted a feature request:

https://github.com/MarlinFirmware/Marlin/issues/19749

Maybe depending on its price when general availability it might be an option for those looking at developing BoBs for Teensy 4.1

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.