Close

Easier Compiling, at a Cost

A project log for Monoprice Mini Marlin 2.0 Support

Getting Marlin to run on the Monoprice Mini/Malyan M200.

jc-nelsonJ.C. Nelson 05/31/2019 at 15:590 Comments

So many people have had difficulty compiling due to the fluid nature of the ST Arduino core, difficulty installing supported boards, etc, that I took some time out to look into how to make it easier. Arduino supports a concept called "Portable" wherein an install, all of its packages, sketches, temp data, etc, live in a folder, appropriately named "Portable" under the Arduino folder.

One look at this and I knew we had the key to allowing others to compile.

The cost? Some time, some download effort, and being locked onto a single version of ST's arduino core. Obviously the portable install will need to be updated when HardwareTimer libraries are added, etc, but a click-to-compile solution seemed possible.

To do this, I set up a new, clean laptop. My dev machines have git enlistments, half a dozen (really) copies of Marlin in different states, are symlinked together so I can use a git repo as my Arduino Core without copying things over--all the usual stuff.

To simulate someone else building, it had to start from scratch. I had a few problems and wound up downloading an hourly build of Arduino (in a step I no longer think was necessary), but finally got to the point where i could set the options correctly, click, and compile.

It's unlikely Hackaday wants to host a half-gig file for me, so I shared it on OneDrive.

Arduino Portable for Windows: https://1drv.ms/u/s!AjuNQlXUvQuaq-45AF_Nwk7l9XIhag

To use this, download the portable install and unzip it.

Make sure you configure your settings correctly - there's no way I know of to set the IDE options in a project or I would already have done it.

Obviously if you're compiling for a V2, you'd choose V2. Be careful! Some black (early run) V2s use an STM32F103. If your V2 is horrendously loud, uses the 46.5 steps per mm, and has a 103 chip under the hood, choose "V1" in spite of it.

One thing I'm still playing with - on my machine I have an upload option called "copy to file" which copies to a drive, which is what the Mini requires. I may add this in to the portable, with the understanding that since the Arduino IDE doesn't have a good way to enumerate drives as ports, the script expects the drive to be called "PRINTER" under OSX and probably "M:" for windows.

Flashing - First make sure you can easily move between official versions of the firmware. If you can't do it with Malyan's firmware, don't expect Marlin to work. The Malyan Bootloader is picky about SD cards in a way that defies understanding. Smaller is better, the one that came with the printer is best. For V1s, it's called "update.bin," for V2, "firmware.bin." 

Good luck, people. Happy printing.

Discussions