New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to initialise PlatformIO project for the specified IDE #151

Closed
ivankravets opened this Issue Apr 2, 2015 · 7 comments

Comments

Projects
None yet
4 participants
@ivankravets
Member

ivankravets commented Apr 2, 2015

Aims

PlatformIO can be integrated to multiple IDE/editors using a few installation/customisation steps. They are described in main documentation. Will be useful to have additional option --ide to platformio init command.

How it works

If user specifies supported --ide type, then PlatformIO generates fully compatible project for the specified IDE (configuration files, etc.). This project can be imported later via IDE -> Import Project and should contain preconfigured settings:

  • Include Search Path: add to "Indexer Include Path" all paths from toolchain, framework, SDK
  • Build System: configure build system for project to: build command - platformio --quiet run, clean command - platformio --quiet run --target clean
  • Preprocessor definitions/symbols: Specific definitions based on board type, like __AVR_ATmega328__

IDE

We should support these IDE/Editors from the beginning:

  • eclipse Eclipse
  • visualstudio Visual Studio
  • sublimetext Sublime Text
  • qtcreator Qt Creator

Examples

# Arduino compatible project for Eclipse
$ platformio init --board=uno --ide=eclipse

# mbed compatible project for Microsoft Visual Studio
$ platformio init --board=lpc1768  --ide=visualstudio

Questions

How about multiple --board options or environments?

If more then one board is specified, then "first-generated" environment should be used. Nevertheless, we will add additional option, like use_for_ide = true to [env:xxx] group in platformio.ini.

@ivankravets

This comment has been minimized.

Member

ivankravets commented Apr 2, 2015

@valeros please look into @0xc0170 https://github.com/0xc0170/project_generator

Looks like what do we need. Nevertheless, project_generator supports only eclipse, but we can extend this list via templates.

@matthewelse

This comment has been minimized.

matthewelse commented Apr 2, 2015

0xc0170/project_generator might save you a bit of work with exporting to IDEs - we currently don't support visualstudio or sublimetext, however it wouldn't take much work to get those working. The only problem is that project_generator is currently only used with ARM architecture processors, however it wouldn't take very much work to get this to work with AVR and others. I've actually been meaning to add sublimetext support to pgen since it's what I always use, so I'll open an issue over there now.
We'd definitely welcome any contribution you guys are able to make, especially towards supporting different architectures.

if you have any questions about project_generator ask me or @0xc0170

@ivankravets

This comment has been minimized.

Member

ivankravets commented Apr 2, 2015

@matthewelse Thanks, see my comment above 👍

The only problem is that project_generator is currently only used with ARM architecture processors, however it wouldn't take very much work to get this to work with AVR and others

Do we have option to specify own Preprocessor definitions/symbols and Build System? It is important for us, because PlatformIO has own code builder and uses own pre-built toolchains, frameworks and etc . In other words, it is replacement for internal IDE's build system.

These Include Search Path and Preprocessor definitions/symbols are need just for correct "code completion" and "Realtime Indexer".

See examples:

@matthewelse

This comment has been minimized.

matthewelse commented Apr 2, 2015

I guess that you mean doing platformio run instead of make as part of the build system?

@ivankravets

This comment has been minimized.

Member

ivankravets commented Apr 2, 2015

Yes. See Get Started.

@0xc0170

This comment has been minimized.

0xc0170 commented Apr 2, 2015

All project settings are predefined by a user in yaml files -> dictionaries, thus if a project dictionary is filled with proper data, it can be passed to pgen to export the project files. Is this enhancement to create a full project (all source files, include paths, macros in the IDE) ? Or just required project files with defined output binary created by your build system, be available for debugging? If you got questions, create a new issue on pgen github. We can continue the discussion there, if needed.

I would like to see more tools supported, as mentioned above, like sublime, visual studio or any other which users prefer to use.

@ivankravets

This comment has been minimized.

Member

ivankravets commented Apr 3, 2015

@0xc0170, I've just opened a new issue #154. We will show you what do we need in the final result.

Here are a few examples with Eclipse: https://github.com/platformio/platformio/tree/develop/examples/ide-eclipse

Is this enhancement to create a full project (all source files, include paths, macros in the IDE) ?

Just: include paths, macros + replacement of internal build system to PlatformIO Code Builder.

If you got questions, create a new issue on pgen github.

I create new issue on pgen project if the issue #154 will be fixed. I need to show you a few examples with configuration files which we need and how they should be filled.

Thanks!

@ivankravets ivankravets referenced this issue Apr 6, 2015

Closed

PlatformIO 2.0 #159

11 of 11 tasks complete

ivankravets added a commit that referenced this issue Apr 24, 2015

@ivankravets ivankravets assigned ivankravets and unassigned valeros May 7, 2015

ivankravets added a commit that referenced this issue May 22, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment