How to make the assembler pre process the .S file before assembling under Keil MDK?

Asked by Bob

How to make the assembler pre process the .S file before assembling under Keil MDK?

With other tools , assembler auto pre process the .S , but Keil MDK does not.

how to set?

code like :

#define ENTRY(name) /
  .globl name; /
  ALIGN; /
  name:

ENTRY(__udivsi3)

will warning like this

lib1funcs.S(44): error: junk at end of line, first unrecognized character is `/'
lib1funcs.S(45): error: bad instruction `align'
lib1funcs.S(45): error: junk at end of line, first unrecognized character is `/'
lib1funcs.S(216): error: bad instruction `entry(__udivsi3)'

Tool Version Numbers:
Toolchain: MDK-Lite Version: 4.71.0.0
Toolchain Path: C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\bin
C Compiler: GCC.Exe
Assembler: AS.Exe
Linker/Locator: LD.Exe
Librarian: AR.Exe
Hex Converter: OBJCOPY.Exe

Question information

Language:
English Edit question
Status:
Solved
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Solved by:
Joey Ye
Solved:
Last query:
Last reply:
Revision history for this message
chengbin (can-finner) said :
#1

Sorry that this is a gnu toolchain release and we don't know keil very well, maybe keil support forum is a good place to ask this question.

Thanks.

Revision history for this message
Bob (zbhsy) said :
#2

Is there any option force it pre process the file before assembling ?

Revision history for this message
Best Joey Ye (jinyun-ye) said :
#3

Right click .S file, click "Options for File xxxxx", select File Type as "C Source File"

- Joey

Revision history for this message
Bob (zbhsy) said :
#4

Thanks Joey Ye, that solved my question.

Revision history for this message
Bob (zbhsy) said :
#5

谢谢 叶金云 ! 问题解决了!