Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 19 Jul 2007 06:22 PM by  lwalkera
Not able to load .out file
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages
arjun.kv@7lf-tech.com
New Member
New Member
Posts:


--
13 Jul 2007 01:27 AM
    Hi,


    We wrote a simple program to flash LED's.
    We got the output as a.out after compiling with the arm-none-linux-gnueabi-gcc-4.1.1 compiler.
    When we try to load the file using load elf we get following error:

    losh> load elf /tftp/192.168.0.3:led3.out
    loading from /tftp/192.168.0.3:led3.out:
    ..
    ELF section 0: download address: 0x802004bc load address: 0x000084bc
    ELF section 1: download address: 0x80200034 load address: 0x00008034
    ELF section 2: download address: 0x80200114 load address: 0x00008114
    ELF section 3: download address: 0x80200000 load address: 0x00008000
    ELF section 4: download address: 0x802004c8 load address: 0x000104c8
    ELF section 5: download address: 0x802004d4 load address: 0x000104d4
    ELF section 6: download address: 0x80200128 load address: 0x00008128
    ...done
    load failed
    error: load: address space does not fit in ram ()

    And when we try to load as bin, we get the error:

    losh> load bin /tftp/192.168.0.3:led3.out
    loading from /tftp/192.168.0.3:led3.out:
    ...done
    load failed
    error: load: file is not in Microsoft NK.bin format (/tftp/192.168.0.3:led3.out)


    Can anyone please tell what needs to be done here?

    Thanks
    arjun.kv@7lf-tech.com
    New Member
    New Member
    Posts:


    --
    15 Jul 2007 11:02 PM
    Hi,

    Is this happening because LoLo is different from Redboot, since we are using the compiler which is used for ADS board?

    Also can anybody tell the exact difference between LoLo and redboot.

    Thanks
    kurtl@logicpd.com
    New Member
    New Member
    Posts:


    --
    17 Jul 2007 02:34 PM
    Arjun.KV,
    The 'load bin' command expects a winCE comipled binary image. I am not sure the output formate of the file you are compiling. Is it straight binary? If so you could use the 'load raw' command.

    -K
    lwalkera
    New Member
    New Member
    Posts:


    --
    19 Jul 2007 06:22 PM
    Your .elf file is in standard ELF linker format, which has the absolute locations of each segment stored in the file. From the looks of your output, it would seem that you didn't relocate your code so that it gets loaded in RAM when you generated your .out file.
    IIRC, LoLo puts the RAM at 0x80000000 when it sets up the MMU. So, you'll have to pass "-Wl,--section-start .text=0x800d0000,--section-start .data=0x80200000" or something similar to gcc (depending on how big your object code and initial data are) so that it puts the right address in the .out file.
    You are not authorized to post a reply.