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 25 Aug 2004 09:20 AM by  mikee@logicpd.com
[lolo] unable to read elf header
 4 Replies
Sort:
You are not authorized to post a reply.
Author Messages
benlau@linux.org.hk
New Member
New Member
Posts:


--
24 Aug 2004 04:15 AM
    Hi all,

    I just received my board with LH74A00 , and would like to write a sample program for the board. However , I got a problem when uploading the elf exec.

    The lolo complains that it can't read the elf header. That is the error message(the elf is downloaded from logicpd site):

    losh> load elf /tftp/192.168.0.1:tftproot/bs_7400_dbg.elf
    loading from /tftp/192.168.0.1:tftproot/bs_7400_dbg.elf:
    unable to read elf header

    elf file type : 0x3938
    machine type: c000 version: 775107633
    prog start addr : 0x312e3938
    num prog headers: 4896
    num sect headers: 72
    offset : 0x2a2a2a2a disk length: 0x00000000 mem len: 0x2a2a2a2a
    phyaddr: 0x2a2a2a2a vaddr : 0x2a2a2a2a dl addr: 0x00000000
    elf load failed.
    ignoring rest of file... 0 bytes. done

    I have no idea to solve the problem.. i have checked the exec by objdump , but no error was found. Any one know what is wrong?

    Thanks for any advice!
    Anonymous
    Posts:


    --
    24 Aug 2004 10:23 AM
    Ben,

    The .elf file that you're trying to load is for JTAG debugging purposes. Please try a load elf command on one of the .elf files that you download under the category "LogicLoader™ Bootloader/Monitor" in the 'my account' section of Logic's webpage. I would reccomend the file titled "LogicLoader for the LH7A400-10". I think you'll have more success there, here's a link, let me know how it works out.

    http://www.logicpd.com/auth/downloads.php?model=SDK-LH7A400-10

    Regards,
    mikee@logicpd.com
    New Member
    New Member
    Posts:


    --
    24 Aug 2004 10:04 PM
    This looks like another case where the file isn't being sent in 'binary' mode. Could you please check the settings on your terminal emulator program.

    If you are using TeraTerm, make sure you check the 'Binary' option at the bottom of the 'Send file' dialog box.

    Please let us know if this is the issue.

    Thanks,

    --mikee
    benlau@linux.org.hk
    New Member
    New Member
    Posts:


    --
    25 Aug 2004 02:59 AM
    Thanks for all of your reply!

    The problem solved!

    Yesterday , after i have configured the IP of the board. I did ping to verify the connectivity. It worked fine, and then i went out for another job. When i was back, the board was rebooted. Reconfigured the IP again , tried to upload the image , then I got the errors described in the post.

    Today, I found the LEDs of ACT and LNK are not blinking. It seems that the LAN port is not working. (the error message is rather confusing..) I could not get the connection up by configure the IP. Finally ,i found a solution to the problem:

    ifconfig sm0 dhcp (after typed the command , the LEDs are blinking immediately)
    ifconfig sm0 X.X.X.X X.X.X.X X.X.X.X

    Lolo version: BRA_release_1-2-pre1.2.5
    mikee@logicpd.com
    New Member
    New Member
    Posts:


    --
    25 Aug 2004 09:20 AM
    Ben,

    Good, I'm glad that you solved your issue. I guess I missed the fact that you were using TFTP to download the file. So my remark about setting the terminal setting to binary mode was pretty useless

    I'd like to add a few facts about the ifconfig command that have confused people in the past.

    -) 'ifconfig sm0 dhcp'
    This will initialize the Ethernet controller, activate it, and attempt to obtain an IP address, netmask, gateway, etc. from a DHCP server. So, as long as you have a DHCP server running on your local network, this is the only command you need.

    -) 'ifconfig sm0 x.x.x.x y.y.y.y z.z.z.z'
    This will initialize the Ethernet controller and set the IP address, netmask and gateway. However, it will NOT activate the controller. If you want to use the network connection, you need to follow with the command; 'ifconfig sm0 up'.

    Oftentimes, people without a DHCP server running on their network will use the second command to assign a static IP address. But, they forget to actually bring the interface up afterwards.

    Please post back if you have any more questions.

    Regards,

    --mikee
    You are not authorized to post a reply.