Which HardwareSerial.h do I need to include?

In order to use the midi capabilities of my Daisy Seed, I connected a DIN-midi connector to USART1_RX via an opto coupler following the gist of the POD-design.

Now as recommended I want to include the MIDI library written by Francois Best to my program and added /home/jos/projects/arduino/libraries/MIDI/src to the C_INCLUDES so that the compiler can find MIDI.h

-I/home/jos/projects/arduino/libraries/MIDI/src \

When I try to compile this, the MIDI.h appears to include a HardwareSerial.h file which can not be found:

filter.cpp:36:10: fatal error: HardwareSerial.h: No such file or directory
36 | #include <HardwareSerial.h>

I found several on my machine and they seem to be hardware dependent. I found one for Arduino, est8266, stm32 but not one specific for the Daisy Seed. I’m sort of guessing that it should be stm32 based, but after experimenting with adding

-I/home/jos/.arduino15/packages/STM32/hardware/stm32/1.9.0/cores/arduino/stm32 \

I get some more errors among which

#error “STM32YYxx chip series is not defined in boards.txt.”

suggests to I’m probably hiking up the wrong road.

My question is, which HardwareSerial.h do I need to use? Or am I missing a general include dir to hardware specific objects of the Daisy Seed?

Arduino libraries are only intended for use in Arduino programs.

It was suggested on this forum to use the FortySevenEffects MIDI Library here:

MIDI examples require the FortySevenEffects MIDI Library . This library can be installed within the Arduino Library Manager.

So I thought I could link that with my code. How would you suggest I proceed?

If you want to use Arduino libraries, use Arduino IDE.
If you want to develop without using Arduino IDE, use other libraries.

It’s your choice.

1 Like

Well, there need not be a difference between the libraries or parts you would want to link given that they are meant to run on the Daisy hardware.