Compiler error, "947...register required

I have an Adafruit QT Py (SAMD21) and an Adafruit DS3502 module (digital pot, I2C interface) and the Adafruit Libraries downloaded. The example files will compile for a few different AVR boards and the Seeeduino Xiao (also SAMD21), but not for the QT Py, it spits out this error:

C:\Users\rkrie\AppData\Local\Temp\ccsdpIYs.s: Assembler messages:
C:\Users\rkrie\AppData\Local\Temp\ccsdpIYs.s:947: Error: lo register required -- `sub r10,#1'

I tried Googling it but couldn’t find anything. Any help would be much appreciated!

947 is more than likely the line number where the error occured. So if you simply search for lo register required, possibly combined with keywords like SAMD21 you might find the info that you’re looking for.

Just searching with the given link seems to indicate that you’re compiling for the wrong (or unsupported) architecture.

I can’t help you further, sorry.

Thanks, I tried that, didn’t find anything helpful. What is additionally weird is the fact that it compiled without error earlier today, although the program would freeze and didn’t actually work all the way. Now it’s not compiling. I guess now it’s just more honest about it, lol.

Huh. Turns out it has to do with code optimization. If I select anything other than “Small” then I get the error.