I am using xt-xcc compiler(from Xtensa) for building FreeRTOS code and it is working fine on our lx6 core platform. But I want to build same code using xt-clang.
Is there any change related to compiler? Or it should be worked straight forward. Because I saw compiler related directories is in (FreeRTOS/Source/portable)
On arm at least you use the GCC port with both clang and GCC. Is xcc compatible with GCC syntax? If so you may be able to build the port you are already using with clang. If not you may have to adapt the xcc port to clang syntax - which should be straight forward for the c code, and require a bit of fiddling if there is assemble code too.
Even, Source/portable/ThirdParty/XCC/Xtensa directory contains many of the assembly files. I am not much aware about assembly programming. Can you point out what are the assembly code changes required for clang?
If its compiling/assembling then probably no changes are required to the assembly code. The assembly instructions themselves would not have to change, just the syntax used by the assembly directives, such as the following sequence I’ve just looked at in xtensa_context.S:
Yes, you are correct, assembly is valid for clang. But, I still something missing in compilation of the code. I am not sure, what compilation flags should be enabled when use clang. Because i am using below compilation flag for xt-xcc and same flags are used for clang.
@aggarg your idea is good. we have tried with bare metal code initially. It was working fine. Now, i am working on huge code. So it is difficult to figure out with clang. same code works fine with XCC.