Update the Firmware
All motherboards come pre-flashed with firmware from Opulo and should work out of the box without these steps. If you're setting up a LumenPnP with feeders for the first time, you may need to update your LumenPnP's firmware.
Important
It is important that you pick the correct firmware file for your machine.
- If you have a v2, choose `v2-lumenpnp-firmware-feeder-support.bin`.
- If you have a v3, choose `v3-lumenpnp-firmware-feeder-support.bin`.
Option 1: Prebuilt Firmware and STMProgrammer (RECOMMENDED)
The easiest way to update your LumenPnP's motherboard is to use a precompiled binary of the firmware, and the STM32CubeProgrammer software by ST.
- Download the latest precompiled firmware
.bin
file for your motherboard version. - Download and install STM32CubeProgrammer.
- Open STM32CubeProgrammer.
- Select
USB
from the connection type dropdown on the right. -
Attach the LumenPnP Motherboard to your computer with the included USB cable (USB C to A for Motherboard 3.0, or USB B to A for Motherboard 4.0).
-
Boot your motherboard into DFU Mode
- Press and hold the
BOOT
button - Press the
Reset
button and hold for 10 seconds - Release the
Reset
button and wait for 10 seconds - Release the
BOOT
button
NOTE
If you have a hard time getting your board to enter DFU mode, instead try powering off the machine entirely, holding the 'BOOT' button, plugging in power, waiting 10 seconds, then release the
BOOT
button. - Press and hold the
-
Select the newly discovered USB port from the
Port
dropdown menu. -
Double-check the other fields on the right match the image above:
PID: 0xdf11
VID: 0x0483
Read Unprotect (MCU): Unchecked
TZEN Regression (MCU): Unchecked
-
Click the green
Connect
button to connect to the motherboard. -
Click the
Browse
button to browse for the binary you downloaded earlier. -
Click the
Start Programming
button to upload the firmware to the motherboard. -
Press the
reset
button on the motherboard to reboot it. -
The machine should show up as a COM/Serial Port on your PC now, and you should be able to access it via OpenPNP. If it doesn't, press the Reset button on the board again, or power-cycle the machine after the flashing is completed.
This is how you can check whether your machine is connected properly:
Option 2: Auto Build Marlin and dfu-util
Marlin
Building an older version of Marlin with the recommended config files won't work. If you are unsure whether a previously-downloaded local version of Marlin is the newest one, re-downloading it is the safest choice.
- Download the latest Marlin firmware and unzip it.
- Install VSCode and its PlatformIO extension.
- Open Marlin firmware's folder in VSCode.
- Download the Marlin configuration files here and
- Replace the files in the
Marlin/Marlin
folder from step #1 with the new configuration files from step #4. - Install the Auto Build Marlin plugin using this Marlin Documentation page, or download it directly from the Visual Studio Marketplace.
- Install
dfu-util
-
Try to build Marlin using the build button with the hammer icon as shown below. See Troubleshooting for more help
-
Attach the LumenPnP Motherboard to your computer with the included USB cable (USB C to A for Motherboard 3.0, or USB B to A for Motherboard 4.0).
-
Boot your motherboard into DFU Mode
- Press and hold the
BOOT
button - Press the
Reset
button and hold for 10 seconds - Release the
Reset
button and wait for 10 seconds - Release the
BOOT
button
NOTE
If you have a hard time getting your board to enter DFU mode, instead try powering off the machine entirely, holding the 'BOOT' button, plugging in power, waiting 10 seconds, then release the
BOOT
button. - Press and hold the
-
In the integrated terminal in the root of the repository, flash the Motherboard using
dfu-util
by running the command:dfu-util -d 0x0483:0xdf11 -s 0x08000000:leave -a 0 -D ./.pio/build/Opulo_Lumen_REV3/firmware.bin
COMMAND EXPLANATION
dfu-util
is a flash tool available on all platforms.-d 0x0483:0x0df11
tells the tool to flash the STM32 chip on the motherboard. This is optional if you only have one dfu device connected.-s 0x8000000:leave
is the target memory address that the firmware is flashed to. The:leave
part will cause the chip to reset on its own, making the machine accessible in OpenPNP without rebooting it.-a 0
makes the tool use the alt setting required for flashing the ESP32.-D ./.pio/build/Opulo_Lumen_REV3/firmware.bin
is the path to the to-be-flashed firmware. If you want to flash another file, change this.
-
Wait for the process to finish.
-
The machine should show up as a COM/Serial Port on your PC now, and you should be able to access it via OpenPNP. If it doesn't, press the Reset button on the board, or power-cycle the machine after the flashing is completed.
This is how you can check whether your machine is connected properly:
Option 3: Auto Build Marlin Only
Note that flashing the firmware using the Auto Build Marlin Plugin might work, but seems error-prone for most people. We recommend using dfu-util
as described above. Here are the steps to use Auto Build Marlin if you'd like to try it.
- Download the latest Marlin firmware and unzip it.
- Install VSCode and its PlatformIO extension.
- Open Marlin firmware's folder in VSCode.
- Download the Marlin configuration files here.
- Replace the files in the
Marlin/Marlin
folder from step #1 with the new configuration files from step #4. - Install the Auto Build Marlin plugin using this Marlin Documentation page, or download it directly from the Visual Studio Marketplace.
-
Try to build Marlin using the build button with the hammer icon as shown below. See Troubleshooting for more help.
-
Attach the LumenPnP Motherboard to your computer with the included USB cable (USB C to A for Motherboard 3.0, or USB B to A for Motherboard 4.0).
-
Boot your motherboard into DFU Mode
-
Wait for the process to finish
- The machine should show up as a COM/Serial Port on your PC now, and you should be able to access it via OpenPNP. If it doesn't, press the Reset button on the board, or power-cycle the machine after the flashing is completed.
This is how you can check whether your machine is connected properly:
Option 4: PlatformIO
- Download the latest Marlin firmware and unzip it.
- Install VSCode and its PlatformIO extension.
- Open Marlin firmware's folder in VSCode.
- Download the Marlin configuration files here.
- Replace the files in the
Marlin/Marlin
folder from step #1 with the new configuration files from step #4. - Edit the
platformio.ini
file to indicate which board you're uploading to. Updatedefault_envs
to readOpulo_Lumen_REV3
orOpulo_Lumen_REV4
depending on your motherboard. - Attach the LumenPnP Motherboard to your computer with the included USB cable (USB C to A for Motherboard 3.0, or USB B to A for Motherboard 4.0).
-
Boot your motherboard into DFU Mode
- Press and hold the
BOOT
button - Press the
Reset
button and hold for 10 seconds - Release the
Reset
button and wait for 10 seconds - Release the
BOOT
button
NOTE
If you have a hard time getting your board to enter DFU mode, instead try powering off the machine entirely, holding the 'BOOT' button, plugging in power, waiting 10 seconds, then release the
BOOT
button. - Press and hold the
-
The machine should show up as a COM/Serial Port on your PC now, and you should be able to access it via OpenPNP. If it doesn't, press the Reset button on the board, or power-cycle the machine after the flashing is completed.
This is how you can check whether your machine is connected properly:
Flashing Factory Firmware
If you've put new firmware on your motherboard, but just want to get back to the firmware that your machine was flashed with, check the release for your build number and download the .bin firmware file attached to it. Put your board into DFU mode as described above, connect to your computer, and flash the binary to the board using the following command:
`dfu-util -d 0x0483:0xdf11 -s 0x08000000:leave -a 0 -D ~/path/to/firmware.bin`
Once flashing is completed, the machine should automatically exit DFU mode, and be accessible to OpenPNP again.
Troubleshooting
Troubleshooting Building with Auto Build Marlin
If you can't build with the Auto Build Marlin tool:
- Check the error messages for configuration errors and fix them, or replace it with the default config
- If this fails, check that your config file version is the same as your Marlin version (e.g. a bugfix-2.0.x config file won't work in a bugfix-2.1.x)
- When in doubt, re-download Marlin and the configuration files from the links above
Other Troubleshooting
If you aren't able to upload, you can check to see if your motherboard is booting into DFU mode correctly:
Also, reference the Marlin instructions for uploading.
Next steps
Continue to wiring and pneumatics.