Topic : Assembler files are being built by GCC not AS

Forum : ARM

Original Post
Post Information Post
December 9, 2008 - 10:24pm
Guest

Hi All:

I am working with STM32, using RIDE7 plus ARM.

The assembler files, like "stm32f10x_startup.s", are classified as a C-File type, and the Build command launches GCC instead of AS to build the file, creating many errors.

When I try to change the local setting for the "Type" from C-File to Assembler File, the change does not "stick" but instead reverts to C-File.

Does anybody have any idea how to make Build run AS for the assembler files?

I have a screen capture of my local file settings, but I cannot figure out how to attach it to this post.

Thanks,
Garry.

Replies
Post Information Post
+1
0
-1
December 10, 2008 - 12:09am
Guest

Supplemental information:

The first indication of a problem was the error messages on the commented lines. The commented lines begin with a semi-colon, like in "startup.s" All commented lines, beginning with semi-colon, appear to processed, thereby generating errors. I tried the command line AS and got the same result.

The documentation for AS syntax appears to want /* comments */ and/or apparently '@' for the ARM, not ';'.

Does anybody know why the "startup.s" file uses ';' comment characters?

Thanks for any help
Garry.

+1
0
-1
December 10, 2008 - 12:28am
Guest

More clues:

The AS command is complaing about the assembler instruction DCD for defining the vector table entries. Looks like a switch may be missing. The -mcpu=cortex-m3 option does not eliminate the error.

Thanks for any help
Garry.

+1
0
-1
December 10, 2008 - 11:04am
Guest

My .s files are listed as C-Source files aswell, the compilation field (Build Process section) is $(Target.Tools.Assembler) however it compiles with gcc, (even though the log states Running AS)...
arm-none-eabi-gcc.exe" -MD -D_STM32F103VBT6_ -D_STM32x_ -mcpu=cortex-m3
It compiles my files nicely.. So i have not looked more into it...

Try right clicking the .s file and "Reset Local Options"?

+1
0
-1
December 10, 2008 - 3:57pm
Guest

Hi

I had a discussion with Garry concerning another issue and the reason of this issue is that
the assembler file stm32f10x_startup.s is not in the correct format for GCC.
It is a file made for another compiler.

Matloub

+1
0
-1
December 10, 2008 - 4:39pm
Raisonance Support Team

Hi,

To clarify the first question for other people, it is normal that the assembler files are compiled with gcc, which is in fact only a shell that calls the other tools.

The compiler is cc1, the assembler is as and the linker is ld, but you can always call gcc and it will redirect everything to its proper destination. In fact you should always ever call gcc, never the other tools directly. (except very special cases like objcopy for format conversion and such)

Vincent

+1
0
-1
December 10, 2008 - 10:12pm
Guest

Gentlemen:

Thanks for all the help. The reason my Assembler "S" file did not work was because it was the wrong format. In fact, the file was left-over from my previous work with the Keil Eval Kit. So, once the correct files were used, that problem went away.

Garry.

+1
0
-1
December 11, 2008 - 1:35pm
Guest

@Garry - Yeah I suspected that it was another format. .. ;)

@VincentC - Thanks for the clarification, I expected that this was the case, but did not check it..