One-click script to modify and compile Mk2 firmware on Windows
After struggling a bit to get the latest Mk2 firmware to successfully compile, I went and created a script to automate the process of creating a working development environment. As of this writing, modifying the firmware is the only means of updating the hardcoded defaults as EEPROM saving is currently disabled. If you want to update your PID values (or anything else) and have those changes persist across reboots of your printer, compiling your own firmware is currently the only way to make it happen.
You can download the script files here.
The script uses PowerShell to download all of the required components along with the latest development code from Prusa and drop it all into a portable folder with everything required to make changes and compile the results. The resulting installation will not impact any currently-installed Arduino IDE deployments.
The script requires PowerShell version 5, installed by default on Windows 10 and available for download from Microsoft for earlier Windows versions.
I hope others will find this useful!
Re: One-click script to modify and compile Mk2 firmware on Windows
Nicely done. I have downloaded this to test. There is a small problem with the Prusa Firmware Development shortcut that you created. You need to include quotes around the path to the firmware.ino or it won't find it. I looked at the ps1 file and it seems like you have them there but it isn't transferring to the shortcut.
Here's what mine looked like before I changed it so it would work...
"G:\downloads\3d Printing\Prusa MK2\Get-PrusaFwDevEnv-master\Prusa-Firmware\arduino-1.6.8\arduino.exe" G:\downloads\3d Printing\Prusa MK2\Get-PrusaFwDevEnv-master\Prusa-Firmware\Prusa-Firmware-MK2\Firmware\Firmware.ino
Re: One-click script to modify and compile Mk2 firmware on Windows
awesome, a big THANK YOU.
didn't need to change anything... worked right "out of the box" here (no problems with the shortcut).
dem inscheniör is' nix zu schwör...
Re: One-click script to modify and compile Mk2 firmware on Windows
Big thanks.. I always wanted to try out some changes in the firmware, but could never be bothered trying to get it all setup. I am a bit lazy at times 😉
Will give your script a try shortly 🙂
Re: One-click script to modify and compile Mk2 firmware on Windows
Nicely done. I have downloaded this to test. There is a small problem with the Prusa Firmware Development shortcut that you created. You need to include quotes around the path to the firmware.ino or it won't find it. I looked at the ps1 file and it seems like you have them there but it isn't transferring to the shortcut.
Great catch and thanks for pointing it out! I've updated the scripts to correctly handle quoting upon shortcut creation so that it works in paths with spaces. I've also added the ability to select a RAMBo variant in the event that you have a RAMBo Mini 1.0 in your printer.
Re: One-click script to modify and compile Mk2 firmware on Windows
This is just great! It creates a nice separate installation of Arduino without replacing the system wide one. Thumbs up.
Re: One-click script to modify and compile Mk2 firmware on Windows
Sounds good, although I lack understanding (so far) why (and how) I would want to modify the firmware. 😀
But, I'm going to need this eventually I think, although I'll be wearing a frown booting into Windows.
Re: One-click script to modify and compile Mk2 firmware on Windows
Would someone give Allen a medal ?
This is awesome !
I'm like Jon Snow, I know nothing.
menue timeout parameter ?
don't want to set up a dedicated thread for my question, so i hijack this one for good purposes 😈
❓
does anybody know where i can find the parameter that determines the inactivity timout when accessing sub-menues.
for example: when i use the -> calibrate -> show endstops sub-menue, i will fall back to the main menue after a few seconds.
same with other sub-menues, like axis movement.
➡ so i'd like to increase the responsible value.... but i couldn't find it.
dem inscheniör is' nix zu schwör...
Re: One-click script to modify and compile Mk2 firmware on Windows
Think it's
#define LCD_UPDATE_INTERVAL 100
#define LCD_TIMEOUT_TO_STATUS 15000
in ultralcd.h
Tho' can't test it at the mo.
Re: One-click script to modify and compile Mk2 firmware on Windows
aaahh... inside the ultralcd.h.
that seems to be the parameter, it would fit the actual 15 seconds timeout.
i'm going to test it immediately.
thanks a lot !
dem inscheniör is' nix zu schwör...
Re: One-click script to modify and compile Mk2 firmware on Windows
did it work?
Re: One-click script to modify and compile Mk2 firmware on Windows
yes.
i altered the value from 15000 to 120000 [milliseconds], which suits me much better.
dem inscheniör is' nix zu schwör...
Re: One-click script to modify and compile Mk2 firmware on Windows
This is about the greatest thing thing since the wheel was invented. Thank you!
Quick question: If I need to download the newest firmware, can I just replace the content in "Prusa-Firmware-MK2" with the newest uncompiled release?
Re: One-click script to modify and compile Mk2 firmware on Windows
Quick question: If I need to download the newest firmware, can I just replace the content in "Prusa-Firmware-MK2" with the newest uncompiled release?
Yes. Just make sure to copy the correct version of your printer from the Variants folder to the Firmware folder and rename it to Configuration_prusa.h
Re: One-click script to modify and compile Mk2 firmware on Windows
Testing atm, anyway thank You for sharing 🙂
Prusa i3 MK2S firmware 3.1.0.
FlashAir card.
Re: One-click script to modify and compile Mk2 firmware on Windows
Thanks! Needed a way to turn off the lcd beeping and now I can!
Re: One-click script to modify and compile Mk2 firmware on Windows
Hi, I'm trying to adjust the Zmin height to accommodate the E3D Volcano hot end I installed so it doesn't crash into the bed during calibration, but I can't seem to get the software to compile. Even without any of my own modifications, I can't get it to compile. My programming skills are admittedly a bit antiquated, but I think I could muddle through this if I could just get the original files to compile.
Awesome utility though! Worked strait away and saved me a lot of trouble! Well done!
Thanks!
Re: One-click script to modify and compile Mk2 firmware on Windows
Awesome utility! Found this very useful.
It didn't work for me first time. I suspect this is either due to the fact that it can't handle spaces in filenames or something else. After keeping it in a simple path (c;\dev\Get-PrusaFW) it works just fine...
Re: One-click script to modify and compile Mk2 firmware on Windows
Hi,
Pursa uses now Adrunio IDE 1.8.x to compile. Checkout https://shop.prusa3d.com/forum/prusa-i3-kit-building-calibrating-first-print-main-f6/compiling-on-latest-arduino-ide-t6211.html#p43518