Content originally posted in LPCWare by MikeSimmonds on Tue Jun 16 11:27:30 MST 2015
You give absolutely no reference information!
Cortex M0 and M3 have 16-bit wide opcodes which must be aligned on a half-word boundary.
I.e. at even addresses.
There are some 32-bit opcodes also, but they too only need to be half-word aligned.
One guess is that you have some data (as opposed to code) that is being allocated in an executable
section by some mistake of yours and that the bit patterns of the data match that of executable code.
Or, perhaps you have some assembler code with an odd number of '.byte' directives, or a string of odd length.
The .align ... directive should then be used to align the code base. (The assember manual is accessibe from the help menu.)
Or maybe you have 'asm' escapes in your "C" code. The same applies.
The link map can be your friend here.
Mike