Pular para o conteúdo principal

PlatformIO Core (CLI)

CLI Guide​

%USERPROFILE%

{
"terminal.integrated.defaultProfile.windows": "PlatformIO CLI",

"terminal.integrated.profiles.windows": {
"PlatformIO CLI": {
"path": "cmd.exe",
"args": [
"/k",
"${env:USERPROFILE}\\.platformio\\penv\\Scripts\\activate.bat && pio --version"
],
"icon": "python",
"overrideName": true
}
}
}

Get started​

Configuration​

; Common configuration
[env]
platform = espressif32@^5
framework = arduino
board = esp32doit-devkit-v1
monitor_speed = 921600
monitor_filter = esp32_exception_decoder
lib_deps =
nanopb/Nanopb @ ^0.4.6
infineon/TLV493D-Magnetic-Sensor @ ^1.0.3
build_flags =
-D ARDUINO_LOOP_STACK_SIZE=2048
-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
-Wno-nonnull-compare

; Production environment
[env:release]
build_flags =
${env.build_flags}
-D PRODUCTION=1

; Development environment
[env:develop]
build_type = debug
lib_deps =
${env.lib_deps}
bakercp/PacketSerial @ 1.4.0
debug_extra_cmds =
set remote hardware-watchpoint-limit 2

pio boards​

pio boards --installed
pio boards ststm32
pio boards pio boards STM32F411CEU6
Platform: ststm32
=========================================================================================================
ID MCU Frequency Flash RAM Name
------------------ ------------- ----------- ------- ----- -----------------------------------------
pybstick26_std STM32F411CEU6 100MHz 512KB 128KB PYBStick Standard 26
genericSTM32F411CE STM32F411CEU6 100MHz 512KB 128KB STM32F411CE (128k RAM. 512k Flash)
thunder_pack_f411 STM32F411CEU6 100MHz 512KB 128KB ThunderPack v1.1+
blackpill_f411ce STM32F411CEU6 100MHz 512KB 128KB WeAct Studio BlackPill V2.0 (STM32F411CE)
pio boards pio boards STM32F411CEU6 --json-output
[
{
"id": "pybstick26_std",
"name": "PYBStick Standard 26",
"platform": "ststm32",
"mcu": "STM32F411CEU6",
"fcpu": 100000000,
"ram": 131072,
"rom": 524288,
"frameworks": ["arduino", "cmsis", "stm32cube", "libopencm3"],
"vendor": "PYBStick",
"url": "https://shop.mchobby.be/fr/micropython/1844-pybstick-standard-26-micropython-et-arduino-3232100018440-garatronic.html",
"connectivity": ["can"],
"debug": {
"tools": { "blackmagic": {}, "jlink": {}, "stlink": {}, "cmsis-dap": {} }
}
},
{
"id": "genericSTM32F411CE",
"name": "STM32F411CE (128k RAM. 512k Flash)",
"platform": "ststm32",
"mcu": "STM32F411CEU6",
"fcpu": 100000000,
"ram": 131072,
"rom": 524288,
"frameworks": ["arduino", "cmsis", "stm32cube", "libopencm3"],
"vendor": "Generic",
"url": "https://www.st.com/en/microcontrollers-microprocessors/stm32f411ce.html",
"debug": { "tools": { "blackmagic": {}, "jlink": {}, "stlink": {} } }
},
{
"id": "thunder_pack_f411",
"name": "ThunderPack v1.1+",
"platform": "ststm32",
"mcu": "STM32F411CEU6",
"fcpu": 100000000,
"ram": 131072,
"rom": 524288,
"frameworks": ["arduino", "cmsis", "stm32cube", "libopencm3"],
"vendor": "ThunderPack",
"url": "https://github.com/jgillick/ThunderPack/tree/STM32F4",
"connectivity": ["can"],
"debug": {
"tools": { "blackmagic": {}, "jlink": {}, "stlink": {}, "cmsis-dap": {} }
}
},
{
"id": "blackpill_f411ce",
"name": "WeAct Studio BlackPill V2.0 (STM32F411CE)",
"platform": "ststm32",
"mcu": "STM32F411CEU6",
"fcpu": 100000000,
"ram": 131072,
"rom": 524288,
"frameworks": ["arduino", "cmsis", "stm32cube", "libopencm3", "zephyr"],
"vendor": "WeAct Studio",
"url": "https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1",
"debug": {
"tools": { "blackmagic": {}, "jlink": {}, "stlink": {}, "cmsis-dap": {} }
}
}
]