New install, compiler errors

Trying to get a Marlin compile for a standard config from the examples from Marlin 2.1.1.

Complete newbie and have no idea how this system works. Installed all of the software as requested but now the compiler complains about missing files during auto build compilation even though they are present.
Error is:
arm-none-eabi-g++.exe: error: buildroot/share/PlatformIO/scripts/common-dependencies.h: No such file or directory
( but it is there ), followed by
arm-none-eabi-g++.exe: fatal error: no input files
One post here asked to delete the toolchain-gccarmnoneeabi folder and I did that, the compiler reloaded and rebuilt it but it made no difference.

Please help.

I don’t have a 3d printer, but I have compiled Marlin 2.0.x to help someone here a while back, step by step details at Why do I get this error everytime I try to build the new marlin firmware - #31 by NormanDunbar which might help.

Can you post your step by step details to see if we can help? Thanks.

Cheers,
Norm.

Here’s what I just did to get a default Marlin build, with no additional configuration etc. Just as downloaded.

  • Go to Download | Marlin Firmware and download “Current Marlin Release” 2.1.1. Save to Downloads.

  • Click “View/Download” link for the corresponding “Configurations” a new GitHub window will open. On the far right side, about 1/3rd of the way down, click “Latest” where it says “Releases (23)”. On the new window that opens, scroll down to “Assets” and click “Source Code (zip)”. Save to Downloads.

  • Open your file explorer and create a Marlin directory somewhere. Copy the two downloaded files into this new Marlin directory.

  • Right click and “extract here” or whatever you use on your system. Start with the Marlin-2.1.1.zip file first. This will create a Marlin-2.1.1 sub directory, if not, Delete everything except for the two zip files and extract again, with whichever option you need to keep the top level directory intact.

  • Do the same for the Configurations file. You now have a Configurations-2.1.1 sub-directory as well.

  • Open VSCode and click File->Open Folder, navigate to Marlin and double-click Marlin-2.11. You might need to “trust the authors” when VSCode tries to open the directory. The platformio.ini file will probably open. If not, double-click it on the left side.

  • If you get a prompt that “Auto Build Marlin” is recommended, I chose not to install it. I haven’t used it in the past. Likewise, I have not used the “CMake Tools” extension to configure the project. We are going for a bare bones default build first.

  • Keep killing the “CMake” prompts until you get left alone!!!

  • Click the PlatformIO icon on the left side toolbar. It looks like an ant/alien head. If the “Project Tasks” list isn’t opened by default, click the drop down arrow to open it.

  • Click “Default” to open the default options. And open “General” as well, if it doesn’t open by default.

  • Click “Clean All All” to begin with. There shouldn’t be any crud lying around, but better safe than sorry. You might get a delay while the appropriate tools for the Mega2560 are downloaded.

  • When it’s done, click “Build All” and after a short(ish) delay, you should see a “Success” message for the “Mega2560” board, which is the default.

So far, so good, we have a default build that worked. So we know that PlatformIO is working and there are no bugs in the Source Code, yet. :wink:

Now, how we go about changing the default Mega2560 build to match, say a Creality Ender 3 Pro with the “BigTreeTech SKR Mini E3 version 3.0”, I’m afraid I have no idea. Sorry. It’s supposed to be as simple as editing the platformio.ini file, and changing this:

[platformio]
src_dir      = Marlin
boards_dir   = buildroot/share/PlatformIO/boards
default_envs = MEGA2560
...

to this:

[platformio]
src_dir      = Marlin
boards_dir   = buildroot/share/PlatformIO/boards
default_envs = STM32G0B1RE_btt
...

EDIT: I’m an idiot, I copied the configuration files to the wrong location!

And, copying the configurations for the Creality to the Marlin-2.1.1/config Marlin-2.1.1/ directory, overwriting the files that are already there.

After a clean and another build, the whole lot compiles for the chosen board.

Cheers,
Norm.