atlas0fd00m / rfcat

RfCat - swiss-army knife of ISM band radio
Other
554 stars 116 forks source link

Work around a suspected SDCC bug #123

Closed argilo closed 2 years ago

argilo commented 2 years ago

Fixes #121.

SDCC >= 3.8.0 appears to have a bug (https://sourceforge.net/p/sdcc/bugs/3381/) which causes incorrect compilation of the ep5.OUTlen += len; line in chipcon_usb.c, corrupting the value of ep5.OUTlen. To work around the problem, we can mark the OUTlen field as volatile to prevent optimizations from being applied to it.

After this change, I can build a working firmware using SDCC 3.8.0, which ships with Ubuntu 20.04.