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?
Ride7 - www.st.com/.../contentid-52.html - libraries provides stm32 startup code for GNU assembler. You can use them as an example to understand Keil code and even to 'translate' it.
Good luck.
What would be the point in that?
Keil provide their own startup code for their own tools - you can just use it!
The problem appears when I try to assemble this file with GNU ( "error: unknown cpu 'cortex m3')
This is an error from the GNU assembler when parsing its command line and is nothing to do with the source file being assembled.
Your version of the GNU compiler does not support the Cortex-M3 by the sounds of it. This is a recent enough addition.
Try the GNU compiler offering from CodeSourcery, it certainly does support it.
Once you have that addressed, you still have the problem that the source file is written for the RealView assembler.
Rather than port that file, you can actually write the start-up file for a Cortex-M3 in a C file. That is a better option for you.
Hi. There is a forum about that matter at "http://www.keil.com/forum/docs/thread14379.asp#msg71741"
Good luck!