Compiling ThreadX with Clang for Arm9

155 Views Asked by At

I am trying to compile ThreadX with Clang. Compiling with Clang all the ThreadX code is normally built except for the tx_timer_thread_entry.c file.
If that file is compiled with GCC and the rest of the files are compiled with Clang everything works fine. If I compile the specified file with Clang along with the other files the application hangs on thread sleep functionality. It enters into a forever loop.

Did anyone try to compile ThreadX with Clang? What could be the difference with the tx_timer_thread_entry.c from the others? And why would only that file give issues when compiling with Clang?

1

There are 1 best solutions below

1
Andrés On

It is hard to say without more details. I would guess that maybe compiler defaults are different, and the generated code with these defaults in one of the compilers is non compliant.

Which version of Clang are you using? There are ThreadX examples available on GitHub that are compiled using the ARM compiler, that is Clang based, so that should give you a better starting point, you can check the options used there.