Firmware Compiling Problem

I am really hoping someone is able to help me out. I am trying to compile my own firmware for my Ender 3. The problem is everytime I click the build button in VS Code I get a “cannot find file path errors”. Like so:

[ATTACH=JSON]{“data-align”:“none”,“data-size”:“full”,“title”:“Error.jpg”,“data-attachmentid”:15181}[/ATTACH]

I really appreciate any help offered. This is super frustrating.

Compiling Marlin is quiet easy these days:

  1. You need to install VisualStudioCode and from within VSC you install the ArduinoIDE and the AutoBuildMarlin plugins.
  2. Download the marlin instance you want as zip from here: GitHub - MarlinFirmware/Marlin: Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. | Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
  3. Download the configurations as zip from here: GitHub - MarlinFirmware/Configurations: Configurations for Marlin Firmware
  4. Extract the marlin zip archive.
  5. Extract the marlin configuration archive.
  6. Browse into the marlin configuration tree you just extracted and copy all files for your printer into the marlin main tree. You get asked to overwrite files. This indicates that you did it right! So select yes.
  7. Open VisualStudioCode, activate the ArduinoIDE Plugin and use the menu to open a folder, which is the marlin main tree of course.
  8. Open/Activate the UI of AutoBuildMarlin Plugin. Just like with ArduinoIDE there should be a dedicated tab.
  9. Select the button named “build” within that AutoBuildMarlin plugin tab. Depending on your printer and board type there may be multiple actions. For example when a board comes with multiple flash size configurations.
  10. If compile succeeded you should find a proper firmware build in the marlin main tree. The exact location and name is shown in the output console.

Additional Information:

Do not use the normal compile options the ArduinoIDE provides. The AutoBuildMarlin Plugin will scan the configuration data you dropped in and it will adjust the build files accordingly. It probably will work on second compile run, but better use the plugin as it is there for a reason.

Do not edit any source or config files! Yes, you can modify them later to enable/disable features, but first ensure the build process works with unchanged sources.

Also: I used the term AutoBuildMarlin. Not sure if I remembered the name correctly. If you use “auto marlin” as search/filter option, when adding the plugin you will find it.

I hope this helps.

I had this issue once, or at least similar. It turned out, in my case, that the directory containing the required files wasn’t in the place VS Code expected it to be. I think I had it on my server. When I moved the folder to my desktop it worked. I know that’s a bit vague. It was over a year ago and I don’t recall exactly. The point is that it might be that VS Code might not be able to find the resources because they’re not in the place on your system where it expects them to be.

If I remember right VS Code doesn’t like to did down into directories. I do like Ender5r suggested I just put the directory with the firmware on the desktop when working on it.

Solved! Turns out VS Code does NOT like symbols anywhere in the file path. My user account has an ampersand in the name. Switched to a different account and success.

Yeah, it is 2022 and we still have issues with spaces and shit. :smiley:

As @Geit indicates, it’s a bit of stupidity that programs can’t distinguish between file names, account names, and other actions. Yes, the & is a special character within many programming tools, often being used to indicate concatenation. But that’s while evaluating command statements. It should not apply when working with file and account names.