I am attempting to provide custom interrupt handlers for my Cortex M3 (reference manual here). ST kindly provides a standard library, which has various startup files all called "startup_stm32f2xx.s". Each is in a different folder according to IDE.
Now I do not use an IDE (I compile directly with Yagarto, a modified version of the gcc toolchain). I have already asked which of the start-up to use. However, having now tried all the available startup files, I always get the same error:
/startup_stm32f2xx.s:1:0: error: target CPU does not support ARM mode
A quick Google search reveals that this probably means that the assembler code has instructions that my ARM cannot understand, which is surprising given that the code was provided for my board.
How can I compile the startup file that defines the interrupt vector on my STM32?
Edit: In each of the files, startup_stm32f2xx.s:1:0
is the beginning of a comment. Also, I'm using the flag -mcpu=cortex-m3
. Here is the complete error message:
$ make all
arm-none-eabi-gcc -x assembler-with-cpp -c -g -mcpu=cortex-m3 -gdwarf-2 -Wa,-amhls=startup_stm32f2xx.lst startup_stm32f2xx.s -o startup_stm32f2xx.o
startup_stm32f2xx.s:1:0: error: target CPU does not support ARM mode
makefile:46: recipe for target `startup_stm32f2xx.o' failed
make: *** [startup_stm32f2xx.o] Error 1
STM32 toolchain
? There is only anSTM32 standard library
. \$\endgroup\$ – Randomblue Apr 23 '12 at 10:42