Arduino IDE 2.0.3 Serail RX Buffer Modified?

Hello. How can I change the RX buffer in this IDE for Arduino Uno? In IDE 1, I could easily do this via hardwareserial.h, but I don't know how to do it in IDE 2.

Hi @certy. The procedure is essentially the same.

I can guess the problem is you are expecting the "Arduino AVR Boards platform to be inside the Arduino IDE installation folder. Even with Arduino IDE 1.x, editing the platform at that location was not guaranteed to work because the Arduino IDE Boards Manager installs updates to a different location on your computer, and after that the copy of the "Arduino AVR Boards platform inside the Arduino IDE 1.x installation is no longer used.

The Arduino IDE 2.x installation does not come with a bundled copy of the "Arduino AVR Boards platform. Instead, it uses Boards Manager to automatically install the platform the first time you run the IDE after a fresh installation. This means modifying the serial buffer size is actually more simple for Arduino IDE 2.x users users because there is only one possible location where the file could be located instead of two possible locations as it is for Arduino IDE 1.x users.

The file is located at this path:

Windows

C:\Users\<username>\AppData\Local\Arduino15\packages\arduino\hardware\avr\<platform version>\cores\arduino\

Linux

~/.arduino15/packages/arduino/hardware/avr/<platform version>/cores/arduino/

macOS

~/Library/Arduino15/packages/arduino/hardware/avr/<platform version>/cores/arduino/

The value of <platform version> will depend on which version of the "Arduino AVR Boards platform you have installed.

:exclamation: If looking for it with your file browser or command line, note that the C:\Users\<username>\AppData\ or ~/.arduino15/ folder is hidden by default. On Windows "File Explorer", you can make it visible by opening the "View" menu, then checking the box next to "☐ Hidden items". There will be something similar in the settings of whichever Linux file browser you are using.

Please note that your changes to HardwareSerial.h will be lost every time you update to a new version of the "Arduino AVR Boards platform via the Arduino IDE Boards Manager.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.