Newcomer can't get VS Code to run

Hi community,
a newcomer in case of modifying firmware.
The question to me is - what do you need to see - related to my error!
This is Ender 3 - Firmware I try to compile. My first error was a missing “Wire.h”. Seems to me - after some hints from MaxGerhardt - my problem is worse. VS Code still is some kind of mystery to me.
Have a look at my compiler message and let me know what I can try and/or what you need to see additionally:

Processing STM32F103RC_btt_USB (platform: ststm32@~6.1; board: genericSTM32F103RC; framework: arduino)      
------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
Der Befehl ""CC"" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
CalledProcessError: Command '"CC" -DTARGET_STM32F1 -D__MARLIN_FIRMWARE__ -DDEBUG_LEVEL=0 -DSS_TIMER=4 -DUSE_USB_COMPOSITE -D__MARLIN_DEPS__ -w -dM -E -x c++ buildroot/share/PlatformIO/scripts/common-dependencies.h' returned non-zero exit status 1.:
  File "C:\users\elli\.platformio\penv\lib\site-packages\platformio\builder\main.py", line 168:
    env.SConscript(item, exports="env")
  File "C:\Users\elli\.platformio\packages\tool-scons\scons-local-4.0.1\SCons\Script\SConscript.py", line 598:
    return _SConscript(self.fs, *files, **subst_kw)
  File "C:\Users\elli\.platformio\packages\tool-scons\scons-local-4.0.1\SCons\Script\SConscript.py", line 287:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "C:\0123-M\Marlin-bugfix-2.0.x\buildroot\share\PlatformIO\scripts\common-dependencies.py", line 287: 
    apply_features_config()
  File "C:\0123-M\Marlin-bugfix-2.0.x\buildroot\share\PlatformIO\scripts\common-dependencies.py", line 118: 
    if not env.MarlinFeatureIsEnabled(feature):
  File "C:\Users\elli\.platformio\packages\tool-scons\scons-local-4.0.1\SCons\Environment.py", line 219:
    return self.method(*nargs, **kwargs)
  File "C:\0123-M\Marlin-bugfix-2.0.x\buildroot\share\PlatformIO\scripts\common-dependencies.py", line 263:
    load_marlin_features()
  File "C:\0123-M\Marlin-bugfix-2.0.x\buildroot\share\PlatformIO\scripts\common-dependencies.py", line 251:
    define_list = subprocess.check_output(cmd, shell=True).splitlines()
  File "C:\Users\elli\.platformio\python3\lib\subprocess.py", line 411:
    **kwargs).stdout
  File "C:\Users\elli\.platformio\python3\lib\subprocess.py", line 512:
======================================== [FAILED] Took 4.27 seconds ========================================
Environment          Status    Duration
-------------------  --------  ------------
STM32F103RC_btt_USB  FAILED    00:00:04.275
================================== 1 failed, 0 succeeded in 00:00:04.275 ==================================
1 Like

…now that’s an error message even I haven’t seen yet in PlatformIO and I’ve been here for a long time. Seems like it’s trying to reference the C compiler by “CC”, but that’s definitely the wrong thing to when trying to compile for an ARM board – it should find the toolchain-gccarmnoneeabi folder here and do it with arm-none-eabi-gcc.

Can you please state the exact Marlin repository and branch you’re compiling from, together with selected platformio.ini environment and your configuration header files (Configuration.h and Configuration_adv.h).

Hi Max,
can you give me a short advice how to upload files - is it this sign </> ??

Files cannot be uploaded here directly (except for images), so I’d recommend Google drive for the whole project or https://pastebin.com/ for longer text files.

1 Like

OK,
so first, that’s my home directory:

Puh,
no idea how pastebin works! Needs a little time for me to dive in! Never used it before!
Should I then paste Configuration.h, configuration_adv.h and platformio.ini in that place?
How do I enable you to have access to the files?
Sorry, but never had this problem !

Hi Max, before I go to sleep ((…have to get out early!) a closer look to a setup I arranged on a different Laptop - related to your Input in case of different tryouts:
Found in c_ccp_properties.json

“includePath”:
"c:/A-Marlin …/ …/include (!!) Which is marked as ERROR (waveline underneath the path)
and the next line also marked with waves - here the path is double!

Under LiquidCrystal in the file “FastIO.ccp” are 2 instances of “…, boolean noLatch” whereas “noLatch” is underlined with a wave.
Same in FastIO.h - "boolean noLatch = false); " with “false” underlined with wave.
This is when the overall error is “Wire.h missing”

What would help here most is foremost the link to the exact Marlin repository and branch you’re compiling and your two configs header (or links to the files where you got them from, if you haven’t modified them). Do you have an absolute stock Ender 3 or some modifications with it?

1 Like

Hi Max,
I still have problems to understand some of your terms! Maybe its related to the fact that english is not my mothertongue!
What do you mean by “exact Marlin repository”?
Do you mean by “configs header” the Configuration.h and Configuration_adv.h?
These two files I’ve taken from BTT (Big Tree Tech), which is available with the board I’m using with my Ender 3.
I have not modified them so far, as I wanted to check first, if it compiles at all!
Sorry for keeping you busy!

Hi Max,
in the meantime I tried to put everything to “0” and restart from scratch.
I went back to my original setup, based on the Marlin-SW from BTT.
Now setting up the workbench again, platformIO seems to have problems right from the beginning! Have a look at the screenshot.
PlatformIO seems to create under .vs a file named c_cpp_properties.json automaticly.There tha trouble seems to start:
There is no file "include under the root ( …as noted) and strangly enough - the path is doubled shown!
Is this something that leads you to the problem?

Which version of the Marlin code did you download. Or, where did you download it from? There is Marlin, and then there is forked or modified versions of Marlin. We need to know which you are using.

From the path you are showing there, it looks almost like you are using GitHub - bigtreetech/BIGTREETECH-SKR-E3-DIP-V1.0: BIGTREETECH SKR-E3-DIP-V1.0 motherboard is launched by the 3D printing team of Shenzhen BIGTREE technology co., LTD. This board is specially tailored for Ender 3 printer, perfectly replacing the original Ender3 printer motherboard. … except the src_dir shown is wrong… so perhaps some variation of that github repository?

Don’t worry about the problems messages… just try to compile/build it… often they will go away once the code is compiled for the first time, or a more useful error message will be shown then.

Hi pfeerick,
thanks for your comment! Can you also have a look at the screenshot?
The version of Marlin (…seems to be 2.0.5) I use, is a modified one from Big-Tree-Tech from China. The configs are already tailored for the Ender 3 printer.
I ran into the problem when I tried to modify the firmware to run with closed-loop-motors.
The controller for that comes from BTT - but unfortunately they are not very helpful!

As I said… ignore those ‘problems’ and try to compile it. What VSCode’s Intellisense thinks is a problem is not important. What the compiler says is a problem is.

What is the link for that modified version of marlin? Does it compile without your changes? i.e. Get the code compiling without changes before making any of your own.

Hi pfeerick,
the software can be downloaded from .git with all the bells and whistles. But even the unmodified configs always give me a fatal error (…can’t find Wire.h) and does not create the firmware file (.bin). The error can be repeated endlessly!

Downloaded from where? What link?

Hi pfeerick,
the link is : BIGTREETECH-SKR-mini-E3/firmware/V1.0 at master · bigtreetech/BIGTREETECH-SKR-mini-E3 · GitHub
The Board I have is Version 1.1 but V1.0 is used to support V1.1 as well.

there you can also find pre-compiled firmware to cover certain areas like BL-Touch technology to provide automatic bed-leveling with a sensor, etc.

1 Like

Hi guys,
just by magic - I did a “Clean” (…the trashcan) and wups - it ran through without error!!!
Actually I wanted to delete the workbench files, which is done in a different way!
My god, Itweeked around with the software now for 2 weeks and now just like that!
I’m totally amazed but understand less than before!!
I think it’s time for me to go to bed!

1 Like

Hi,
those where “Fake News”! I did a correct Clean! Thats why the green color came up!
The error remains the same!
I think I’m too tired now and can’t even look straight! I will try again with the latest SW from BTT tomorrow!
Good night!

1 Like

Are you sure that is the correct link?

In your screenshot, it says SKR-E3-DIP, not SKR-mini-E3.

I cannot reproduce the error for the unmodified SKR-MINI-E3 code:

However, for the unmodified SKR-E3-DIP code, I do get two errors which cause the compile to fail, and are related to Wire and SPI. Looking closer at that now to see what they did wrong.

Oh wow - this is good news to me!
I was told by BTT that SKR-E3-DIP and SKR-mini-E3 are basically the same!??