Can' build Mbed

Hi,

I have problem with platform, before this issue i can compile mbed source well, but i don’t know since when, it suddenly getting error. First i taught it maybe cause by the VSCode, and then i try in Atom but same error then i use PIO CLI to compile the project MBED, but still get same error. Here is the error i got:

Processing bluepill_f103c8 (platform: ststm32; board: bluepill_f103c8; framework: mbed)

Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: Redirecting...
PLATFORM: ST STM32 6.0.0 > BluePill F103C8
HARDWARE: STM32F103C8T6 72MHz, 20KB RAM, 64KB Flash
DEBUG: Current (stlink) External (blackmagic, jlink, stlink)
PACKAGES:

  • framework-mbed 5.51401.200110 (5.14.1)
  • toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
    Collecting mbed sources…
    LDF: Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    TypeError: argument of type ‘int’ is not iterable:
    File “C:\Users\fmukhtarif.platformio\penv\lib\site-packages\platformio\builder\main.py”, line 156:
    env.SConscript(“$BUILD_SCRIPT”)
    File “C:\Users\fmukhtarif.platformio\packages\tool-scons\script..\engine\SCons\Script\SConscript.py”, line 541:
    return _SConscript(self.fs, *files, **subst_kw)
    File “C:\Users\fmukhtarif.platformio\packages\tool-scons\script..\engine\SCons\Script\SConscript.py”, line 250:
    exec file in call_stack[-1].globals
    File “C:\Users\fmukhtarif.platformio\platforms\ststm32\builder\main.py”, line 98:
    target_elf = env.BuildProgram()
    File “C:\Users\fmukhtarif.platformio\packages\tool-scons\script..\engine\SCons\Environment.py”, line 224:
    return self.method(*nargs, **kwargs)
    File “C:\Users\fmukhtarif.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py”, line 62:
    env.ProcessProjectDeps()
    File “C:\Users\fmukhtarif.platformio\packages\tool-scons\script..\engine\SCons\Environment.py”, line 224:
    return self.method(*nargs, **kwargs)
    File “C:\Users\fmukhtarif.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py”, line 131:
    project_lib_builder = env.ConfigureProjectLibBuilder()
    File “C:\Users\fmukhtarif.platformio\packages\tool-scons\script..\engine\SCons\Environment.py”, line 224:
    return self.method(*nargs, **kwargs)
    File “C:\Users\fmukhtarif.platformio\penv\lib\site-packages\platformio\builder\tools\piolib.py”, line 1031:
    lib_builders = env.GetLibBuilders()
    File “C:\Users\fmukhtarif.platformio\packages\tool-scons\script..\engine\SCons\Environment.py”, line 224:
    return self.method(*nargs, **kwargs)
    File “C:\Users\fmukhtarif.platformio\penv\lib\site-packages\platformio\builder\tools\piolib.py”, line 956:
    lb = LibBuilderFactory.new(env, lib_dir)
    File “C:\Users\fmukhtarif.platformio\penv\lib\site-packages\platformio\builder\tools\piolib.py”, line 57:
    obj = getattr(sys.modules[name], clsname)(env, path, verbose=verbose)
    File “C:\Users\fmukhtarif.platformio\penv\lib\site-packages\platformio\builder\tools\piolib.py”, line 132:
    self.process_extra_options()
    File “C:\Users\fmukhtarif.platformio\penv\lib\site-packages\platformio\builder\tools\piolib.py”, line 560:
    self._process_mbed_lib_confs()
    File “C:\Users\fmukhtarif.platformio\penv\lib\site-packages\platformio\builder\tools\piolib.py”, line 583:
    macros.update(self._mbed_lib_conf_parse_macros(mbed_lib_path))
    File “C:\Users\fmukhtarif.platformio\penv\lib\site-packages\platformio\builder\tools\piolib.py”, line 608:
    if “value” not in options:
    ====================================================== [FAILED] Took 7.79 seconds ======================================================

I try to update the platformio and update the mbed framework but nothing work. could you give me hint?

For whatever reasons its failing to iterate through options as it its an integer. What is the platformio.ini and libraries you’re using?

My code just simple, trying which libs can i use for writing SDCARD. Here my code:

Code:
#include “mbed.h”
#include “SDBlokdeDevice.h”

SDBlockDevice sd(p5, p6, p7, p12); // mosi, miso, sclk, cs
uint8_t block[512] = “Hello World!\n”;

int main() {
sd.init();
sd.write(block, 0, 512);
sd.read(block, 0, 512);
printf(“%s”, block);
sd.deinit();
while(true);
return 0;
}

And platformio.ini

Code:
[env:bluepill_f103c8]
platform = ststm32
board = bluepill_f103c8
framework = mbed

And also CTRL+ALT+B didn’t work rather than said “No task to run found. Configure Tasks…”