The project that I'm working on requires me to switch the firmware on my Arduino Mega 2560 R3. The firmware that I use switches the communication of my board from the normal USB-Serial to a USB-MIDI communication method. Another benefit of this firmware is that it allows for the usage of libraries like MIDIUSB and MIDI Library, which the Mega 2560 cannot normally use since it does not have a USB MCU.
The problem is that due to this switch in communication methods, I am unable to upload code through the Arduino IDE while the new firmware is uploaded, but also since the original Arduino firmware doesn't have the capabilities to use the MIDI Library and MIDIUSB libraries, the Arduino IDE won't let me upload my code, so I'm a bit stuck, and I was wondering if there was a way to bypass the compilation errors Arduino IDE gives me to force-upload my code to the board so that I can switch to the correct firmware.
The firmware I'm using is HIDUINO, and I'm using Atmel FLIP to flash my firmware.
Any help would be great, thanks!
Your basic premise would seem to be in error.
If you have compilation errors (which you haven't shown), then by definition your code was not compiled.
If your code was not compiled, there is nothing to upload.
I'm guessing that you may be referring to the error messages generated when the IDE cannot communicate with the bootloader on the 2560 due to the 16u2 being reprogrammed. If so, that's not a compilation error.
I'm also guessing that the firmware you are referring to is code that you are uploading into the 16u2 device that normally acts as the USB-Serial interface. If that's correct, then I don't see an easy way around it.
I suppose that you could install a different bootloader into the 2560 so that it will use one of the other 3 hardware UARTs and a separate USB-Serial adapter. You would need to also interface to the reset circuitry to initiate the bootloader.
Alternatively, maybe you could have a separate 16u2 board or similar (Arduino Pro Micro maybe?) connected to one of the hardware UARTs and do your MIDI via that device instead?
Use a programmer and program over the ICSP header.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.