Hi,
I'm somewhat confused with the Thumb mode code size. My understanding is compiling with ARM mode will generate 32-bit instructions and compiling with Thumb mode will generate 16-bit instructions. When I compile my Cortex-M0+ project (which should use Thumb mode instructions only), the output binary file always increments in multiple of 4 bytes. Do I miss something here?
Here are the instructions I use:
armcc -c -O3 -Ospace --cpu Cortex-M0plus --thumb --apcs=interwork -I ./ -g -c aaa.c -o aaa.o
armasm --cpu Cortex-M0plus --apcs=interwork -I ./ -g startup.s -o startup.o
armlink --cpu Cortex-M0plus --ro_base 0x00000000 --rw-base 0x00100000 --entry Reset_Handler --first __Vectors aaa.o startup.o -o aaa.axf
Thanks,