Page 1 of 1

Assembler with preprocessing (.S instead of .s)

Posted: Mon Aug 24, 2020 4:53 pm
by tlang
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

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

Posted: Wed Aug 26, 2020 11:51 am
by tlang
No one any ideas how to work around this bug?

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

Posted: Tue Sep 01, 2020 12:34 pm
by eranif
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