platformio / platform-ststm32

ST STM32: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/ststm32
Apache License 2.0
405 stars 313 forks source link

Duplicated options if set via `build_flags` #137

Closed puzrin closed 6 years ago

puzrin commented 6 years ago

Configuration

Operating system: Ubuntu 14.04

PlatformIO Version (platformio --version): 3.6.0a10

Description of problem

Some build flags are duplicated if defined via build_flags option.

Steps to Reproduce

  1. Add this lines to platformio.ini
build_flags =
  -Werror
  --specs=rdimon.specs
  1. Execute pio run -v

Actual Results

Every flag from example passed twice to CLI line

Expected Results

Expect each flag only once in CLI line

If problems with PlatformIO Build System:

The content of platformio.ini:

[platformio]
description = Grinder speed control firmware, with BackEMF speed stabilization
env_default = genericSTM32F103C8

[env:genericSTM32F103C8]
platform = ststm32@~4.3.1
board = genericSTM32F103C8
framework = stm32cube
build_flags =
  -Werror
  --specs=rdimon.specs
  -lrdimon
  -lc
; Add thhis path for local files only, to use pio's `stm32f1xx_hal_conf.h`
; in bootstrap
src_build_flags =
  -I lib/stm32cubemx_init/Inc
lib_archive = false
lib_deps = stm32cubemx_init
debug_tool = stlink

REF: https://github.com/platformio/platformio-core/issues/1770

ivankravets commented 6 years ago

Fixed in https://github.com/platformio/platform-ststm32/commit/d4389817d19656015ceae7f11a1b355b44f08bef

puzrin commented 6 years ago

Thanks!