As far as I can tell, there is no way to declare that a particular function pointer will point at plain ARM code or at Thumb code. I'm more than a little surprised actually, so maybe I just missed something. How can I do this?
Some background: The function is in ROM. I'm using a linker script to give it a symbol, like so: PROVIDE( tx_thread_create = 0xffff2718); I'll be declaring it somewhat like this: int __cdecl thread_create(void *thread, char *name, void (__cdecl *fn)(int), int param, void *stack, int stack_size, int sched1, int sched2, int sched3, int sched4); Note that the function itself takes a pointer. I might want to ability to enforce that the pointer goes to Thumb code or to non-Thumb code. Certainly I need to allow for a thread_create function that can handle either kind of code.