Very interesting. But we should be getting to the bottom of this. Can you please
- open the
platformio.ini
of the Marlin project and after theboard
line in the mega2560 environment
add the line
custom_verbose = 1
Then, remove the .pio
folder in the project again, build the project and show logs. They should be more verbose now.
Then, please
- locate the file
buildroot/share/PlatformIO/scripts/common-dependencies.py
in the Marlin project - rename that file to
common-dependencies-old.py
- recreate the file
common-dependencies.py
and fill the file with the python code found at [BUG] 'CC' is not recognized as an internal or external command · Issue #20671 · MarlinFirmware/Marlin · GitHub - rerun “Build”
It should hopefully start printing PATH:
… and give some debug output as to why Marlin thinks that’s the right compiler path.