I am working on an embedded project with windriver compiler
The obj file(crt0.o) has the starting point(contains “main”) as per compiler design.
In my project, we have written our own assemlbly file(crt0.s).
now i want to compile this into crt0.o and put it for linking.
I tried the below way,
file(GLOB src_pbl ${BOOT_DIR}/pbl/src/.c
${BOOT_DIR}/pbl/src/crt0.s
${BOOT_DIR}/common/FlexCAN/.c)
add_executable(pbl ${src_pbl})
But it is not working. the linker took the crt0.o file from the default compiler path.
But before this, i don’t see the crt0.o getting generated from crt0.s.
I can see the .o files getting generated for the .c files i passed to the target.
could you verify whether i am passing the .s file correctly?
I have added ASM as mentioned above. still i dont see the object file getting generated.
also by adding ASM, the target i set as a compiler flag getting deleted somehow.
Please don’t set the LANGUAGE property of a source file to be a language different than the content of the file. The .s file is written in Assembly, not C. See policy CMP0119, which is coming in CMake 3.20.