-
Notifications
You must be signed in to change notification settings - Fork 9
Running under Windows (Cygwin)
-
Obtain a copy of MK404. You can opt to compile from source, but for your convenience, our Releases Page contains pre-compiled multiplatform zip files with all binaries ready to go.
-
Get a copy of the Cygwin installer: https://cygwin.com/setup-x86_64.exe
-
Obtain a firmware .hex file from either Prusa’s Drivers Page or Prusa’s Github releases
-
Stock up on some Haribo. There are scary terminals ahead!
-
Install Cygwin using the installer downloaded above. You may install anywhere you wish, but this guide will assume that you are installing in
C:\cygwin64
(the default). You may need to change paths in commands if you choose to change the installation location. Do not worry about choosing any additional packages. We will install them all at once in a subsequent step. -
Move or copy the installer to
C:\cygwin64\cygwinsetup.exe
. You will need it later! -
Open a Windows command prompt as Administrator. Open the Start menu, search for
cmd
, and right click it. Choose "Run as Administrator". -
Execute the following command. This will install all of the required packages automatically. If it does not work, double check that the path to cygwinsetup.exe is correct and you have adapted the paths in this command to a different installation location, if appropriate.
C:\cygwin64\cygwinsetup.exe -qgnNdO -R C:/cygwin64 -s http://mirrors.kernel.org/sourceware/cygwin/ -P cmake,make,libelf-devel,gcc-core,gcc-g,libstdc-6-devel,git,libglut-devel,libGLEW-devel,libSDL_sound-devel,libSDL-devel,avr-gcc,python2,libpng-devel,xorg-server,xinit
-
Once the installation is complete, close the command prompt. We are finished with this one.
-
Locate your cygwin installation directory and then browse into the
home\[username]\Documents
folder it contains. Extract the contents of the MK404 multiplatform .zip file here. Note: you cannot run this EXE directly; it will complain that it cannot find various cygwin DLLs. It must be launched from the Cygwin shell. -
Also, place your firmware file here (either downloaded .hex or a self-compiled .elf/.afx file) for convenience.
-
Steel yourself and have some Haribo. It’s Cygwin terminal time!
-
Locate and run the
Cygwin64 Terminal
from the Start menu. -
Run the following command to start the X11 server (Cygwin/Linux’s GUI system):
export LIBGL_ALWAYS_SOFTWARE=1
followed bystartxwin
. If you are prompted whether to allow xwin.exe through the firewall, click 'Allow', as it uses the TCP protocol to receive connections from other local cygwin applications.LIBGL_ALWAYS_SOFTWARE
is required as there are rendering bugs with freeglut’s menus, scaling, and WGL. -
You will need to have this running whenever you wish to start MK404. You will probably see a lot of logging output (but no errors) in the terminal. Relax and have a few more Haribo.
-
Open a second terminal. We will now navigate to the location we placed MK404’s executable. Cygwin is a Linux environment for Windows, so the syntax and paths are different from what you may be used to; you will not be able to use standard Windows command prompt commands here.
-
the
cd
command still changes directories, but:-
forward slashes (
/
) are used to separate folders and files -
Spaces in folder or filenames must be escaped (preceded) by a backslash (
\
). -
Windows drives appear as folders under
/cygdrive/
. For example,C:\
is/cygdrive/c/
-
-
For example, if you placed MK404 in
C:\cygwin64\home\Joe Public\Documents\MK404-v1.0.2
, then the command you need to change to this directory iscd /cygdrive/c/cygwin64/home/Joe\ Public/Documents/MK404-v1.0.2/
-
If you have issues, double check your spelling. Cygwin has tab completion, so use it to your advantage! Type a few letters of what you are looking for and press
tab
. It will either complete the rest of what you started to type (if there was only one option) or complete as much as it can before you need to type some more to tell it which of the printed choices you want. -
Have some more Haribo, you’re almost there!
-
One last command must be run to tell the system we wish to use the X11 server for display. Execute the following command:
export DISPLAY=:0.0
. You only need to do this once per terminal session. -
Now you are ready to launch MK404! When you run the following command, you should see the UI appear:
./MK404-cygwin.exe -f firmware_file.hex
. This will start MK404 and loadfirmware_file.hex
into the flash memory of the simulated AVR. Be sure to changefirmware_file.hex
to match the file you wish to use!-
If you have issues, make sure the firmware file exists in this directory! Use
ls
to list the files in the current folder in the terminal.
-
-
If everything worked, you should see MK404 appear and start running the firmware! You can close the MK404 window (or press
q
) to quit. See below for command line options and features you can now tinker with! -
Have some more Haribo. Maybe refill your supply, you’ll probably be tinkering for a while and will need to keep your energy up!
-
See Command Line for the available command line options, including printer models, 3D graphics and extrusion, SD card options, and more!
-
See Key Controls for what key functions are available.
-
See Mouse Functions for using the mouse to drive a few aspects of MK404
-
See Main Window Reference for a quick overview of what is what in the main MK404 window and what all the indicators mean.