[Implemented] Multitarget refinement, when developing for many boards at once

This is not good argument. I don’t want to force you to use our IDE. If you take a look at a few professional IDEs you will see that they have deal with PROJECT where the only one business logic reflected in it. Ok, I’ll try explain you why we can’t propose user to use “one opened folder” for multiple projects. Having 1 projected opened within PlatformIO IDE:

  1. Allows to integrate Code Linter and Code Completion. If you have multiple “virtual projects” under real project, these instruments will not work properly.
  2. You always see the current active project when edit multiple files form the different opened projects.
  3. You have ability to re-run the latest target from build panel
  4. PlatformIO Terminal opens with CWD from the current project. It allows to use PlatformIO CLI /IDE in the same place with the all functionality.
  5. And … and … and…

Please try it, I hope you will like it.

No argument! For the record, I am absolutely not requesting that atom behavior. Only the default environment behavior – I only brought it up 'cause you asked … ! =)

1 Like

I’ve just wanted to understand which problems with PlatformIO IDE has our valuable customer :blush:

1 Like

I seem to understand what the author wants to tell you.
In the Java development world, there are some analogue of the make utility. It is called Apache Maven

At the root of each project is pom.xml file
The parent directory can have a pom.xml file. ordering of the modules listed in this file.

There are several similar systems in Ruby and other languages.

The most important thing in maven - a repository of the collected components.
In the project file, we indicate dependence on another project. Maven takes from his vault with the library, based versions.

PlatformIO Arduino IDE and have a system of external libraries.
Maven is a project build system and library catalog management system.

During assembly, you can specify the name of the current profile. You can specify a set of variables and specific libraries in the profile.

Sorry if I misunderstood the author’s idea.

You can can explain PlatformIO what it should build. You can have multiple environments with the different libraries dependencies. PlatformIO CLI allows to run specific environments. However, author requested feature to have influence on default platformio run command because it process all envs by default.

We have opened issue Default env target for multi-environment situations · Issue #576 · platformio/platformio-core · GitHub and you will be able to change behaviour of pio run.

If some functionality is missed in PlatformIO don’t hesitate to write here. I’m open for discussion and are interested to make PlatformIO really professional ecosystem.

1 Like

It would be very convenient to have functionality of registration of the project as a library.
It is necessary, make changes to the project. Further, the command is sent project to library directory.

In this regard, there is in the maven project structure


It is not a mandatory reference to the parent project.


Here the main feature of the approach.
The parent can specify the working environment. Affiliated projects will use these settings.

I do not propose to use XML syntax. Other projects use different designs.

Where do you want to store this “project as a library”? In the PlatformIO Library Registry?

“project as a library” seems like:

a) an interesting idea
b) something to be moved to a different thread =)

1 Like

@alexey-su let’s move this discussion about Maven and Java workflow to separate subject. I’m new to Java & Maven.

Implemented in PlatformIO 2.9.0 Redirecting...

1 Like

Thank you! Now I can cool it on the symbolic linking =)

See Big Update! PlatformIO IDE 1.2.0 and PlatformIO CLI 2.9.0

1 Like

There is a project with many controllers.

  1. Arduino Pro mini AVR-168 16 MHz
  2. Arduino Pro mini AVR-328 16 MHz
  3. Arduino Uno AVR-328 16 MHz

File platformio.ini

platform = atmelavr
framework = arduino
board = pro16MHzatmega168

platform = atmelavr
framework = arduino
board = pro16MHzatmega328

platform = atmelavr
framework = arduino
board = uno

Atom -> PlatformIO -> Build. Create paths


To specify the current version of the controller, which I plan to flash?

See documentation for env_default.

Wonderful answer. You yourself checked?
We read what is written as an example.

env_default = uno, nodemcu

So the question of how the system recognizes which controller is currently connected, esp8266 or avr?

I’m mainly asking about PlatformIO IDE Atom opportunities.

I’d like to see the two options in the system menu

  1. select one of several devices connected to different USB ports;
  2. choice version for the connected controller.

I have now in the project there is no section with variable env_default. The system sequentially transmits to the controller, all three assembly.

Sorry, I thought you want to specify default environment that will be used for processing.

There 2 options:

  1. PlatformIO automatically tries to find appropriate upload port for the selected boards. See hardware IDs for Arduino UNO. If there no connected devices with one of these ID, then the first valid Serial Port will be picked up.

  2. You can manually specify upload_port for the environment.

USB HUB connect 3 devices:

~$ lsusb
Bus 002 Device 002: ID 046d:09b9 Logitech, Inc.
Bus 002 Device 013: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light
Bus 002 Device 012: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light
Bus 002 Device 008: ID 14cd:8601 Super Top
Bus 002 Device 011: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
Bus 002 Device 007: ID 14cd:8601 Super Top

ESP8266-12 NodeMCU V2 2MB
Device 013: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light

Arduino Pro Mini 328 16 MHz
Device 012: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light

Arduino UNO
Divice 11 - 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter

As you can see, my external USB controller firmware for Arduino Pro Mini and ESP8266-07 made that the same chip, the controller ESP8266-12 NodeMCU. This “CP210x UART Bridge”.

Atom -> PlatformIO -> Serial Monitor -> create dialog and select serial port.
But “Atom -> PlatformIO -> Upload” no select serial port.

You can create different environments with predefined upload_port and use Menu: PlatformIO > Run other target... or the quick build menu from the status bar PaltformIO: Build....

More details in docs Redirecting...

I have a suggestion. Let’s try to add a functional panel buttons.
The idea took on the Quick Launch Ubuntu Uniti.
Clicking the left mouse button to perform a normal operation. Clicking the right button brings up a sub-menu item. If you are happy owner of Ubuntu,
You can see this functionality at the Nautilus button.
“Build” button will display a drop down menu with the corresponding section of the dialog box
"Run other target …". A similar behavior for the button “Upload” and “Clean”.

And yeah, I do not understand what the difference between the two lines

  1. PlatformIO: Upload (env:pro16MHzatmega168)
  2. PlatformIO: Upload using Programmer (env:pro16MHzatmega168)
    It is that, in the first line I can fill in a binary module from ESP8266 in ARV?

This is a good idea but Atom Toolbar API doesn’t allow to do it :frowning: Maybe, they will add this support later. [quote=“alexey-su, post:29, topic:32”]
And yeah, I do not understand what the difference between the two lines1) PlatformIO: Upload (env:pro16MHzatmega168)2) PlatformIO: Upload using Programmer (env:pro16MHzatmega168)

See Atmel AVR — PlatformIO latest documentation
In the first case, the firmware will be upload to board directly via Serial Port. If you have other programmers, you can use them as “bridge”.

Please rephrase.