I am using Keil uVision3 in order to compile a .cpp file using STM32F103VE microcontroller. I need to use GNU compiler instead of Keil ARM.
I am using the file stm32f10x_vector.s from the library of Keil\ARM\Startup\ST. The problem appears when I try to assemble this file with GNU ( "error: unknown cpu 'cortex m3')
Maybe I have to change the assembler control string "-mpcu=cortex-m3", but what should I put?
Or maybe the problem is that this file is for Keil Arm compiler. Where could I find a startup file for this controller compiling with GNU?
I need to use GNU compiler instead of Keil ARM.
Why? If it's GNU tools you "need" to use, where does KEIL's startup code, designed for use with KEIL's runtime library, written in KEIL's assembler language, even come into the picture?
Assembler files are not portable between different assemblers, and the runtime support required by different compilers is unlikely to be compatible.
Therefore it is probably not helpful to try to port this Keil-specific stuff to GCC.
If you really want to use GCC, then use one of the many complete GCC-based toolsets available for the STM32.
Thanks.
I have already understood that I should rewrite the .s file, and not the whole guide, ;-)
"You need to read the GNU assembler guide and rewrite it."
Why would you consider it necessary to rewrite the GNU assembler guide?
;)
Sandra, I don't think the syntax of the .s file would work just like that. You need to read the GNU assembler guide and rewrite it.
View all questions in Keil forum