CPSID i assembly instruction not supported by Cortex M0
SOLVED:
Solved. Somehow my folder with the common code had a different build setting than the other folders in my project, and the -mcpu flag was not there. To reset build configuration to default:
Right-click folder -> Resource Configurations -> Reset to Default