Message ID | CAKwPUozgoKv65xP-6m_U-4H+JL1hiBdktv7hKb6pbV7PiX0_vQ@mail.gmail.com |
---|---|
State | Not Applicable |
Headers | show |
Dear Kassey Lee, In message <CAKwPUozgoKv65xP-6m_U-4H+JL1hiBdktv7hKb6pbV7PiX0_vQ@mail.gmail.com> you wrote: > > I've tried the examples/standalone/hello_world.c, it > works on my platform! Good. > but when i add more functions in > examples/standalone/hello_world.c, for example > it will take the test function as the entry, but ignore > the hello_world ? can i have more than one functions in a standalone > application C source code ? thanks You can have as many functions as you like, but there is usually only one entry point. Also, please pay attention on the documented, mandatory entry sequence (including using app_startup() ). > and what's more, can we use IRQ on arm platform for > standalone application that is already supported by u-boot? The infrastructure is in place, so it should be possible, but I think not all ARM systems actually implement interrupt support, so please checn the architecture specific code for your CPU. Best regards, Wolfgang Denk
diff --git a/examples/standalone/hello_world.c b/examples/standalone/hello_world.c index 067c390..226ddef 100644 --- a/examples/standalone/hello_world.c +++ b/examples/standalone/hello_world.c @@ -24,6 +24,11 @@ #include <common.h> #include <exports.h> +void test(int i) +{ + printf(" this is a test %d \n", i); +} + int hello_world (int argc, char * const argv[]) { int i;