We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I want to make mechanism to force my processor (LPC2378) to do one program if some flag is set and to do another if that flag isn't set. But that two programs may have functions with same name and I want to insure that right one will be executed.
If you want to jump to a fixed address in C you can just do something like:
#define FN_ADDR 0x6000 // be sure to set the low bit if the destination is Thumb state code
...
((void (*)(void))FN_ADDR)();
Or, if you're not a fan of brevity:
typedef void fn_t(void);
((fn_t *)FN_ADDR)();
The cast is technically undefined behavior, but it'll do "the right thing".