[U-Boot-Users] Uboot runs but applications do not?

I am have not been able to run any application.
Using example code Hello_world.c and further simplifying it to ..... printf("hello world" line only.
results in. It seems to me I have not gotten an interface to Uboot stdio correct.
Using a BDI 2000 results in a crash as well. The BDI-2000 will not allow Uboot to "boot" without dropping out into a reset.
Is there an example of BDI-2000 running correctly as Uboot comes up? I am most uncertain about my tools!
Regards John
CPU: MOTOROLA Coldfire MCF5235 RESET: Core External Reset RESET: External BOARD: M5235BCC DRAM: 16 MB FLASH: 2 MB *** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial Das-Uboot > loads ## Ready for S-Record download ...
## First Load Addr = 0x00020000 ## Last Load Addr = 0x0002218B ## Total Size = 0x0000218C = 8588 Bytes ## Start Addr = 0x00020000 Das-Uboot > go 20000 ## Starting application at 0x00020000 ...
*** Unexpected exception *** Vector Number: 4 Format: 04 Fault Status: 0
PC: 00ffa0ac SR: 00002700 SP: 00f91c18 D0: 00000000 D1: 0000022d D2: 00000002 D3: 00000000 D4: 00000000 D5: 00000000 D6: 00000001 D7: 00fa1f8c A0: 00000002 A1: 00fef940 A2: 00ffa0ac A3: 00fee52e A4: 00f91cd4 A5: 00ff8c00 A6: 00f91c68
*** Please Reset Board! ***
John Jeffers P.Eng. , MS1074 Software Applications Engineering 11211 FM 2920, Tomball, TX, 77375 281.357.2773, 281.357.5491 Fax

Dear John,
in message OF3743CE39.4DE0E0B9-ON86257203.00572AF4-86257203.00585B34@BJSERVICES.COM you wrote:
I am have not been able to run any application.
Why not? What exactly is the problem?
Using example code Hello_world.c and further simplifying it to ..... printf("hello world" line only.
This will not work. You must keep the app_startup() call; see "doc/README.standalone".
results in. It seems to me I have not gotten an interface to Uboot stdio correct.
Or you simplified the code too much. Just lave it as is.
Is there an example of BDI-2000 running correctly as Uboot comes up? I am most uncertain about my tools!
Did you read the manual? The DULG is pretty clear about that.
Best regards,
Wolfgang Denk

I am have not been able to run any application.
I had the same problem, but my board had 8343 powerpc processor, so my load address was 40000 and to run the application, I had to do
=> tftp 0x40000 /home/bil/hello_world.bin => go 0x40004
The start code was at at an offset 4 from my load address. You may have to consider this. I used nm utility (powepc-linux-nm ) that was in my cross compiler's bin directory to look into the hello_world.obj and saw that the symbol hello_world was at 40004 (I think even a common non cross compiler nm utility will work too and you should be able to see the addresses, symbols in your obj file). So use nm to explore the hello_world.obj and know more about symbols and the locations of hello_world program.
Using example code Hello_world.c and further
simplifying it to .....
printf("hello world" line only.
As written in other reply by wolgang Denk, you may have simplified the code too much. app_start() is necessary as it zero's out BSS ( necessary for things to work poperly, I remeber hello_world working properly even without app_start() but forget about it, I think you may just leave it there).
results in. It seems to me I have not gotten an interface to Uboot stdio correct.
To cross check wether you have interface to u-boot provided printf, do this :
The u-boot exports the interface in a export list present in /u-boot-install-dir/include/exports.h.
Also look in /u-boot-install-dir/include/_exports.h
Most probably you should find a line EXPORT_FUNC(printf)here too, if you find these, it means that you have access to the u-boot printf functionality.
Bilahari
participants (3)
-
bilahari
-
John.Jeffers@bjservices.com
-
Wolfgang Denk