From: richardretanubun <richardretanubun@ruggedcom.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] How to specify the starting function of a U-boot standalone application.
Date: Tue, 24 Jun 2008 17:45:17 -0400 [thread overview]
Message-ID: <48616AED.50205@ruggedcom.com> (raw)
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.
next reply other threads:[~2008-06-24 21:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-24 21:45 richardretanubun [this message]
2008-06-25 5:44 ` [U-Boot-Users] How to specify the starting function of a U-boot standalone application Jens Gehrlein
2008-06-25 13:42 ` [U-Boot-Users] How to specify the starting function of aU-boot " McMullan, Jason
2008-06-25 13:57 ` Jens Gehrlein
2008-06-27 16:08 ` richardretanubun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48616AED.50205@ruggedcom.com \
--to=richardretanubun@ruggedcom.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.