PlatformIO Community

Compilation filed! Marlin with STM32

Can not remove temporary directory `C:\Users\PC\Downloads\Marlin-bugfix-2.0.x\.pioenvs`. Please remove it manually to avoid build issues
Processing bluepill (platform: ststm32; framework: arduino; board: genericSTM32F103CB)
--------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/genericSTM32F103CB.html
PLATFORM: ST STM32 (12.1.1) > STM32F103CB (20k RAM. 128k Flash)
HARDWARE: STM32F103CBT6 72MHz, 20KB RAM, 128KB Flash
DEBUG: Current (blackmagic) External (blackmagic, cmsis-dap, jlink, stlink)
PACKAGES:
 - framework-arduinoststm32 4.10900.200819 (1.9.0)
 - framework-cmsis 2.50501.200527 (5.5.1)
 - toolchain-gccarmnoneeabi 1.90201.191206 (9.2.1)
C:\Users\PC\.platformio\python3\python.exe: can't open file 'C:\Users\PC\Downloads\Marlin-bugfix-2.0.x\Marlin\src\HAL\HAL_STM32F1\stm32f1_flag_script.py': [Errno 2] No such file or directory
OSError: 'python Marlin/src/HAL/HAL_STM32F1/stm32f1_flag_script.py -DMCU_STM32F103CB -D __STM32F1__=1  -std=c++1y -ffunction-sections -fdata-sections -Wl,--gc-sections -I Marlin/src/HAL/HAL_STM32F1' exited 2:
  File "C:\Users\PC\.platformio\penv\lib\site-packages\platformio\builder\main.py", line 181:
    env.SConscript("$BUILD_SCRIPT")
  File "C:\Users\PC\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Script\SConscript.py", line 597:
    return _SConscript(self.fs, *files, **subst_kw)
  File "C:\Users\PC\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Script\SConscript.py", line 285:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)       
  File "C:\Users\PC\.platformio\platforms\ststm32\builder\main.py", line 120:   
    target_elf = env.BuildProgram()
  File "C:\Users\PC\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Util.py", line 742:
    return self.method(*nargs, **kwargs)
  File "C:\Users\PC\.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py", line 61:
    env.ProcessProgramDeps()
  File "C:\Users\PC\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Util.py", line 742:
    return self.method(*nargs, **kwargs)
  File "C:\Users\PC\.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py", line 125:
    env.ProcessFlags(env.get("BUILD_FLAGS"))
  File "C:\Users\PC\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Util.py", line 742:
    return self.method(*nargs, **kwargs)
  File "C:\Users\PC\.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py", line 223:
    env.Append(**env.ParseFlagsExtended(flags))
  File "C:\Users\PC\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Util.py", line 742:
    return self.method(*nargs, **kwargs)
  File "C:\Users\PC\.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py", line 186:
    for key, value in env.ParseFlags(str(raw)).items():
  File "C:\Users\PC\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Environment.py", line 815:
    do_parse(arg)
  File "C:\Users\PC\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Environment.py", line 667:
    arg = self.backtick(arg[1:])
  File "C:\Users\PC\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Environment.py", line 579:
    raise OSError("'%s' exited %d" % (command, status))
========================== [FAILED] Took 0.67 seconds ==========================
Environment    Status    Duration
-------------  --------  ------------
bluepill       FAILED    00:00:00.668
==================== 1 failed, 0 succeeded in 00:00:00.668 ==================== 
Процесс терминала "C:\Users\PC\.platformio\penv\Scripts\platformio.exe 'run'" был завершен с кодом выхода 1.

Looks like your Marlin download is severely outdated and corrupted (missing file). The .pioenvs folder hasn’t existed since… a year or so.

Download a fresh copy of Marlin and the needed configuration files.