Selecting a specific framework when generating an IDE project?

Hey all!

Does anyone know if there’s support for selecting a given framework when generating a project for an IDE? In my specific case I’d like to generate an eclipse project for the disco_f407vg platform while using the spl framework (rather than the mbed framework, which is used by default).

Thanks!
//Jonathan

You need to do 3 steps in this case:

  1. pio init --ide eclipse -b disco_f407vg
  2. Edit platformio.ini and set framework field to framework = spl
  3. Update project’s settings for spl. Just repeat step No.1.
1 Like

Ah, thanks! It wasn’t immediately clear that the ‘pio init’ command would respect any existing configuration, so fwiw adding a line to the help command could help others looking for the same solution. Regardless of that, thanks again!

Where do you propose to place this info?

I haven’t really thought this through yet, but as this is the current output


$ platformio  init

The current working directory /home/stm32dev will be used for project.
You can specify another project directory via
`platformio init -d %PATH_TO_THE_PROJECT_DIR%` command.

The next files/directories will be created in /home/stm32dev
platformio.ini - Project Configuration File. |-> PLEASE EDIT ME <-|
src - Put your source files here
lib - Put here project specific (private) libraries
Do you want to continue? [y/N]: n

then maybe something like


$ platform io init

The current working directory /home/stm32dev will be used for project.
You can specify another project directory via
`platformio init -d %PATH_TO_THE_PROJECT_DIR%` command.

Assuming an empty directory, the following files/directories will be created in /home/stm32dev
platformio.ini - Project Configuration File. |-> PLEASE EDIT ME <-|
src - Put your source files here
lib - Put here project specific (private) libraries

Should platformio.ini already exist its settings will be parsed and any associated
settings (such as IDE project settings) will be updated.
Do you want to continue? [y/N]: n

would be clearer? (Additionally, it might be good to update Redirecting... as well to clarify that an existing configuration file will, if detected, regenerate the project based on its settings).

But we have platformio.ini - Project Configuration File. |-> PLEASE EDIT ME <-|. Please edit me.

True, and it’s possible that most people won’t exhibit the same misunderstanding, but my assumption was that platformio.ini was only parsed by ‘pio run’ and its variants (which would make some kind of sense as there are many build-related options that can be configured). It all comes down to the desired level of verbosity in the project’s documentation =)

Would really help to have a simple description in the usage for platformio cmd indicating that specifying –help after a command will display usage for that particular command.