From mboxrd@z Thu Jan 1 00:00:00 1970 From: richardretanubun Date: Tue, 24 Jun 2008 17:45:17 -0400 Subject: [U-Boot-Users] How to specify the starting function of a U-boot standalone application. Message-ID: <48616AED.50205@ruggedcom.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 +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 , 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.