[U-Boot] add more function in hello_world.c for standalone application
Kassey Lee
kassey1216 at gmail.com
Thu Aug 2 09:16:04 CEST 2012
hi, Wolfgang:
I've tried the examples/standalone/hello_world.c, it
works on my platform!
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
and what's more, can we use IRQ on arm platform for
standalone application that is already supported by u-boot?
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;
here is the log:
U-Boot 2011.12-00889-g7a0eac3-dirty (Aug 02 2012 - 22:36:53)
DRAM: 64 MiB
WARNING: Caches not enabled
NAND: 256 MiB
MMC: SDHCI: 0
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Hit any key to stop autoboot: 0
[test] loadb 0x81000000
## Ready for binary (kermit) download to 0x81000000 at 115200 bps...
## Total Size = 0x0000027f = 639 Bytes
## Start Addr = 0x81000000
[test] go 0x81000000
## Starting application at 0x81000000 ...
this is a test 1
## Application terminated, rc = 0x13
--
Best regards
Kassey
More information about the U-Boot
mailing list