Basically the same applies as with integration into other platforms. open62541 consists of a large part that is platform independent and a much smaller part that is platform specific. The platform specific part is almost completely isolated into the arch subdirectory inside the open62541 project directory.
open62541 used to have support for eCos, FreeRTOS, and vxWorks, but that was all removed in 1.4 because of the new eventloop and lack of active support to port these architecture interfaces to this new method. Instead a new interface for Zephyr was added to the Posix and Win32 interfaces.
If you want to add your own OS abstraction you would basically have to look into providing a similar interface to your OS as is done in arch/zephyr. Basically you need to have an interface to clock services, and a basic eventloop implementation that provides services for threads, events, timers and other OS services and according and TCP and optionally UDP eventloop implementation.
The perfect way would be of course to provide a direct interface to the NetX API of ThreadX but ThreadX also provides a socket emulation on top of NetX that would let you reuse a lot of the Posix specific eventloop implementation.
So in conclusion, there is no magic switch to generate a ThreadX compatible open62541 library yet. You would have to invest some development time to provide the necessary bits to make open62541 compile for ThreadX or pay someone to do that work for you.
Rolf Kalbermatter