I'm working on a embedded application where I need to declare an array of function pointers on a fixed memory address and then use it in different .c files. What I came up with is this:
typedef void(__irq __arm * p_intr_handler_t)(void);
p_intr_handler_t * IntTable = (p_intr_handler_t *)&VIM_RAM_BASE;
p_intr_handler_t IntTable[95];
VIM_RAM_BASE is the address. I delcare this in main.f file and I need to use it in various .c files, so I declared it like this:
extern p_intr_handler_t IntTable[95];
But whilst trying to compile I get an error message: "declaration is incompatible with "p_intr_handler_t *IntTable" (declared at line 3)" that message goes for both the normal and the extern declaration.
Any ideas what's wrong?
Thanks