In my fork of platform-ststm32 there is new board defined, that is supported in v122 and v123 of mbed framework. I installed the platform using GH archive link:
$ pio platform install https://github.com/zgoda/platform-ststm32/archive/bluepill_f103c8.zip
PlatformManager: Installing bluepill_f103c8
Downloading...
Unpacking [####################################] 100%
ststm32 @ 0.1.0 has been successfully installed!
PackageManager: Installing toolchain-gccarmnoneeabi @ >=1.40803.0,<1.40805.0
toolchain-gccarmnoneeabi @ 1.40804.0 is already installed
PackageManager: Installing tool-scons @ >=2.3.0,<2.6.0
tool-scons @ 2.4.1 is already installed
The platform 'https://github.com/zgoda/platform-ststm32/archive/bluepill_f103c8.zip' has been successfully installed!
The rest of packages will be installed automatically depending on your build environment.
Now if I try to initialize test project for this board I get:
$ pio init -d testp01 -b bluepill_f103c8 --ide atom
The next files/directories have been created in /home/jazg/tmp/testp01
platformio.ini - Project Configuration File
src - Put your source files here
lib - Put here project specific (private) libraries
Error: [Wed Aug 24 11:49:13 2016] Processing bluepill_f103c8 (platform: ststm32, board: bluepill_f103c8, framework: mbed)
------------------------------------------------------------------------------------------------------------------------
PackageManager: Installing framework-mbed @ ~1.121.0
Downloading...
Unpacking...
framework-mbed @ 1.121.1 has been successfully installed!
Verbose mode can be enabled via `-v, --verbose` option
Collected 3 compatible libraries
Looking for dependencies...
scons: warning: Ignoring missing SConscript '/home/jazg/.platformio/platforms/ststm32/builder/frameworks/mbed/mbed.py'
File "/home/jazg/.local/lib/python2.7/site-packages/platformio/builder/tools/platformio.py", line 248, in BuildFrameworks
KeyError: 'CPPPATH':
File "/home/jazg/.local/lib/python2.7/site-packages/platformio/builder/main.py", line 125:
env.SConscript("$BUILD_SCRIPT")
File "/home/jazg/.platformio/packages/tool-scons/script/../engine/SCons/Script/SConscript.py", line 551:
return _SConscript(self.fs, *files, **subst_kw)
File "/home/jazg/.platformio/packages/tool-scons/script/../engine/SCons/Script/SConscript.py", line 260:
exec _file_ in call_stack[-1].globals
File "/home/jazg/.platformio/platforms/ststm32/builder/main.py", line 145:
target_elf = env.BuildProgram()
File "/home/jazg/.platformio/packages/tool-scons/script/../engine/SCons/Environment.py", line 224:
return self.method(*nargs, **kwargs)
File "/home/jazg/.local/lib/python2.7/site-packages/platformio/builder/tools/platformio.py", line 61:
deplibs = env.BuildDependentLibraries("$PROJECTSRC_DIR")
File "/home/jazg/.platformio/packages/tool-scons/script/../engine/SCons/Environment.py", line 224:
return self.method(*nargs, **kwargs)
File "/home/jazg/.local/lib/python2.7/site-packages/platformio/builder/tools/piolib.py", line 543:
project.search_deps_recursive(lib_builders)
File "/home/jazg/.local/lib/python2.7/site-packages/platformio/builder/tools/piolib.py", line 325:
search_paths)
File "/home/jazg/.local/lib/python2.7/site-packages/platformio/builder/tools/piolib.py", line 272:
for inc in self._get_found_includes(lib_builders, search_paths):
File "/home/jazg/.local/lib/python2.7/site-packages/platformio/builder/tools/piolib.py", line 235:
items = tuple(self.env.Dir(d) for d in lb.get_inc_dirs())
File "/home/jazg/.local/lib/python2.7/site-packages/platformio/builder/tools/piolib.py", line 454:
for path in self.env['CPPPATH']:
File "/home/jazg/.platformio/packages/tool-scons/script/../engine/SCons/Environment.py", line 410:
return self._dict[key]
============================================== [ERROR] Took 32.57 seconds ==============================================
Is there anything I should do additionally to get newer mbed framework version?
In this case, need to use plain Git repository URL. PlatformIO Package Manager will handle submodules automatically. Try:
pio platform install https://github.com/zgoda/platform-ststm32.git#bluepill_f103c8
```
P.S: Also, you can test custom board without forking development platform. See updated docs http://docs.platformio.org/en/latest/platforms/creating_board.html
Thanks, the idea is to have support for this board in platform-ststm32 and that’s the purpose of fork. Will do a PR when I confirm this board is working properly.
That because @valeros has not merged feature/new-mbed-builder-integration to develop branch yet. Please install feature/new-mbed-builder-integration and place temporary your board to boards folder in the platform root.
pio platform uninstall ststm32
pio platform install https://github.com/platformio/platform-ststm32.git#feature/new-mbed-builder-integration
Then, if it works, @valeros will merge feature/new-mbed-builder-integration to develop. Please test new ARM mbed builder with your different projects.
Thank you, this time it worked, project has been properly initialized and I was able to build MBED_BLINKY example without errors. Will report back if it works on the board later today as I don’t have it at hand.
One thing that is missing is the upload protocol that is specified in board def as stlink and did not made into platformio.ini file.