I am attempting to build mocoLUFA under OS X el Capitan 10.11.6.

[Editor: mocoLUFA (MIDI firmware for Arduino Uno)] enter image description here

I am using the specified LUFA version (LUFA101122) and I have tried building with both brew avr-gcc and also Crosspack-AVR.

The problem I am facing isn't with the build or the install. It's just that as soon as I install the hex file, I get no midi messages at all.

What does work - the OSX machine recognises the MIDI device and the MIDI device appears in DAW's, however MIDI Monitor registers no messages at all.

I have tried downloading a custom-built mocoLUFA and I am able to install this and it works fine. I see midi messages coming across from my sketch.

Crosspack-AVR installs avr-gcc 4.8.1.

My question is - what is the correct build environment in order to achieve a working mocoLUFA under OSX? I have tried both mocoLUFA and dualMoco and I get the same result with each.

My purpose for this is to modify mocoLUFA so that it can support sending MTC over USB. At present, it appears that mocoLUFA does not support System Common messages.

UPDATE: Built fresh Ubuntu VM. Installed avr-gcc, avr-libc, LUFA-100807 and mocoulfa. Same result. hex builds fine, no response from the atmega16u2. TX light flashing, sketch on the 2560 running, but no midi messages down the usb cable.

2 Answers 2


This is Franco, from Yaeltex, the guys who put up that site for custom MocoLUFA compiling.

Our site works on an Ubuntu server, and the build environment can be seen at the bottom of the site, which is as follows:

  1. Ubuntu Server Setup
    • avr-gcc: avr-gcc (GCC) 4.9.2
    • avrdude: Version 6.3, compiled on Mar 15 2016 at 21:26:45
    • LUFA: 100807
    • dualMocoLUFA: custom Yaeltex based on 2013/09/22

On the other hand, I use Windows 10 to build locally in my computer, and I have a similar setup with sligthly older versions of avr-gcc and avrdude:

  1. Windows 10 Server Setup
    • avr-gcc: avr-gcc (GCC) 4.3.3
    • avrdude: Version 5.10, compiled on Mar 15 2016 at 21:26:45
    • LUFA: 100807
    • dualMocoLUFA: custom Yaeltex based on 2013/09/22

Here is a link to the fork we made to mocoLUFA, it has minor changes, that were very useful to us and our hardware.

Regarding your problem, I am really lost on the cause of it, but we can start with some questions to get closer to a solution.

  • What kind of MIDI messages are you trying to send/receive?
  • Can you share the code you are using?
  • Are you using Arduino MIDI Library (Last version is v4.3.1)?
  • If not, are you sure you are using 31.250 bps as baud rate?
  • Do you have something else connected to TX or RX lines in your circuit?

Let's start with these. Cheers!

  • Midi Messages are currently sysex, although eventually will be MTC Quarter Frame msgs. Arduino MIDI library is 4.3.1 OLED display on pins 20 & 21 (i2c) however "your" hex file works fine with this connected anyway, so I discount any effect of this. I'll share code to a pastebin as my sketch is actually moot in relation to this question. pastebin.ca/3867422
    – Mark
    Commented Sep 12, 2017 at 13:40
  • I note that my OSX box does not recognise the midi device at all when I change HW_CDC_BULK_{IN|OUT}_SIZE to 16
    – Mark
    Commented Sep 12, 2017 at 13:53

I see that you are reading the MIDI messages from your iPad. If so, it is to be noted that LUFA reports 500mA for power requirements. So you could try self powering your USB-HUB.

Source: http://morecatlab.akiba.coocan.jp/morecat_lab/MocoLUFA.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.