IDE: ARM DS-5 (v5.15.0)
Platform: Cortex R4
Hi,
I am interested to use C pre-processor in assembly file but i am facing the attached issue. According to arm documentation
I set the flag --cpreproc and --cpreproc_opts but getting following issue:
Error: C3472E: No source language specified (--cpp or --c90) and sourcefile extensions conflict
Fatal error: A1905U: Pre-processor step failed for '../xx_xxxxxx_xxxxx_restore.s'
1 Error, 0 Warnings
make: *** [xx_xxxxxx_xxxxx_restore.o] Error 8
I really appreciate your suggestions.
Thanks.
asi,
Can you provide the armasm line that your tool generates? Also, what version of armasm are you using.
I tried a line like this:
armasm --cpu=Cortex-R4 --cpreproc --cpreproc_opts=-DTHREAD_PROFILING_ENABLED -o .obj/xxx__xxx_restore.o ../../appsrc/xxx/xxx_restore.s
and it works as expected (no 1905 error)
hi emiller,
>>Can you provide the armasm line that your tool generates?
'Building file: ../xx_xxxxxx_xxxxx_restore.s'
'Invoking: ARM Assembler'
armasm --cpreproc --cpreproc_opts='-DTHREAD_PROFILING_ENABLED' --cpu=7-R --arm -g -o "xx_xxxxxx_xxxxx_restore.o" "../xx_xxxxxx_xxxxx_restore.s"
Fatal error: A1905U: Pre-processor step failed for '../tx_thread_context_restore.s'
make: *** [tx_thread_context_restore.o] Error 8
**** Build Finished ****
>>Also, what version of armasm are you using.
ARM Assembler, 5.03 [Build 76]
>>and it works as expected (no 1905 error)
if there is some mistake please let me know,
ARM C/C++ Compiler, 5.03 [Build 76]
armcc OUTPUT:
'Building file: ../xx_xxxxxx_xxxxx_notify.c'
'Invoking: ARM C Compiler'
armcc -O3 --cpu=7-R --arm --apcs=/softfp -g -c -o "xx_xxxxxx_xxxxx_notify.o" "../xx_xxxxxx_xxxxx_notify.c"
'Finished building: ../xx_xxxxxx_xxxxx_notify.c'
Hi asi,
I'm not getting the same error as you. I tried
ARM Assembler, 5.03 [Build 102] and
ARM Assembler, 5.03 [Build 24] (I don't have a copy of Build 76, so I can't duplicate your environment exactly).
I'll take a guess at a solution, but I can't guarantee it'll work: since assembly is failing with a C preprocessor error (the "C" in "C3472E" is for "Compiler, and the "E" is for "Error") saying that it can't decide between C90 and C++, you could specify which to use explicitly in your preprocessor options.
So instead of "--cpreproc_opts='-DTHREAD_PROFILING_ENABLED'," try "--cpreproc_opts='--c90 -DTHREAD_PROFILING_ENABLED'," which I would expect to get you past the 3472 error.
Hi emiller,
>>So instead of "--cpreproc_opts='-DTHREAD_PROFILING_ENABLED'," try "--cpreproc_opts='--c90 -DTHREAD_PROFILING_ENABLED'," which I would expect to get you past the 3472 error.
Sorry for late response, I tried that one earlier but didn't succeed. I will try it again with [Build 102] and hit back there with results.
Hi Asi, would you mind closing the question and re-open it later if necessary? That helps keeping track of what requires attention.