PlatformIO Community

How to add `native` platform to CLion

I added

[env:native]
platform = native

to platform.ini.
What should I do so CLion recognizes it as new configuration?

I tried to rebuild project index but I got

Error: Traceback (most recent call last):
  File "/usr/local/Cellar/platformio/3.5.1/libexec/lib/python2.7/site-packages/platformio/__main__.py", line 90, in main
    cli(None, None, None)
  File "/usr/local/Cellar/platformio/3.5.1/libexec/lib/python2.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/Cellar/platformio/3.5.1/libexec/lib/python2.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/Cellar/platformio/3.5.1/libexec/lib/python2.7/site-packages/platformio/commands/__init__.py", line 37, in invoke
    return super(PlatformioCLI, self).invoke(ctx)
  File "/usr/local/Cellar/platformio/3.5.1/libexec/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/Cellar/platformio/3.5.1/libexec/lib/python2.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/Cellar/platformio/3.5.1/libexec/lib/python2.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/Cellar/platformio/3.5.1/libexec/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/Cellar/platformio/3.5.1/libexec/lib/python2.7/site-packages/platformio/commands/init.py", line 106, in cli
    pg.generate()
  File "/usr/local/Cellar/platformio/3.5.1/libexec/lib/python2.7/site-packages/platformio/ide/projectgenerator.py", line 140, in generate
    contents = self._render_tpl(tpl_path, tpl_vars)
  File "/usr/local/Cellar/platformio/3.5.1/libexec/lib/python2.7/site-packages/platformio/ide/projectgenerator.py", line 145, in _render_tpl
    return bottle.template(get_file_contents(tpl_path), **tpl_vars)
  File "/usr/local/Cellar/platformio/3.5.1/libexec/bin/bottle.py", line 3624, in template
    return TEMPLATES[tplid].render(kwargs)
  File "/usr/local/Cellar/platformio/3.5.1/libexec/bin/bottle.py", line 3413, in render
    self.execute(stdout, env)
  File "/usr/local/Cellar/platformio/3.5.1/libexec/bin/bottle.py", line 3400, in execute
    eval(self.co, env)
  File "<string>", line 64, in <module>
  File "/usr/local/Cellar/platformio/3.5.1/libexec/lib/python2.7/site-packages/platformio/project/helpers.py", line 220, in load_project_ide_data
    if len(envs) == 1 and envs[0] in data:
TypeError: 'set' object does not support indexing

============================================================

An unexpected error occurred. Further steps:

* Verify that you have the latest version of PlatformIO using
  `pip install -U platformio` command

* Try to find answer in FAQ Troubleshooting section
  https://docs.platformio.org/page/faq.html

* Report this problem to the developers
  https://github.com/platformio/platformio-core/issues

============================================================

The issue was fixed in upcoming PIO Core 4.1. Could you re-test with pio upgrade --dev?

That works, thank you