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

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

[env:pro16MHzatmega168]
platform = atmelavr
framework = arduino
board = pro16MHzatmega168

[env:pro16MHzatmega328]
platform = atmelavr
framework = arduino
board = pro16MHzatmega328

[env:uno]
platform = atmelavr
framework = arduino
board = uno

Atom -> PlatformIO -> Build. Create paths

.pioenvs/pro16MHzatmega168
.pioenvs/pro16MHzatmega328
.pioenvs/uno

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.

[Platformio]
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)
[/quote]

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.