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:
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.
Open VisualStudioCode, activate the ArduinoIDE Plugin and use the menu to open a folder, which is the marlin main tree of course.
Open/Activate the UI of AutoBuildMarlin Plugin. Just like with ArduinoIDE there should be a dedicated tab.
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.
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 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.
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.