This is a devcontainer for PlatformIO with Visual Studio Code.
Use Dockerfile
as the build file for the devcontainer.
{
"name": "PlatformIO devcontainer",
"build": {
"dockerfile": "Dockerfile"
}
...
}
Use hsun1031/devcontainer_platformio
as the base image.
{
"name": "PlatformIO devcontainer",
"image": "hsun1031/devcontainer_platformio:latest",
...
}
Init platformio project. board list
pio init --ide vscode --board <your board>
Login platformio account.
pio account login
[Remote MCU] Connect to the device.
pio remote agent start
[Codespace] List for remote devices.
pio remote device list
Flash and Monitor.
pio remote run --target upload --environment <your board>
pio remote device monitor
web-flash --chip <Yor Chip> .pio/build/<Your ENV>/firmware.elf
example:
web-flash --chip esp32 .pio/build/esp32doit-devkit-v1/firmware.elf