Save pre-compiled Marlin for quick flashing?

So I was thinking about how I might like to switch quickly between firmwares on my RAMPS board like GRBL, Marlin, and whatever ESTLCam loads onto it, without having 2 or 3 different boards I need to swap out every time. GRBL and ESTLCam firmware take about 10 seconds to compile and upload, it’s Marlin that seems to take forever.

I noticed a menu item in the Arduino IDE called “export compiled binary” and figured I could compile the Marlin firmware and save it so I don’t have to wait for it to compile every time I want to re-flash it. I tried it and it gave me grief about undefined references in setup and loop, even though it will compile and upload fine, if I want to wait.

Am I looking at this the right way? Am I just being impatient? Is there a better way? Different IDE? I see some folks use PlatformIO, but that just looks way too over-complicated for what I want to be doing like saving configs and swapping values in Marlin.

Any guidance is appreciated. TIA.

You can find the .hex file. It prints the location when you compile it in the console. You can later put that onto the mega with avrdude. I don’t know if arduino can manage uploading just the .hex file.

There is a firmware flasher plugin for octoprint, and you need avrdude installed on the pi, but it will give you a way to do that remotely over wifi, presumably with any of the .hex files. I’ve used that before and it works pretty well, but you do have to ssh in to install avrdude.

You can also use Xloader.zip (646.7 KB) to flash a .bin file to your Mega 2560. The Arduino IDE generates the firmware.bin file after compiling, as Jeff says, look in the console…it will be something like C:\Users<your login name>\AppData\Local\Temp\arduino_build_xxxxxxxx

Hey thanks guys. I’ll look into both of those.