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

Cannot build Teensy20 project with USB Type: "MIDI" #722

Closed
venelinpetrov opened this Issue Jul 17, 2016 · 6 comments

Comments

Projects
None yet
3 participants
@venelinpetrov

venelinpetrov commented Jul 17, 2016

Configuration

Operating system:
Windows 7 Professional

PlatformIO Version:
2.11.1

Description of problem

The build_flags = -USB_MIDI flag does not seem to take effect, because midi specific methods are not recognized during compilation (e.g. usbMIDI.sendControlChange();)

Steps to reproduce:

  1. Initialize teensy20 project. You should have the following config:

    [env:teensy20]
    platform = teensy
    framework = arduino
    board = teensy20
  2. Add this entry to platformio.ini

    build_flags = -USB_MIDI
    # or build_flags = -DUSB_MIDI
  3. Execute

    pio run
    

Actual Results

Exception is thrown saying that usbMIDI is not recognized

Expected Results

Successful compilation

@ivankravets

This comment has been minimized.

Member

ivankravets commented Jul 18, 2016

@valeros please re-assign this issue to me when will fix it. I'll add this info to docs.

valeros added a commit that referenced this issue Jul 18, 2016

@ivankravets

This comment has been minimized.

@venelinpetrov

This comment has been minimized.

venelinpetrov commented Jul 18, 2016

Just to avoid any misunderstanding I would like to underline that the problem (and the fix also) does not seem to depend on the teensy board version. I tested it now with teensy 3.0 project and the behavior is the exact same. You can unmention the version in the documentation if you like.

ivankravets added a commit that referenced this issue Jul 18, 2016

@ivankravets

This comment has been minimized.

Member

ivankravets commented Jul 18, 2016

Thanks a lot! I've just updated the docs.

P.S: Does this build work with Teensy 2.0?

ivankravets added a commit that referenced this issue Jul 18, 2016

Merge branch 'develop' into feature/platformio-30
* develop:
  Update docs for Teensy USB Features // Issue #722
  Implement Teensy 2.0 USB functionality (HID, SERIAL_HID, DISK, MIDI, etc.) // Resolve #722
  Add support for Pinoccio Scout board // Resolve #52
  Fix broken LD Script for Element14 chipKIT Pi board // Resolve #725  Resolve #726
  Fix USB flags processing for teensy platform // Issue #722
  Add Pinoccio board // Issue #52
  Minor improvements for CLion docs
  Improved docs for integration with CLion IDE
  Version bump to 2.11.1 (issues #472, #629, #710, #711, #712, #713, #718)
  Typo fix
  Add "udev" rules for OpenOCD CMSIS-DAP adapters // Resolve #718
  Update history
  Ignore "[platformio]" section from custom project configuration CI
  Bump to 2.11.1b1
  Add Arduino M0 Pro and Tian to the examples // Issue #472
  Fix issue when `pioenvs` folder doesn't exist
  Add more info about `.pioenvs` directory
  Improve CMSIS selection for SAMD21 boards
  Improve support for SAMD21 based boards
  Add contributing guidelines
@venelinpetrov

This comment has been minimized.

venelinpetrov commented Jul 18, 2016

Yes, testing with the latest development version, the code compiles and uploads successfully to a physical board. Also needed to add the build_flags = -D USB_MIDI entry as the documentation suggests.
Thanks for the effort, really. Actually, I came up with a similar solution today, but couldn't find time to dig enough in the code in order to verify it.

@ivankravets

This comment has been minimized.

Member

ivankravets commented Jul 18, 2016

Thank you, that reported!

Happy coding! 😊

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

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

Merge branch 'develop' into feature/platformio-30
* develop: (21 commits)
  Use stable docs
  Version bump to 2.11.2 (issues #500, #533, #732, #731, #737, #733, #438, #722, #52, #725)
  Update project configuration template
  Use stable docs
  Implement firmware merging with base firmware for Nordic nRF51 development platform // Resolve #500 , Resolve #533
  Fix firmware uploading to Atmel SAMD21-XPRO board using ARM mbed framework // Resolve #732
  Add firmware merging process for nordicnrf51 // Issue #533, #500
  Add OpenOCD as an alternative upload method for atmelsam platform // Issue #732
  Sync flags parser with PlatformIO 3.0 branch // Resolve #738
  Update ``udev`` rules for the new STM32F407DISCOVERY boards // Resolve #731
  Add explanation about "Failed to find MSBuild toolsets directory"
  Add support for local "--echo" for Serial Port Monitor // Resolve #733
  Update history
  Improve support for Microchip PIC32 development platform and ChipKIT boards // Resolve #438
  Fix Project Generator for ESP8266 and ARM mbed based projects
  Switch to gcc-built LwIP library for espressif platform
  Push 2.11.2.dev2
  Fix linking process for microchippic32 platfrom // Issue #438
  Improve Project Generator for PlatformIO IDE (fixes incorrect linter errors)

@ivankravets ivankravets referenced this issue Aug 3, 2016

Closed

platformio 2.11.2 #3577

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