Firmware editing

Is there a way I can download my current firmware on my machine, so I can edit its configuration.h file.

The process is not reversable. You cannot download the binary from your control board to get back to the source. You need to start from the source, make the changes, compile the firmware, and then burn that firmware to your board.

You are posting in the SKR Boards section of the forum, so I’m assuming you are using an SKR board and probably an SKR Pro board. Your best bet would be to download the latest released source from the Marlin versions maintained by V1 here. If you provide us with which control board you are using and which V1 machine you use, we can direct you to the correct version of the firmware.

Once unzipped to a directory on your machine, you can make the changes in configuration.h and/or configuraton_adv.h. You can use PlatformIO to compile the firmware. The firmware is then placed on a FAT32 formatted SD card and inserted (power off) in the control board. When you power the control board, your new firmware will be flashed.

I’m using the skr pro v1.2 dual.
Would this mean any settings stored on eeprom would be back to default and I would need to redo them? Such as y offsets etc.

If I remove my current sd and keep this as a backup. While a build a new sd. If it fails can I revert to my original sd and it would function as it is now.

First, your firmware is not stored on a SD card. It is burned into control board. The SD card is only used to transport the firmware to your control board. If the firmware is successfully burned, the SD card is no longer needed, and you will find the “.bin” file extension changed to “.cur”.

I’ve never seen a method of reading firmware from the control board memory and storing the result on a SD card. When you upgrade your firmware, your old firmware will be lost. I think you can put your display in Marlin mode and reboot your control board. When it starts up, it will give you a version number. If you write this number down, it is possible to find the source for that specific version and recreate the version you currently have running on your control board. If putting the board in Marlin mode does not work, try sending an M115 to your control board.

As for your settings, assuming your Marlin firmware on the board is somewhat recent (no more than a couple of years old), then your settings will not be overwritten. I’m talking about the settings you modified either through Marlin LCD interface, or settings you modified by g-code. Marlin does it this way so that people can upgrade their firmware (usually to get new functionality) without losing their machine settings.

A couple of Topics you started were in the Lowrider area, so I’m assuming you have a Lowrider. The correct firmware is V1CNC_SkrPro_DualLR_2209. Dual in the title means dual endstops, and LR means Lowrider.

Awesome. Thanks heaps.
Yeah I know I started a few topics. But I’ve kinda stepped away from the LR for a bit. Slowly getting back into it. Having to go through the manuals again to refresh my memory.
Been a bit hesitant with compiling cause I was worried I will lose a currently working machine etc.

The reason I wanted to get further into it now, mainly due to wanting to now add RGB led strip lighting, I know I can do it via octoprint but it means it will only work via octoprint. Wanting to setup that led lights change depending on state the LR is in regardless of what software I use. So obviously this can only be
chieved by embedding it to the skr instead of the rpi.

But since you assured me that all settings made via the lcd screen are stored and won’t be erased that kinda makes me feel a bit more comfortable. I believe I have currently the latest firmware (only done this approx 1 year ago, so don’t believe any updates have happened since then). So it’s purely just to edit the configuration files to do what I need it to do :slight_smile:
Thanks again for your prompt response.

Before you do anything else, send your board an M503 from a terminal program or gcode sender and save the results. That way, you have a backup of what your EEPROM settings are right now.

2 Likes

If you didnt see this post already it might help you out a little.

I had LEDs running from the SKR and controlled by Gcode on one of my LR3s before changing over to the jackpot board. Lots of good info in that threat. Just be sure to read though all of it. Some of the first things i tired didnt work LOL

1 Like

Yeah. M503 will print a report with most of the settings. I think M122 gets the TMC ones. M115 will tell you what firmware version you have and what features are enabled.

This isn’t guaranteed. They are shouldn’t not overwritten when we want them to. But if the storage structure in eeprom changes, Marlin won’t load them. It will just restore defaults. Unless that had changed recently.

ok so i downloaded platformio etc. Loaded default firmware and all is well.
I thought id try simple so i changed put “//” in front of “#define CHOPPER_TIMING CHOPPER_DEFAULT_12V” and added line “#define CHOPPER_TIMING CHOPPER_DEFAULT_24V” since i will be changing over to 24V supply from 12V.
I click the “Tick” button to build the platformioio and i assume the “firmware.bin” file is located in the V1CNC_SkrPro_DualLR_2209\Marlin.pio\build\BIGTREE_SKR_PRO folder.
There are also other folders/files in this folder. Do these need to be on the SD card or just the “firmware.bin” file?
Does the “firmware.bin” need to be renamed? or do i have to actually baleanaetch the .bin file to an SD card?

Just put firmware.bin on the root directory of a fat32 formatted microSD card. The microSD card goes into the slot on the SKR, and when you turn on power to the SKR the firmware should get flashed, and the file will be renamed to firmware.cur on the SD card. At that point power cycle. Note that Ryan recommends disconnecting the display prior to this in his documentation.

If you’ve changed any settings that are normally stored in EEPROM, you may need to either re-command those and store them, or reset EEPROM by command. If that’s the case, we can talk that. through here.

There’s some better documentation on this than my write-up at this location: ( I quote this further below)
https://docs.v1e.com/electronics/skrpro/

There’s also better firmware build documentation at this location: (you may not need it since you seem to have already built firmware)
https://docs.v1e.com/learn/platformio/

Here’s a relavent part from Ryan’s online documentation. You won’t need to unzip anything, just put the file on the SD as noted above:

1 Like

OK i have saved all the settings for M503/M122/M115.
Can i put these in my platformio firmware? if so where?

All those settings have a copy in the configuration.h file. But they are overweitten from eeprom at boot, and dynamically from gcode.

Document them all, check after you flash what changed (it may be nothing). Then I would send gcode to change them and send M500 to store the settings to eeprom. The gcode numbers are with the M503 feedback IIRC.