Hi All I have use function pointer array like this main.c uchar i; for(i = 0;i<END_COMMAND;i++) printf("%bu %x\n",i,Func_table[i]); cmd.h typedef void (*Func) (void); void init_func(void); void reset_func(void); void end_command(void); cmd.c Func Func_Table[] = { init_func, reset_func, end_command } void init_func(void){DO_SOMETHING} void reset_func(void){DO_SOMETHING} void end_command(void){DO_SOMETHING} When I run in Keil IDE Debug mode it can trace into code and print correct function address (Ex 0 ff00 1 ff10 2 ff20) ,but when I run into flash,all function address is print zero(ex 0 0 1 0 2 0) so I got reset when use this Func_Table why?? Thanks a lot
I think nobody is able to figure out your programming problem from the posted MAP files. When you get a RESET, you should analyse the problem using the debugger. I suggest that you start with a small example frist. Take a look to A51.PDF, Chapter 9, Using the Overlay Control, Pointer to a Function in Arrays or Tables. Reinhard
Thanks The Code I have run very well before, I just distributed code into many c file add [code] key world cann't run any, I add [NOOVERLAY],the result is the same>< Thanks again,I will try to read DOC more