New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using `src_filter` with only one item in the list of argument causes a fatal build error on Windows #652

sarfata opened this Issue May 8, 2016 · 2 comments


None yet
2 participants

sarfata commented May 8, 2016

  • [X ] Bug report. If you’ve found a bug, please provide information below.


Operating system: Windows 10

PlatformIO Version (platformio --version): 2.9.1

Description of problem

Using src_filter with only one item in the list of argument causes a fatal build error on Windows.

Steps to Reproduce

  1. Create a new project with platform teensy, framework arduino, board teensy31.
  2. Create a sub-folder folder1 with one simple main.cpp in it
  3. Edit the platformio.ini file and add src_filter = +<folder1/>

Actual Results

C:\Users\thomas\Documents\GitHub\test> platformio run
[05/08/16 20:18:44] Processing mybaseenv (platform: teensy, src_filter: +<folder1/>, f
ramework: arduino, board: teensy31)
The system cannot find the file specified.
============================ [ ERROR ] Took 0.03 seconds ============================

With -v the results are slightly different:

C:\Users\thomas\Documents\GitHub\test> platformio run -v
[05/08/16 20:18:49] Processing mybaseenv (platform: teensy, src_filter: +<folder1/>, f
ramework: arduino, board: teensy31)
============================ [ ERROR ] Took 0.03 seconds ============================

Expected Results

Project should build without error on Windows, as it does on Travis.

If problems with PlatformIO Build System:

See also full project here:

The content of platformio.ini:

platform = teensy
framework = arduino
board = teensy31
# will not work with platformio 2.9.1
src_filter = +<folder1/>

Source file to reproduce issue:

#include <Arduino.h>

void setup() {

void loop() {

Additional info

  • Just adding some text at the end of the line (for example a comment or a folder that does not exist) is enough to workaround the issue.
  • Tested under Linux and the error does not happen there. See travis build report.
  • Tested in the command line and in Atom with same results.

sarfata added a commit to sarfata/kbox-firmware that referenced this issue May 8, 2016

Fix build on Windows
Identified why the project was not building on Windows (reported bug
platformio/platformio-core#652 to the platformio team) and added a very
simple workaround.

Project now builds properly on Windows, in the command line and in Atom.
By default we will not upload.

@ivankravets ivankravets added the bug label May 8, 2016

@ivankravets ivankravets self-assigned this May 8, 2016

@ivankravets ivankravets added this to the 2.9.2 milestone May 8, 2016


This comment has been minimized.


ivankravets commented May 8, 2016

Thanks a lot for the detailed report! 👍

The bug is linked with SCons command parser. I'll think how to fix it.


This comment has been minimized.

sarfata commented May 11, 2016

👍 Thanks for the quick fix!

ivankravets added a commit that referenced this issue Jun 2, 2016

ivankravets added a commit that referenced this issue Jun 2, 2016

Merge branch 'develop' into feature/platformio-30
* develop:
  Version bump to 2.9.2 (issues #641, #645, #648, #652, #664, #665, #666, #671, #674)
  Fix issue with ARM mbed framework when abstract class breaks compile for LPC1768 // Resolve #666
  Fix issue with ARM mbed framework and multiple definition errors   on FRDM-KL46Z board // Resolve #641
  List embedded boards in docs
  Fix multiple definition in mbed framework when using abstract class // Issue #641, #666
  Add "stlink" as the default uploader for STM32 Discovery boards // Resolve #665
  Implement grep serial ports for Windows
  Remove unused imports
  Minor improvements
  Fix PyLint's "misplaced-comparison-constant"
  Use $PROGNAME instead static name when looking for the firmware
  Update title of the article
  Add new articles
  Link Community Forums FAQ with Docs FAQ
  Grep for "/dev/cu.*" on OS X
  Skip grep search for serial ports on Windows machines
  Improve firmware uploading to Arduino Leonardo based boards
  Add MinGW to the PATH

# Conflicts:
#	docs/index.rst
#	docs/platforms/creating_board.rst
#	docs/projectconf.rst
#	docs/userguide/platforms/cmd_install.rst
#	platformio/
#	platformio/builder/scripts/
#	platformio/builder/scripts/
#	platformio/builder/scripts/frameworks/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment