I am looking to modify the receiving hardware serial buffer size for the Arduino Mega. To do so I need to redefine it in HardwareSerial.h
in the core code. However, I can't seem to find a copy of the Arduino Mega core code. A search for HardwareSerial.h
on my computer returns no results. I am using Windows 10.
-
And how / where on your computer did you search? Did you look inside the Arduino software itself?– MajenkoCommented Oct 21, 2016 at 15:45
-
Here github.com/arduino/Arduino/blob/master/hardware/arduino/avr/…– Mikael PatelCommented Oct 21, 2016 at 20:55
1 Answer
Arduino Mega is part of the Arduino AVR Boards core. The location of that core depends on whether you are using the core version included with the Arduino IDE or have updated the core version using Boards Manager(in which case there will be multiple copies of the core installed on your computer but only the updated version will be used). The easiest way to find it is:
- Tools > Board > Arduino/Genuino Mega or Mega 2560
- File > Examples > EEPROM > eeprom_clear
- Sketch > Show Sketch Folder
- Move up folder levels until you reach the
avr
folder. - If there is a version number folder in the
avr
folder then open that folder. - HardwareSerial.h and the rest of the core files are located in
cores/arduino
.
Remember that you will need to redo any changes to the core after any Arduino IDE and/or Arduino AVR Boards updates.