Newcomer can't get VS Code to run

Hi ,
I have also downloaded the latest …-DIP software. Same error as pfeerick found.
Going down the line and following the error - you end up at LiquidCrystal - FastIO.ccp and FastIO.h with two errors each, related to “boolean noLatch”.
Takeing into account that the compiler says that " ‘boolean’ is deprecated " - what can replace this and will the error then be gone??

Hi Hans,
My name is Christian. I am originally from Switzerland but live in the caribbean now.
So let’s stay on English that other members can follow.
I have exactly the same problem trying to compile the firmware for a MKS Robin Nano 3D printer board. The message also says that the compiler (CC) could not be found.
At the end it’s probably just ridiculous because we use a german Windows version?

1 Like

Hi Christian,
thanks for joining! The more eyes look - the better!
Well, you raised an interesting point! Of course - I run a german win10-software! With windows you have alway some kind of suprises!
I ran into this problem when I wanted to upgrade my Ender 3 pro with closed-loop-steppers for X and Y axis. In case of VS Code I feel like a blind one in a room he’s never been bevore and bumping on ervery corner or furniture without any orientation. This VS Code environment is unfortunately not self-explainitory. Thats causing all the bumps you suffer from!
My hope is with Erick, who could see the same error with “Wire.h” not found. Max also saw the error with “CC is written wrong or could not be found”! So we have here two versions of errors.
Let’s hope, that one knowing soul is able to help us!
I have a strongly positive feeling here in this forum!
Best Regards
Hans

I’ll test this today but this can’t be possibly an error. I’m running a german Win10 x64, too and don’t have problems compiling Marlin in general because of this.

Hm I do recognize this type of error. For STM32(F1) there are two available cores, STM32Duino and Maple, and each has their own Wire library which accepts different API calls. Marlin is trying to call a function here which takes a whole buffer and the length which it should transmit, but this Wire library version doesn’t support – indicating it might be using the wrong Arduino core. Switching between cores is documented (basically just board_build.core = maple or board_build.core = stm32 in the platformio.ini). I’ll have a look this evenning.

Please do try… I thought the same, and it made things even worse… :laughing:

Huh okay then the problem might be different… I see the error comes from the Arduino BusIO library and its sub-included library with SPI device… Maybe that library is wrongly in there? And somehow the SPI functions are redirecting to Marlin/src/HAL/STM32F1/SPI.h and not the … SPI.h library in the core. (I meant SPI in the last post, not Wire, that’s I2C). Maybe there’s just a header name conflict between Marlin’s SPI.h and the SPI library’s SPI.h? Or they’re supposed to override each other but Marlins header file doesn’t provide this write buffer functions? I’ll try and figure it out…

1 Like

Hey, don’t discount it… I could still have stuffed something up… it got even weirder when I realised they were lib_ignoring Adafruit_Neopixel and SPI… so I tried commenting that out and I thing it got even more entertaining.

Against maple, it fails at

Compiling .pio/build/STM32F103RC_btt/libf84/U8glib-HAL/clib/u8g_virtual_screen.c.o
Compiling .pio/build/STM32F103RC_btt/lib990/Adafruit BusIO/Adafruit_BusIO_Register.cpp.o
Compiling .pio/build/STM32F103RC_btt/lib990/Adafruit BusIO/Adafruit_I2CDevice.cpp.o
Compiling .pio/build/STM32F103RC_btt/lib990/Adafruit BusIO/Adafruit_SPIDevice.cpp.o
.pio/libdeps/STM32F103RC_btt/Adafruit BusIO/Adafruit_I2CDevice.cpp: In member function 'bool Adafruit_I2CDevice::read(uint8_t*, size_t, bool)':
.pio/libdeps/STM32F103RC_btt/Adafruit BusIO/Adafruit_I2CDevice.cpp:160:79: error: no matching function for call to 'TwoWire::requestFrom(uint8_t, uint8_t, uint8_t)'
   size_t recv = _wire->requestFrom((uint8_t)_addr, (uint8_t)len, (uint8_t)stop);
                                                                               ^
In file included from /home/pfeerick/.platformio/packages/framework-arduinoststm32-maple/STM32F1/libraries/Wire/Wire.h:42:0,
                 from .pio/libdeps/STM32F103RC_btt/Adafruit BusIO/Adafruit_I2CDevice.h:1,
                 from .pio/libdeps/STM32F103RC_btt/Adafruit BusIO/Adafruit_I2CDevice.cpp:1:
/home/pfeerick/.platformio/packages/framework-arduinoststm32-maple/STM32F1/libraries/Wire/utility/WireBase.h:101:11: note: candidate: uint8 WireBase::requestFrom(uint8, int)
     uint8 requestFrom(uint8, int);
           ^~~~~~~~~~~
/home/pfeerick/.platformio/packages/framework-arduinoststm32-maple/STM32F1/libraries/Wire/utility/WireBase.h:101:11: note:   candidate expects 2 arguments, 3 provided
/home/pfeerick/.platformio/packages/framework-arduinoststm32-maple/STM32F1/libraries/Wire/utility/WireBase.h:106:11: note: candidate: uint8 WireBase::requestFrom(int, int)
     uint8 requestFrom(int, int);
           ^~~~~~~~~~~
/home/pfeerick/.platformio/packages/framework-arduinoststm32-maple/STM32F1/libraries/Wire/utility/WireBase.h:106:11: note:   candidate expects 2 arguments, 3 provided
*** [.pio/build/STM32F103RC_btt/lib990/Adafruit BusIO/Adafruit_I2CDevice.cpp.o] Error 1
.pio/libdeps/STM32F103RC_btt/Adafruit BusIO/Adafruit_SPIDevice.cpp: In member function 'void Adafruit_SPIDevice::transfer(uint8_t*, size_t)':
.pio/libdeps/STM32F103RC_btt/Adafruit BusIO/Adafruit_SPIDevice.cpp:119:31: error: no matching function for call to 'SPIClass::transfer(uint8_t*&, size_t&)'
     _spi->transfer(buffer, len);
                               ^
In file included from .pio/libdeps/STM32F103RC_btt/Adafruit BusIO/Adafruit_SPIDevice.h:1:0,
                 from .pio/libdeps/STM32F103RC_btt/Adafruit BusIO/Adafruit_SPIDevice.cpp:1:
Marlin/src/HAL/STM32F1/SPI.h:268:11: note: candidate: uint8_t SPIClass::transfer(uint8_t) const
   uint8_t transfer(uint8_t data) const;
           ^~~~~~~~
Marlin/src/HAL/STM32F1/SPI.h:268:11: note:   candidate expects 1 argument, 2 provided
*** [.pio/build/STM32F103RC_btt/lib990/Adafruit BusIO/Adafruit_SPIDevice.cpp.o] Error 1

So it’s something to do with Wire and SPI tripping it up there…

With board_build.core = stm32 it borks way eariler, with confetti like

Compiling .pio/build/STM32F103RC_btt/src/src/HAL/shared/HAL_spi_L6470.cpp.o
Compiling .pio/build/STM32F103RC_btt/src/src/HAL/shared/backtrace/backtrace.cpp.o
In file included from Marlin/src/HAL/STM32F1/dogm/../../../inc/../HAL/./STM32F1/HAL.h:36,
                 from Marlin/src/HAL/STM32F1/dogm/../../../inc/../HAL/HAL.h:26,
                 from Marlin/src/HAL/STM32F1/dogm/../../../inc/MarlinConfig.h:30,
                 from Marlin/src/HAL/STM32F1/dogm/u8g_com_stm32duino_fsmc.cpp:29:
Marlin/src/HAL/STM32F1/dogm/../../../inc/../HAL/./STM32F1/fastio.h:30:10: fatal error: libmaple/gpio.h: No such file or directory
   30 | #include <libmaple/gpio.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pio/build/STM32F103RC_btt/src/src/HAL/STM32F1/dogm/u8g_com_stm32duino_fsmc.cpp.o] Error 1
In file included from Marlin/src/HAL/STM32F1/../../inc/../HAL/./STM32F1/HAL.h:36,
                 from Marlin/src/HAL/STM32F1/../../inc/../HAL/HAL.h:26,
                 from Marlin/src/HAL/STM32F1/../../inc/MarlinConfig.h:30,
                 from Marlin/src/HAL/STM32F1/onboard_sd.cpp:15:
Marlin/src/HAL/STM32F1/../../inc/../HAL/./STM32F1/fastio.h:30:10: fatal error: libmaple/gpio.h: No such file or directory
   30 | #include <libmaple/gpio.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pio/build/STM32F103RC_btt/src/src/HAL/STM32F1/onboard_sd.cpp.o] Error 1
In file included from Marlin/src/HAL/shared/../../inc/../HAL/./STM32F1/HAL.h:36,
                 from Marlin/src/HAL/shared/../../inc/../HAL/HAL.h:26,
                 from Marlin/src/HAL/shared/../../inc/MarlinConfig.h:30,
                 from Marlin/src/HAL/shared/HAL_spi_L6470.cpp:28:
Marlin/src/HAL/shared/../../inc/../HAL/./STM32F1/fastio.h:30:10: fatal error: libmaple/gpio.h: No such file or directory
   30 | #include <libmaple/gpio.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pio/build/STM32F103RC_btt/src/src/HAL/shared/HAL_spi_L6470.cpp.o] Error 1
In file included from Marlin/src/HAL/shared/backtrace/../../../core/../inc/../HAL/./STM32F1/HAL.h:36,
                 from Marlin/src/HAL/shared/backtrace/../../../core/../inc/../HAL/HAL.h:26,
                 from Marlin/src/HAL/shared/backtrace/../../../core/../inc/MarlinConfig.h:30,
                 from Marlin/src/HAL/shared/backtrace/../../../core/serial.h:24,
                 from Marlin/src/HAL/shared/backtrace/backtrace.cpp:29:
Marlin/src/HAL/shared/backtrace/../../../core/../inc/../HAL/./STM32F1/fastio.h:30:10: fatal error: libmaple/gpio.h: No such file or directory
   30 | #include <libmaple/gpio.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pio/build/STM32F103RC_btt/src/src/HAL/shared/backtrace/backtrace.cpp.o] Error 1

Since …

lib_ignore        = Adafruit NeoPixel, SPI

seemed to, well, be getting ignored, I thought, let’s comment that out then… well, that broke Maple even quicker! :laughing:

At that point, I’d had enough poking around… Either way… it seems something has changed in the eight months since they wrote the code…

Okay if the Marlin HAL is including libmaple then it absolutely needs the Maple core.

Maybe they worked with a different version of the ststm32 platform and thus Arduino core? (or it really is a pio core problem). Do they pin platform = ststm32@..?

Nope… I’m trying it again now with 6.1.1 as that’s about the right age…

Edit: nada… same error. Other problem is most of the libraries are pulling from the master branches directly, with very few pinned versions… so if it is something that’s changed in BusIO that’ll be fun also… locked in Adafruit Neopixel @ 1.3.4 in the common libs, and added adafruit/Adafruit BusIO @ 1.2.3 since it was being automatically pulled in… and nope, that didn’t end well either…

Hi Gentlemen,
in parallel I have send a “Help!” to BTT and send them the configs and platformIO.ini!
Today the came back with a mail that they have updated ,git and it should compile!!

" We have updated the firmware folder and can now compile.

Firmware link:

BIGTREETECH-SKR-E3-DIP-V1.0/Firmware at master · bigtreetech/BIGTREETECH-SKR-E3-DIP-V1.0 · GitHub"

I have downloaded the software and tried - still “CC” - error

Oh great compilation now works perfectly. Just executing pio run in the folder Marlin-2.0.7.2-SKR-E3-DIP with the default selected environment STM32F103RC_btt gives:

>pio run
Processing STM32F103RC_btt (platform: ststm32@~6.1; board: genericSTM32F103RC; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Platform Manager: Installing ststm32 @ ~6.1
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Platform Manager: ststm32 @ 6.1.1 has been installed!
The platform 'ststm32@~6.1' has been successfully installed!
The rest of the packages will be installed later depending on your build environment.
Tool Manager: Installing framework-arduinoststm32-maple @ ~2.10000.0
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Tool Manager: framework-arduinoststm32-maple @ 2.10000.200103 has been installed!
Tool Manager: Installing tool-stm32duino @ *
Downloading  [####################################]  100%
Tool Manager: tool-stm32duino @ 1.0.2 has been installed!
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/genericSTM32F103RC.html
PLATFORM: ST STM32 (6.1.1) > STM32F103RC (48k RAM. 256k Flash)
HARDWARE: STM32F103RCT6 72MHz, 48KB RAM, 256KB Flash
DEBUG: Current (blackmagic) External (blackmagic, jlink, stlink)
PACKAGES:
 - framework-arduinoststm32-maple 2.10000.200103 (1.0.0)
 - tool-stm32duino 1.0.2
 - toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
Converting Marlin.ino
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Library Manager: Installing SoftwareSerialM
Library Manager: SoftwareSerialM @ 1.0.0 has been installed!
Library Manager: Installing U8glib-HAL @ ~0.4.1
Library Manager: Warning! More than one package has been found by U8glib-HAL @ ~0.4.1 requirements:
 - marlinfirmware/U8glib-HAL @ 0.4.3
 - thinkyhead/U8glib-HAL @ 0.4.3
Library Manager: Please specify detailed REQUIREMENTS using package owner and version (showed above) to avoid name conflicts

Downloading  [########----------------------------]   24%

Downloading  [####################################]  100%
Library Manager: U8glib-HAL @ 0.4.3 has been installed!
Found 30 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <SoftwareSerialM> 1.0.0
|-- <U8glib-HAL> 0.4.3
|   |-- <Wire> 1.0
|-- <STM32ADC> 1.0
|-- <EEPROM>
|-- <USBComposite for STM32F1> 0.91
|-- <Wire> 1.0
|-- <FreeRTOS701>
|-- <Servo(STM32F1)> 1.1.2
Building in release mode
Compiling .pio\build\STM32F103RC_btt\FrameworkArduinoVariant\board.cpp.o
[..]
Linking .pio\build\STM32F103RC_btt\firmware.elf
Building .pio\build\STM32F103RC_btt\firmware.bin
Checking size .pio\build\STM32F103RC_btt\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [===       ]  30.0% (used 14760 bytes from 49152 bytes)
Flash: [========  ]  80.4% (used 210868 bytes from 262144 bytes)
========================================================================================= [SUCCESS] Took 90.50 seconds =========================================================================================

Environment      Status    Duration
---------------  --------  ------------
STM32F103RC_btt  SUCCESS   00:01:30.498
========================================================================================== 1 succeeded in 00:01:30.498 ==========================================================================================
1 Like

I suspect you have a general problem with PlatformIO.

Please do the following: Open a PlatformIO CLI and execute the two commands

pio upgrade --dev
pio platform update
pio platform install ststm32@~6.1

then restart VSCode.

Then, in the PIO home, on the left side go to “New Project”, write “STM32Test” as name and select the STM32F103RC as the board.

Then click finish. After the project has loaded up, open the platformio.ini and modify it to

[env:genericSTM32F103RC]
platform = ststm32@~6.1
board = genericSTM32F103RC
framework = arduino

The src/main.cpp should already contain the content

#include <Arduino.h>

void setup() {
  // put your setup code here, to run once:
}

void loop() {
  // put your main code here, to run repeatedly:
}

(double check that.).

Then go to the project tasks and start the default Build action.

It should result in “Sucess”. Can you confirm that or post an error message?

Hi Max,
wow! That looks good! Unfortunately it’s too late on my side, so I have to do the test tomorrow!
Really looking foreward to the test! But anyways - great job you guys have done so far!!
Best regards
Hans

1 Like

Hi Max and and Erick,
moments like this are the nicest you can think of! It worked with the recipe of Max!!
Thanks a lot! That has taken a huge rock from my soul! Now I can start to implement all my add-ons and, of course , reverse it, if not meeting the expectations!
If you guys would be in Germany, I would send you a box of beer of your choise!
Just 1000+ thanks from my side!!

Last Question: Now I have this setup, I can compile - modify -compile without going through the preparations Max suggested !?
Only when the Marlin-Software is somehow updated, I better run this procedure again!?
Am I right?
Warmes Regards
Hans

1 Like

Hi,
the bloody bad thing is - after my success with Max’s recipe - I changed in Configuration.h the X and Y axis definition (…default) as I originally had there the TCM2208 drivers sitting on a DIP socket.
Don’t need them for closed loop, as the controller sits directly on the stepper.
No idea why it skrews up again??? What am I doing wrong??
I tried to clean up the whole thing, deleted all projects and started Max’s recipe again. No success!
Any idea Max?

Just for your info:

Processing genericSTM32F103RC (platform: ststm32@~6.1; board: genericSTM32F103RC; framework: arduino)
--------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/genericSTM32F103RC.html
PLATFORM: ST STM32 (6.1.1) > STM32F103RC (48k RAM. 256k Flash)
HARDWARE: STM32F103RCT6 72MHz, 48KB RAM, 256KB Flash
DEBUG: Current (blackmagic) External (blackmagic, jlink, stlink)
PACKAGES:
 - framework-arduinoststm32-maple 2.10000.200103 (1.0.0)
 - toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 30 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Compiling .pio\build\genericSTM32F103RC\FrameworkArduinoVariant\board.cpp.o
Compiling .pio\build\genericSTM32F103RC\FrameworkArduinoVariant\wirish\boards.cpp.o
Der Befehl "arm-none-eabi-g++" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
Der Befehl "arm-none-eabi-g++" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
Compiling .pio\build\genericSTM32F103RC\FrameworkArduinoVariant\wirish\boards_setup.cpp.o
*** [.pio\build\genericSTM32F103RC\FrameworkArduinoVariant\board.cpp.o] Error 1
Compiling .pio\build\genericSTM32F103RC\FrameworkArduinoVariant\wirish\start.S.o
*** [.pio\build\genericSTM32F103RC\FrameworkArduinoVariant\wirish\boards.cpp.o] Error 1
Der Befehl "arm-none-eabi-g++" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
*** [.pio\build\genericSTM32F103RC\FrameworkArduinoVariant\wirish\boards_setup.cpp.o] Error 1
Der Befehl "arm-none-eabi-gcc" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
*** [.pio\build\genericSTM32F103RC\FrameworkArduinoVariant\wirish\start.S.o] Error 1
================================================================= [FAILED] Took 3.12 seconds =================================================================PS C:\Users\elli\Documents\PlatformIO\Projects\Close-Loop> 

Just for those not capable of German -
… ist entweder falsch geschrieben oder konnte nicht gefunden werden.

means “written wrong or couldn’t be found”

You should not have had to… this was to ensure that the required platform files had been downloaded and installed properly on your system.

However, not finding arm-none-eabi-g++ is not a good sign, if it worked earlier. It would suggest something is deleting or blocking access to stuff. Perhaps your anti-virus software is being a bit too through? I would try again with it turned off, and if that works, try to find how to ‘allow’ the required compiler executables in your anti-virus software.

Hi Peter,
thanks for not giving up!!
When I go again through Max’s recipe - in the stage of “pio platform update” I get a warning and an error:
platformio/espressif32 (1.11.2) Yellow -[Detached]
platformio/toolchain-gccarmnoneeabi 1.90201.191206 @ >= 1.90000 Red - [Outdated 1.9031.200702]
This matches with your view in case of this missing part. So the question is - why did it worked once?
In this actual case I have disabled virus-protection- no change!?

So it all ends up in the file “c_cpp_properties.json” and shows 1 single error “compilerPath”: “arm-none-eabi-gcc”
How to solve it???

I don’t think the espressif32 (ESP32) has anything to do with Marlin, so it must be related to some other code you’ve been playing with. [Detached] basically means, if I remember correctly, that a specific version was pulled - or that it was a specific git version - actually, I think it is the latter. You should be able to ignore this for now.

toolchain-gccarmnoneeabi is the problem - as it is the toolchain needed to compile your project.

You could try pio platform uninstall ststm32 and then running pio platform install ststm32@~6.1 again. (You can also try adding -f for force to the install if it gives you an error). Although PIO should have managed the versions itself as needed, it’s possible there was a version mixup of toolchain-gccarmnoneeabi because of trying to build the other versions of the BigTreeTech Marlin code.