-
Notifications
You must be signed in to change notification settings - Fork 10
Arduino Flashing
Once everything is installed and properly configured, you should be ready to use the plugin. To do that, go on the main UI page. There should be a new tab named Marlin Flasher. The content of this tab depends on the configured platform. Using Arduino, this tab is split in four sections for the different steps you will have to go through in order to get your firmware flashed on your printer.
In this section, you can upload the sketch you will be flashing. You have two options here :
- You can upload a
.zip
file containing the source code of an Arduino sketch. This way the compilation will be done on the machine hosting OctoPrint. - You can directly upload a compiled
.hex
file.
If you decide on using a zip file, the firmware will be compiled on the machine running OctoPrint, you will then need to include all of the Marlin files and directories in the .zip
file. Otherwise, PlatformIO won't be able to compile properly :
There is no prefered way of creating the zip file. This depends on the Operating System you are using. For instance, on Windows, you could right click on the folder you want to zip. Then select Send to
and Compressed folder
. You can also create zip files using third party tools such as 7zip. For more precise information on your OS, a simple search can get you started.
This section allows you to install what are called cores
in arduino-cli
. Cores contain the board definitions and tools needed in order to compile and upload sketches to specific boards. This is similar to the Board Manager
in Arduino IDE.
BUT, in opposition to Arduino IDE, even the official Arduino cores are not installed. This means that you will have to install the arduino:avr
core yourself. Just search for avr
and install the arduino:avr
core.
If your board is not supported by the arduino:avr
core, you can always install other cores the same way. If there is no core supporting your mainboard available you still have two options :
- If your third party board definition comes with a custom package index
.json
file (ie: Sanguino), you can configure that in the settings. - If not, you can download the corresponding 3rd party hardware files manually and place them in
~/Arduino/hardware
on Linux orC:\Users\UserName\Documents\Arduino\hardware
on Windows. (As for Arduino IDE)
This section allows you to install additional libraries that might be needed in order to successfully compile a sketch. You will probably need to install libraries for your stepper drivers and screen. To install a library, simply search for its name and click the install button.
If a library is not available through this, you can always manually install it by placing it into ~/Arduino/libraries
on Linux or C:\Users\UserName\Documents\Arduino\libraries
on Windows. (As for Arduino IDE)
Once the sketch is uploaded and needed cores and libraries are installed, all you need to do is to select the appropriate board and board options and click Flash
.
Depending on the power of the host computer, the compilation process can take some time. If everything goes well, you should get a green message saying the board was successfully flashed.
If for some reason, the compilation of flashing failed, you will get a pop up showing the error output.