PaulStoffregen / SoftwareSerial

SoftwareSerial library used on Teensy
114 stars 159 forks source link

Linker error with toolchain-atmelavr 5.4.0: Error: register r24, r26, r28 or r30 required #13

Open Schallbert opened 3 years ago

Schallbert commented 3 years ago

Hi,

I noticed an issue when building in debug mode with compiler optimization is switched off. This library wouldn't build anymore. Doing some research online, I found this solution which works perfectly on my branch. In fact, to fix this just a single character change in SoftwareSerial.cpp is required inline 406 : "+r" (delay), "+a" (tmp) the +r needs to be exchanged with +w and that's it.

Here's my original thread on the platformio project: https://community.platformio.org/t/project-inspection-error-register-r24-r26-r28-or-r30-required/18648?u=schallbert

Schallbert commented 3 years ago

I tried to setup a branch in this repo to make a pull request for the fix but I don't have the rights...