PlatformIO Community

Common section in platform.ini problem with latest update

The latest PlatformIO 4.0.0a9 creates an issue when using [common] section inside PlatformIO.ini

Build error:
You can ignore this message, if {'requirements': None, 'name': '${common.lib_deps}'} is a built-in library (included in framework, SDK). E.g., SPI, Wire, etc.
Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 > Espressif ESP32 Dev Module
HARDWARE: ESP32 320KB RAM (4MB Flash)
DEBUG: CURRENT(esp-prog) EXTERNAL(esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny,
tumpa)

Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 37 compatible libraries
Scanning dependencies…
Dependency Graph
|--

*** ValueError invalid literal for int() with base 10: ''' trying to evaluate${__get_board_f_flash(env)}’
File “C:\Users\NEF.platformio\platforms\espressif32\builder\main.py”, line 281, in
[ERROR] Took 1.88 seconds

platformio.ini

[platformio]
env_default = stable
src_dir = ./
lib_dir = …/…/…/Libraries

[common]
lib_deps =
lib_ignore =

board_build.f_cpu = 240000000L
board_build.f_flash = 80000000L
;board_build.partitions =
upload_speed = 921600
build_flags =
-DLOG_LOCAL_LEVEL=ESP_LOG_DEBUG
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
build_unflags =

[env:stable]
platform = espressif32
board = esp32dev
framework = arduino

lib_ignore = ${common.lib_ignore}
lib_deps = ${common.lib_deps}
upload_speed = ${common.upload_speed}
build_flags = ${common.build_flags}
build_unflags = ${common.build_unflags}

board_build.f_cpu = ${common.board_build.f_cpu}
board_build.f_flash = ${common.board_build.f_flash}
;board_build.partitions = ${common.board_build.partitions}

Sorry for the issue. We have started work on huge improvements for platformio.ini. The latest release introduces external configuration files => http://docs.platformio.org/en/latest/projectconf/section_platformio.html#extra-configs

The issue was fixed in the latest development version. Please open PlatformIO IDE terminal and type pio upgrade --dev. Restart VSCode.

Great thank you, that works.