How to use the command pio boards (with examples)
The “pio boards” command is used to list pre-configured embedded boards available in PlatformIO. It provides information on various boards that are supported by PlatformIO, which can be useful for developers when selecting a board for their project.
Use case 1: List all available boards
Code:
pio boards
Motivation: The motivation for this use case is to get a comprehensive list of all the boards supported by PlatformIO. This can be helpful when you are looking for a specific board or exploring the available options for your project.
Explanation: The “pio boards” command without any additional arguments lists all the available boards in PlatformIO. It provides information such as the board name, platform, and framework supported by each board.
Example output:
ID MCU Frequency RAM Flash Name
----------------------------------------------------------------------
esp01 ESP8266EX 80MHz 80KB 1MB AI Thinker ESP8266
esp07 ESP8266EX 80MHz 80KB 1MB AI Thinker ESP8266
...
Use case 2: List only boards from installed platforms
Code:
pio boards --installed
Motivation: The motivation for this use case is to list only the boards that belong to the platforms that are currently installed in the local environment. This can be useful when you want to see the boards that are directly relevant to your current project without being overwhelmed by the entire list of available boards.
Explanation: The “–installed” argument filters the board list to include only the boards from the installed platforms. This helps to narrow down the list and focus on the boards that are currently usable in the local environment.
Example output:
ID MCU Frequency RAM Flash Name
----------------------------------------------------------------------
esp01 ESP8266EX 80MHz 80KB 1MB AI Thinker ESP8266
...
Conclusion:
The “pio boards” command is a handy tool for exploring the available boards in PlatformIO. By using this command, developers can easily find information about various embedded boards supported by PlatformIO and choose the most suitable board for their project. Whether you need a complete list of all the boards or just the boards from installed platforms, the “pio boards” command provides flexibility and convenience for board selection.