Assembler with preprocessing (.S instead of .s)

General questions regarding the usage of CodeLite
tlang
CodeLite Enthusiast
Posts: 13
Joined: Thu May 22, 2014 2:08 pm
Genuine User: Yes
IDE Question: C++
Contact:

Assembler with preprocessing (.S instead of .s)

Post by tlang » Mon Aug 24, 2020 4:53 pm

Hi there,
I have an existing ARM project here where assembling the startup code fails. The startup code expects some #defines for the stack and heap sizes.

To my understanding .S files should be assembled with preprocessing, so assembly would be done through gcc, while .s are "plain" assembler files without preprocessing.

I didn't find a way to manually assign the .S file to gcc. I tried to add .S as additional extension to the compiler definitions but CodeLite wrongly mangles the extension to lower case.

So what can I do to pass the two #defines? With gcc it would simply be something like "-D__STACK_SIZE=0x0400 -D__HEAP_SIZE=0x0000" which throws an error when passed to GAS.

Any suggestions?

Regards,
Torsten

tlang
CodeLite Enthusiast
Posts: 13
Joined: Thu May 22, 2014 2:08 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Assembler with preprocessing (.S instead of .s)

Post by tlang » Wed Aug 26, 2020 11:51 am

No one any ideas how to work around this bug?

User avatar
eranif
CodeLite Plugin
Posts: 6110
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Assembler with preprocessing (.S instead of .s)

Post by eranif » Tue Sep 01, 2020 12:34 pm

I assume that you are on Linux (since Windows & Mac are not case sensitive about file extensions)
You can add ".S" to the compiler, this is done from:

Settings -> Build Settings -> Compiler, choose your compiler from the list on the left side
Next, click on the "Templates" tab and add it there
Make sure you have read the HOW TO POST thread

Post Reply