platformio-core: Large Teensy 3.1 project builds but does not run

Configuration

MacOS El Capitan PlatformIO, version 2.8.5, installed via homebrew

Description of problem

Building a large (many libraries and code files) Teensy 3.1 project outputs a meaningfully different elf file and hex file as compared to a working one built using Arduino 1.6.7/Teensyduino. The hex file fails to upload via the CLI uploader, but does seem to work in the GUI uploader. Once uploaded the app fails to start, no debug output.

A trivial blink app (using the same platformio.ini file below) works fine on the same system.

Steps to Reproduce

  1. Build app via Arduino/Teensyduino. Works.
  2. Build app via PlatformIO, generates different elf and bad hex file

If problems with PlatformIO Build System:

Some warnings but no errors in build results below.

The content of platformio.ini:

[env:teensy31]
lib-ignore=extras
platform = teensy
framework = arduino
board = teensy31
build_flags = -DTEENSY31 -UUSB_SERIAL -DTEENSYDUINO=127 -DARDUINO_ARCH_AVR -DUSB_SERIAL_HID -DLAYOUT_US_ENGLISH 
board_f_cpu = 96000000

Source file to reproduce issue: build results: buildresults.txt .elf and .hex files from platformio: firmware.zip Working elf and hex files as built by Arduino working.zip Source files available if you need them, it’s a pretty big project.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 27 (17 by maintainers)

Most upvoted comments

Thanks! I’m really excited about platformio. I will try the platformio IDE, but I generally prefer working from the command line. I’ll be happy to retire the Arduino IDE for sure!

That workaround, naming “BritepadSketch.ino” to “BritepadSketch.cpp” works. Of course, this breaks building under Arduino.

@PaulStoffregen Any idea why the order of the linked files matters?

I’m hoping to look at the IDE this summer.