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 13 Oct 2004 09:34 AM by  mikee@logicpd.com
Problems loading elf file in LOLO
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages
patricegagnon@patricegagn
New Member
New Member
Posts:


--
12 Oct 2004 10:32 PM
    I am experiencing various problems transmitting ELF files to the board using LOLO (Version BRA_release_1-2-pre1.2.5).

    When trying to load an elf file for example, I get the following error message:

    load elf /tftp/192.168.1.100:blob-elf32.sdk400
    F.
    elf file type : 0x0002
    machine type: 0028 version: 1
    prog start addr : 0x00000000
    num prog headers: 1
    num sect headers: 10
    offset : 0x00008000 disk length: 0x00016018 mem len: 0x00016018
    phyaddr: 0x00000000 vaddr : 0x00000000 dl addr: 0xc00c0000
    ignoring rest of file... 2051 bytes. done
    running md5sum on the _loaded_ portion of the file:
    65c3c810ff874206e663feba878220e6 - addr: c00c0000 len: 00016018

    The md5sum is also wrong. This ELF file has been sent to me by Kevin Wells at Sharp. It seems to be transmitted correctly from the tftp server side.

    I am also experiencing similar error messages when trying other ELF files like the ones for upgrading BOLO/LOLO, so I can't upgrade BOLO/LOLO. Sending a file TeraTerm as binary gives the same results.

    Any suggestion would be greatly appreciated.
    mikee@logicpd.com
    New Member
    New Member
    Posts:


    --
    13 Oct 2004 09:34 AM
    patrice,

    Okay, I think we can work through this. I have a question about the md5sum though. Are you sure that it is wrong?

    I only ask because it isn't always obvious what is being hashed here. LoLo only hashes the loaded portion of the file. So, if you just run md5sum on your workstation, on the ELF file, it will look different. To see what LoLo is hashing, do the following:

    arm-elf-objcopy -O binary file.elf file.raw
    md5sum file.raw

    Then compare the two outputs again. The first line strips out all of the ELF headers, debug information, etc. This leaves only the raw binary (.data, .text, .bss) sections left. That is what LoLo does when it loads the file.

    I have a simple shell script that lets me do this in one command such as:

    arm-md5.sh:

    arm-elf-objcopy -O binary $1 $1.raw
    md5sum $1.raw
    rm -f $1.raw


    Also, you know that you have to use the burn command after you load this file to store it in flash correct? See the LogicLoader's User Manual for more information on the correct sequence needed to store a program in flash and why that is the way it is.

    Please let me know if this helps. If not, can you post the entire session and include it in your next post.

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