Minimal Marlin (Otherwise Known as It Compiles)

A project log for Cricut Hacking

Putting Marlin 2.x on the Cricut Expression because, well, why not? Also, some reverse engineering on CRV001

J.C. NelsonJ.C. Nelson 09/29/2022 at 01:550 Comments

The project picture for this pretty much gives away that I have the LCD working (and in fact, a bunch of this little machine functioning) but I'm entering logs pretty much in the order I tackled problems. I had a bootloader that no longer punched me in the face each time I tried to update (it's in the Files section if you want to pick it up). 

Next, I cloned a fresh version of Marlin. There was already an atMega1281 environment, though there were a few problems, and I did the basics of adding a new "board" to Marlin - tacked in a board number, added it to pins.h, and cloned a pins file from an existing 1281 board.

And I faked pretty much ALL the pins. The goal was to get SOMETHING compiling and then move on from there. I did a lot of *bad* things to get it compile, but soon enough it did, and I could hook up a serial monitor and get a view with PINS debugging.

BTW, at this point, I could already see the signs that something was fundamentally wrong in Marlin's fastio, but I didn't know what, or what to do about it.I had a Marlin of sorts running and that was a good foundation.

How did I know we had a problem coming? Because I was fairly certain what the endstop pin was for the X axis, and in Marlin it always showed as open, pin watch didn't show changes, but in test arduino sketches, I could absolutely (correctly) read the endstop.

I set it aside as a problem to tackle next, committed the bare environment bugs and all, and moved on.