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.
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