This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

u-boot and standalone application "hello_world"

Hi, all!

I need to run standalone application hello_world from u-boot/examples/standalone directory. I read documentation from http://www.denx.de/wiki/view/DULG/UBootStandalone. But my board was hang when I load and run this (or any) example:

BOARD#tftp hello_world.bin
Using DaVinci EMAC device
TFTP from server 192.168.0.39; our IP address is 192.168.0.95
Filename 'hello_world.bin'.
Load address: 0xc1000000
Loading: #
done
Bytes transferred = 594 (252 hex)
BOARD#go 0xc1000004
## Starting application at 0xC1000004 ...

And after this my board was hang. I try to use different addresses, but in any case board was hang.

I have a some questions:

1) This examples is working or not? I not change it.

2) How determine address in RAM where I must load hello_world. How I can change this address?

Thank you.

  • Hi Idle,

    In u-boot 0xC1000000 is not a valid address, its depends upon you DDR memory

    1) This examples is working or not? I not change it.

    Anil: Ideally  it should work

    2) How determine address in RAM where I must load hello_world. How I can change this address?

    Anil: Check these environment variables "loadaddr" and "bootcmd", which contains the load address

    Regards

    AnilKumar

    Please mark this Forum post as answered via the Verify Answer button below if it helps answer your question.  Thanks!

  • Hi Anil, thank you, for your attention!

    I have DDR3 connected to EMIF1 at address 0xC0000000. 

    My environment variable:

    loadaddr=0xC1000000

    In u-boot/board/my_board/config.mk

    TI_LOAD_ADDR = 0x40400000                                                                                                               
    TEXT_BASE = 0xC0700000
    but in x-board/u-boot/arch/arm/config.mk
    STANDALONE_LOAD_ADDR = 0xc100000 - miss "0" 
    I correct it's value and example now is running!
    X-BOARD#tftp hello_world.bin
    Using DaVinci EMAC device
    TFTP from server 192.168.0.39; our IP address is 192.168.0.95
    Filename 'hello_world.bin'.
    Load address: 0xc1000000
    Loading: #
    done
    Bytes transferred = 594 (252 hex)
    X-BOARD#g 0xc1000004
    ## Starting application at 0xC1000004 ...
    Example expects ABI version 6
    Actual U-Boot ABI version 6
    Hello World
    argc = 1
    argv[0] = "0xc1000004"
    argv[1] = "<NULL>"
    Hit any key to exit ...

    I have another question:

    I need some test of our hardware, and want change hello_world to do my task.

    1) Can I use network interface to communicate target with host from u-boot?

    Thank you.

  • Hi Idle,

    AFAIK, by using tftp server (network) we can download images to target.

    What you are trying to do exactly?

    Regards

    AnilKumar

    Please mark this Forum post as answered via the Verify Answer button below if it helps answer your question.  Thanks!

     

  • Hi, AnilKumar!

    I want to do:

    1) Init GPMC CS1 (already done)

    2) Receive host data from network (similar to socket: open -> read -> write or something similar )

    3) Write data from host to GPMC CS1. (already done from local memory)

    4) Read Data from GPMC CS1 device. (already done from local memory)

    5) Send data from target to host over network.

    Now I can do 1-4 from local program data in hello_world.bin.

    It is possible? I look some code in examples and see 

    #include "../drivers/net/smc91111.h"

    Thank you.

    P.S. Sorry for my English.

  • Hi Idle,

    Sending data from target to host is not supported from u-boot. You can do it from the kernel.

    Regards

    AnilKumar

  • Hi Anil,

    Oops :(  I hoped use u-boot standalone application as workaround, because I have some problem to boot linux... Please look at link below

    http://e2e.ti.com/support/embedded/linux/f/354/t/168819.aspx#616168

    may be you can give me any advise.

    Thank you.

  • Hi all,

    Can you help me too? I'm trying to configurate in u-boot a  "standalone exampe" for a pandaboard Rev 2.

    I'm loading "hello_world.bin" at 0x82000000 but when I try to  type  "go 0x82000004" the system hangs on.

    I thank you in advance,

    Fabrizio

     

     

     

     

  • Hi, Fabrizio!

    How you load hello world image on target?

    Try to use another binary file from u-boot/example.

    Try to load image with loady 0x82000000 and use go 0x82000000.

    Find and check STANDALONE_LOAD_ADDR variable in u-boot sources. In my case this variable was set in invalid value.

  • Thanks a lot idle, it worls.

     Do you know also how to compile only the standalone application? That could help me to save a lot of time.

    Best Regards,

    Fabrizio

     

  • Sorry, but I don't know :( how. 

    I use (from u-boot top directory) make -j4 to build all. If you do not changed any code in u-boot source (only in example) it will be very fast.

    If you find solution - please write here :)

  • Simply try 'make examples/standalone' at the top of source-tree.

  • Thank you Denis! It is really simple :)

  • I was trying to load a helloworld aplpication from u boot console via loadb command of uboot.

    It is getting loaded at  loadaddr 0x00100000(default  loadaddr for uimage).

    But when i jump to this address, console hangs.

    Possibly i am loading to a wrong address.

    In my borad confik.mk , I have

    TEXT_BASE = 0x05608000(SDRAM)

    TEXT_BASE =  0x40010000(ESRAM)

    in arm/config,mk

    STANDALONE_LOAD_ADDR = 0xc100000

    Now which seeting i should take to avoid hang/load to correct address.

    Pls let me know the changes required changes.

  • Hello,

    Does anyone knows if it possible to load other format than bin as a standalone application.

    I ask because on building other application (not hello_world), I get huge bin file.

    Thank you!
    Ran