
Hi Guys,
I am writing a u-boot standalone application and are having difficulty understanding how it decides the function to execute when I used to "go <start addr>+4" command.
In my application I have something like this...
the filename is my_test.c
/* Function prototypes */ int main (int argc, char *argv[]); void do_func_a (int argc, char *argv[]); void do_func_info (void);
int main (int argc, char *argv[]) { app_startup (argv);
.... do_func_info();
do_func_a(argc, argv);
return(0); }
void do_func_a(int argc, char *argv[]) { .... }
void do_func_info(void) {
}
When I go go <start addr>, the execution jumps straight to do_func_info() and the application finishes. (which is just a bunch of printf).
How do I ensure that when compiled, the my_test.bin places the main function at the "go" point?
I have tried re-ordering the function bodies around, moving main as the last function and thus removing all the function prototypes. I tried name matching the "main" function to the file name, none seems to help.
Thank you so much for all your help.
Richard Retanubun.