Newcomer can't get VS Code to run

It makes me wonder, why it seem to work with W-7 but not with W-10. Some people say that the autum-upgrade in W-10 was one of the worst in history! Many people complained about many things! Maybe that’s part of the mystery!

1 Like

Possibly. I would think it is more likely it is just that something was configured differently on your Windows 10 machine right from the start, and that’s been causing the issues all along. Could be absolutely anything… from python version originally installed on the machine, version of platformio and vscode installed, antivirus software, extensions installed, order stuff was done in… the list goes on. Normally stuff works fine, but when it goes wrong, it can be something simple, or something major, or like a set of dominos… where one thing leads to another.

Hi Peter, hi Max,
well, the question for me is now: Shall I close this issue or is anybody still interested to continue on the win-10 investigation case!? I would be fine with this to continue and try things you might come up with!
I’m more concerned about you guy’s! You spend a lot of time supporting me! And for me - I have my solution - compiling works! Of course on a different platform as expected - but I most important - I can compile! But on the other hand I learned - you guys don’t give up easy!! Impressive!
By the way - is there a place to donate something for the community?
Let me know your point of view!
Best Regards
Hans

I’ve been lurking as this is an interesting thread!

I recently installed VSCode and PlatformIO on Win10 with absolutely no problems. It might be difficult to get a proper Win10 setup to resemble yours for further testing.

I suspect, not that I’m biased, that Win10 is the problem. I much prefer Win7 when I’m at work and have to use Windows. (I’m an Oracle DBA with databases on Linux but access/workstation is currently Win10 “upgraded” from Win7.)

Cheers,
Norm.

You confused upgraded with downgraded :stuck_out_tongue:

You’re more than welcome to leave it open, be nice to get to the bottom of it, and get it working on your Win10 system also. At least you have a working setup to work from for now.

I’m just stumped on what to look at, and am not in a position where I can spend some time delving through the platformio init command code, to see why the compilerPath is only listing the exectutable name, and not the full path. i.e. C:\Users\elli\.platformio\packages\toolchain-gccarmnoneeabi\bin\arm-none-eabi-gcc.exe. It could be a gremlin there, which is or isn’t Windows 10 related, or it could be something to do with the C/C++ extension, as I don’t know how it interacts with the generation of the c_cpp_properties.json file.

There is a donate button down the bottom of the page - Your Gateway to Embedded Software Development Excellence · PlatformIO - or you can simply hang around and help someone else out when you can :wink:

Hi Peter,
thank you! Found the donate-button! Have done it!

So everybody is now welcome to tell me, what I could try next!
I leave my win-10 laptop unchanged until we find ( …hopefully) the gremlin!!
Regards
Hans

1 Like

Wow,
I earned an “Enthusiast-badge” for sticking with Platform-io for nearly two weeks!
That’s the benefit when you’re retired!!

1 Like

Hi there,
one question - I had the Marlin-stuff on a USB-Stick, as I had moved all Marlin-Data to my Win-7 laptop. I had the idea to try run all this on that stick. It did, of course, but the .pio and all the rest is written to the root on my win-10 laptop.
Is there a way to teach platformIO to write .pio to a different location?

Hi there,
the Marlin adventure goes on for me!
After the success with my win-7 laptop to compile a firmware.bin, I started to configure configuration.h for my BL-Touch device and tried to compile it!
No success - see the Error messages!
I don’t know why this is happening to me!
Any clues?
Regards
Hans

verbose mode can be enabled via `-v, --verbose` option

warning: Calling missing SConscript without error is deprecated.
Transition by adding must_exist=0 to SConscript calls.
Missing SConscript 'buildroot\share\PlatformIO\scripts\common-dependencies.py'
File "C:\users\acer\.platformio\penv\lib\site-packages\platformio\builder\main.py", line 168, in <module>
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)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 43 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <SoftwareSerialM> 1.0.0
|-- <USBComposite for STM32F1> 0.91
|-- <U8glib-HAL> 0.4.1
|   |-- <Wire> 1.0
|-- <Wire> 1.0
|-- <FreeRTOS701>
|-- <EEPROM>
|-- <Servo(STM32F1)> 1.1.2
|-- <STM32ADC> 1.0
|-- <SlowSoftI2CMaster> 0.0.0+20201114173225
|-- <SailfishRGB_LED> 0.0.0+20201114173224
|   |-- <Wire> 1.0
|-- <Adafruit NeoPixel> 1.4.0
|-- <TMCStepper> 0.6.2
|   |-- <SoftwareSerialM> 1.0.0
|-- <LiquidCrystal> 1.5.0
|   |-- <Wire> 1.0
|-- <LiquidTWI2> 1.2.7
|   |-- <Wire> 1.0
|-- <SailfishLCD> 0.0.0+20201114173223
|-- <Arduino-L6470> 0.8.0
|-- <Adafruit MAX31865 library> 1.2.1
|   |-- <Adafruit BusIO> 1.3.2
|   |   |-- <Wire> 1.0
Building in release mode

warning: Ignoring missing SConscript 'buildroot\share\PlatformIO\scripts\common-dependencies-post.py'
File "C:\users\acer\.platformio\penv\lib\site-packages\platformio\builder\main.py", line 178, in <module>
Archiving .pio\build\STM32F103RC_btt_USB\libd3b\libSailfishRGB_LED.a
Compiling .pio\build\STM32F103RC_btt_USB\libf0d\Adafruit NeoPixel_ID28\Adafruit_NeoPixel.cpp.o
Compiling .pio\build\STM32F103RC_btt_USB\libf0d\Adafruit NeoPixel_ID28\esp8266.c.o
Compiling .pio\build\STM32F103RC_btt_USB\lib265\TMCStepper_ID5513\source\CHOPCONF.cpp.o
In file included from .pio\libdeps\STM32F103RC_btt_USB\Adafruit NeoPixel_ID28\Adafruit_NeoPixel.cpp:46:0:
.pio\libdeps\STM32F103RC_btt_USB\Adafruit NeoPixel_ID28\Adafruit_NeoPixel.h:361:3: error: 'GPIO_TypeDef' does not name a type
   GPIO_TypeDef *gpioPort;       ///< Output GPIO PORT
   ^~~~~~~~~~~~
.pio\libdeps\STM32F103RC_btt_USB\Adafruit NeoPixel_ID28\Adafruit_NeoPixel.cpp: In member function 'void Adafruit_NeoPixel::show()':
.pio\libdeps\STM32F103RC_btt_USB\Adafruit NeoPixel_ID28\Adafruit_NeoPixel.cpp:1906:23: error: 'SysTick' was not declared in this scope
   uint32_t saveLoad = SysTick->LOAD, saveVal = SysTick->VAL;
                       ^~~~~~~
.pio\libdeps\STM32F103RC_btt_USB\Adafruit NeoPixel_ID28\Adafruit_NeoPixel.cpp:1916:28: error: 'gpioPort' was not declared in this scope
       LL_GPIO_SetOutputPin(gpioPort, gpioPin);
                            ^~~~~~~~
.pio\libdeps\STM32F103RC_btt_USB\Adafruit NeoPixel_ID28\Adafruit_NeoPixel.cpp:1916:28: note: suggested alternative: 'gpioPin'
       LL_GPIO_SetOutputPin(gpioPort, gpioPin);
                            ^~~~~~~~
                            gpioPin
.pio\libdeps\STM32F103RC_btt_USB\Adafruit NeoPixel_ID28\Adafruit_NeoPixel.cpp:1916:7: error: 'LL_GPIO_SetOutputPin' was not declared in this scope
       LL_GPIO_SetOutputPin(gpioPort, gpioPin);
       ^~~~~~~~~~~~~~~~~~~~
.pio\libdeps\STM32F103RC_btt_USB\Adafruit NeoPixel_ID28\Adafruit_NeoPixel.cpp:1919:7: error: 'LL_GPIO_ResetOutputPin' was not declared in this scope
       LL_GPIO_ResetOutputPin(gpioPort, gpioPin);
       ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated due to -fmax-errors=5.
*** [.pio\build\STM32F103RC_btt_USB\libf0d\Adafruit NeoPixel_ID28\Adafruit_NeoPixel.cpp.o] Error 1
================================================================ [FAILED] Took 53.90 seconds ================================================================

Environment          Status    Duration
-------------------  --------  ------------
STM32F103RC_btt_USB  FAILED    00:00:53.898
=========================================================== 1 failed, 0 succeeded in 00:00:53.898 ===========================================================
The terminal process "C:\Users\ACER\.platformio\penv\Scripts\pio.exe 'run'" terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

The Neopixel library can’t find some declarations. Systick is the internal timer of the ARM Cortex-M CPU.

Also from the dependency view it is using v1.4.0 of the library, whereas 1.7.0 is the current one. Maybe the library also expects the standard STM32Duino core and not the Maple core variant.

To debug this, are you able to upload the current state of the project to e.g. github or google drive (or any filesharing service)?

Hi Max,
yes, I should (…dropbox???)!
At the moment not enough time to follow up! Have to move my PC to a new one and have to clone my Disk!
I hope, this will not destroy the Gremlin!
Will come back when I finished the move!

Hi Max,
I have two projects uploaded to OneDrive. One is named Marlin-win10 (… the one with the possible “Gremlin”) the other named Marlin-win7 (which seemed to work, but the firmware I produced left the screen "blue"on my Ender 3).
The link : Microsoft OneDrive - Access files anywhere. Create docs with free Office Online.
So please let me know if you find something relevant!
Good luck!
Hans

Hi Max,
in playing around with the project (starting the setup from scratch…)
I got the following warning;

PS C:\Users\elli> pio upgrade --dev
Please wait while upgrading PlatformIO …
PlatformIO has been successfully upgraded to 5.0.4b1
Release notes: Redirecting...
Please wait while upgrading PlatformIO…
PlatformIO has been successfully upgraded to 5.0.4b1!

****************************************************************************************************************************************************If you like PlatformIO, please:


PS C:\Users\elli> pio platform install ststm32@~6.1
Platform Manager: Installing ststm32 @ ~6.1
Downloading [####################################] 100%
Unpacking [####################################] 100%
Platform Manager: ststm32 @ 6.1.1 has been installed!
Tool Manager: Installing toolchain-gccarmnoneeabi @ >=1.60301.0,<1.80000.0
Tool Manager: Warning! More than one package has been found by toolchain-gccarmnoneeabi @ >=1.60301.0,<1.80000.0 requirements:

  • platformio/toolchain-gccarmnoneeabi @ 1.90301.200702
  • maxgerhardt/toolchain-gccarmnoneeabi @ 1.40903.0
    Tool Manager: Please specify detailed REQUIREMENTS using package owner and version (showed above) to avoid name conflicts
    Downloading [####################################] 100%
    Unpacking [####################################] 100%
    Tool Manager: toolchain-gccarmnoneeabi @ 1.70201.0 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.
    PS C:\Users\elli>

Is this something (… avoid name conflicts) one should care about or can it be ignored?

Hi,
I’m quite puzzelt!
As I mentioned before - I deleted everything under the root (.platformio, .vscode …), and start the project from scratch - it compiles with no warning, no error (see listing …).
The remaining thing is that the resulting firmware.bin seems to be too small! The pre-defined firmware-files from btt are always in the range of 200 - 230 kB. My resulting firmware.bin is just 19 kB !? while firmware.elf is more than 400 kB! By the wy - what is firmware.elf for??
This was produced on my win-10 laptop!

Executing task in folder Marlin-2.0.7.2-SKR-mini-E3-V1.0: C:\Users\elli.platformio\penv\Scripts\pio.exe run <

Processing STM32F103RC_btt_USB (platform: ststm32@~6.1; board: genericSTM32F103RC; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: Redirecting...
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)
    LDF: Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 31 compatible libraries
    Scanning dependencies…
    Dependency Graph
    |-- 1.0.0
    |-- 0.91
    |-- 0.7.1
    | |-- 1.0.0
    |-- 0.4.3
    | |-- 1.0
    |-- 1.0
    |--
    |--
    |-- <Servo(STM32F1)> 1.1.2
    |-- 1.0
    Building in release mode
    Checking size .pio\build\STM32F103RC_btt_USB\firmware.elf
    Advanced Memory Usage is available via “PlatformIO Home > Project Inspect”
    RAM: [= ] 9.9% (used 4888 bytes from 49152 bytes)
    Flash: [= ] 7.3% (used 19088 bytes from 262144 bytes)
    =========================================================== [SUCCESS] Took 20.94 seconds ===========================================================
    Environment Status Duration

STM32F103RC_btt_USB SUCCESS 00:00:20.945
=========================================================== 1 succeeded in 00:00:20.945 ===========================================================

Terminal will be reused by tasks, press any key to close it.

Hi folks,
I’m still confused!
I am now able to get a sort of “clean” compilation with no errors no warnings on my win-10 laptop! I also get a firmware.bin - but too small and not working on the board. Gives me a “blue screen” on Ender 3.
Anyone able to explain this??
Regards
Hans

Hi folks,
just want to let you know that I reached my target and (… so far) can now modify, compile and flash my 3D-Printer!!
After all my week-long survey, I found an "updated " video from “teaching tech” where he showed “another” of the many unsuccessful approaches to get Marlin and it’s environment compiled without errors and put it all into a firmware.bin that flashes the controllerboard (btt) correctly!
The path to that video is : Updated Marlin firmware setup guide - VS Code and Auto Build Marlin - YouTube
It is a rather simple approach but finally works! Funny enough - with my firt try to compile I got “tons” of warnings and errors - but with a second try (… without any changes!!) it compiled without errors!!
When I have a little time, I will put this recipe to paper: I 'm afraid that not ony me struggles to get this flexibility that you need to use add-on’s with your 3D-Printer!
But I won’t forget to praise Max and Peter for their patience in trying to help a newcomer!!
Regards from a pretty happy 3dhans and also a Happy New Year!!

2 Likes