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

tiny nuisance: framework rebuilt on first two runs #635

Closed
nopdotcom opened this Issue Apr 26, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@nopdotcom

nopdotcom commented Apr 26, 2016

Configuration

Operating system: Mac OS X 10.11.4

PlatformIO Version (platformio --version): PlatformIO, version 2.9.0.dev1

This also occurs in 2.8.6.

Description of problem

This problem does not significantly affect the usability of PlatformIO. I report it for the record, and in case it is a symptom of other problems with scons. Feel free to close it.

When I build a project for the first time, the framework is compiled on the first two invocations of platformio run. From the third run, it is not rebuilt.

Steps to Reproduce

  1. $ rm -rf .pioenvs or pio run -t clean
  2. $ pio run
  3. $ pio run
  4. $ pio run

Actual Results

  1. .pioenvs is cleaned or removed

[Tue Apr 26 11:05:09 2016] Processing myleo (platform: atmelavr, board: leonardo, framework: arduino)
--------------------------------------------------------------------------------
avr-g++ -o .pioenvs/myleo/src/tmp_ino_to.o -c -fno-exceptions -fno-threadsafe-statics -std=gnu++11 -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO_AVR_LEONARDO -DUSB_VID=0x2341 -DUSB_PID=0x8036 "-DUSB_PRODUCT=\"Arduino Leonardo\"" -DUSB_MANUFACTURER=\"Arduino\" -DARDUINO=10608 -DPLATFORMIO=020900 -I.pioenvs/myleo/FrameworkArduino -I.pioenvs/myleo/FrameworkArduinoVariant tmp_ino_to.cpp
avr-ar rcs .pioenvs/myleo/libFrameworkArduinoVariant.a
avr-ranlib .pioenvs/myleo/libFrameworkArduinoVariant.a
avr-g++ -o .pioenvs/myleo/FrameworkArduino/CDC.o -c -fno-exceptions -fno-threadsafe-statics -std=gnu++11 -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO_AVR_LEONARDO -DUSB_VID=0x2341 -DUSB_PID=0x8036 "-DUSB_PRODUCT=\"Arduino Leonardo\"" -DUSB_MANUFACTURER=\"Arduino\" -DARDUINO=10608 -I.pioenvs/myleo/FrameworkArduino -I.pioenvs/myleo/FrameworkArduinoVariant .pioenvs/myleo/FrameworkArduino/CDC.cpp
[…]
[Tue Apr 26 11:06:11 2016] Processing myleo (platform: atmelavr, board: leonardo, framework: arduino)
--------------------------------------------------------------------------------
avr-g++ -o .pioenvs/myleo/src/tmp_ino_to.o -c -fno-exceptions -fno-threadsafe-statics -std=gnu++11 -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO_AVR_LEONARDO -DUSB_VID=0x2341 -DUSB_PID=0x8036 "-DUSB_PRODUCT=\"Arduino Leonardo\"" -DUSB_MANUFACTURER=\"Arduino\" -DARDUINO=10608 -DPLATFORMIO=020900 -I.pioenvs/myleo/FrameworkArduino -I.pioenvs/myleo/FrameworkArduinoVariant tmp_ino_to.cpp
avr-ar rcs .pioenvs/myleo/libFrameworkArduinoVariant.a
avr-ranlib .pioenvs/myleo/libFrameworkArduinoVariant.a
avr-g++ -o .pioenvs/myleo/FrameworkArduino/CDC.o -c -fno-exceptions -fno-threadsafe-statics -std=gnu++11 -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO_AVR_LEONARDO -DUSB_VID=0x2341 -DUSB_PID=0x8036 "-DUSB_PRODUCT=\"Arduino Leonardo\"" -DUSB_MANUFACTURER=\"Arduino\" -DARDUINO=10608 -I.pioenvs/myleo/FrameworkArduino -I.pioenvs/myleo/FrameworkArduinoVariant .pioenvs/myleo/FrameworkArduino/CDC.cpp
[…]
[Tue Apr 26 11:06:58 2016] Processing myleo (platform: atmelavr, board: leonardo, framework: arduino)
--------------------------------------------------------------------------------
scons: `.pioenvs/myleo/firmware.hex' is up to date.
[…]

Expected Results

  1. All platformio temporaries removed
  2. Main program and platform built
  3. “Up to date”
  4. “Up to date"

If problems with PlatformIO Build System:

The content of platformio.ini:

[env:myleo]
platform=atmelavr
framework=arduino
board=leonardo

[platformio]
src_dir=.

Source file to reproduce issue:

#include <Arduino.h>

void setup() {
  Serial.begin(57600);
}

void loop() {
  Serial.println("Hello");
}

Additional info

I’ll see if I can figure this out on my own. It is a low priority for me, and it should be a very low priority for you.

Arduino IDE seems to have a related problem, but far worse: https://forum.pjrc.com/threads/34233-Build-options-changed-rebuilding-all . Even when it is going to reuse .o files, trunk arduino-builder runs avr-g++ over all framework source every build (to do the .ino->.cpp transformation?) PlatformIO is faster even when rebuilding everything!

Yes, I starred this project and followed you on Twitter. :–) I’ll see if I can get any interest from the MediaTek people.

@ivankravets ivankravets added the bug label Apr 26, 2016

@ivankravets ivankravets self-assigned this Apr 26, 2016

@ivankravets ivankravets added this to the 2.9.0 milestone Apr 26, 2016

@ivankravets

This comment has been minimized.

Member

ivankravets commented Apr 26, 2016

Yes, I starred this project and followed you on Twitter. :–)

😺 😺 😺 😺 😺 😺 😺

I’ll see if I can get any interest from the MediaTek people.

Would be great! We need help from hardware vendors.

ivankravets added a commit that referenced this issue Apr 28, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment