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 Jul 2004 08:15 AM by  mikee@logicpd.com
Incomplete loading using TeraTerm
 6 Replies
Sort:
You are not authorized to post a reply.
Author Messages
yu_yx@emotive.com.sg
New Member
New Member
Posts:


--
05 Jul 2004 04:30 AM
    Using the "load elf" command, I've tried to load a file over to the L7A400 SDK. But the transfer is always incomplete. Below is the error message I've got:

    losh>
    losh> load elf
    loading from stdin:
    R.
    elf file type : 0x0002
    machine type: 0028 version: 1
    prog start addr : 0xc00c00d8
    num prog headers: 1
    num sect headers: 17
    offset : 0x00008000 disk length: 0x000006b4 mem len: 0x000006ec
    phyaddr: 0xc00c0000 vaddr : 0xc00c0000 dl addr: 0xc00c0000
    ignoring rest of file... 8718 bytes. done
    running md5sum on the _loaded_ portion of the file:
    d3ad1d67c7fb4126df6a1ffa7a276ae0 - addr: c00c0000 len: 000006b4
    losh>


    Is anybody able to tell me why is this so?
    Is it because of the limitation of available SRAM space which is 80K?

    Thanks,
    Yu
    Anonymous
    Posts:


    --
    06 Jul 2004 10:40 AM
    That's a very valid question.

    This actually isn't an error, it's a normal opertion of Lolo. This happens when Lolo doesn't see another .elf header at the end of the checksum of the elf file that it just loader. This isn't anything to worry about but I can understand how this might be confusing at first.

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


    --
    06 Jul 2004 02:07 PM
    yu_yx,

    Aaron is exactly right. Basically, LoLo only loads the executable and data parts of an elf file. Any debug symbols etc. are ignored. That is the reason the LoLo outputs: "... running md5sum on the _loaded_ portion of the file: ..." What we are trying to make clear is we only load the parts of the file that _must_ be loaded.

    To verify that your file was loaded correctly, do the following at a Cygwin prompt or on a Linux box:

    1) arm-elf-objcopy -O binary your_program.elf foo.raw
    2) md5sum foo.raw
    3) rm foo.raw

    The first step uses the binary utility objcopy to strip out all of the elf headers, debug portions, etc. of your program's elf file and create a new raw binary file named foo.raw. This is exactly what LoLo is doing to your program as it loads it into SDRAM.

    The second step just calculates an MD5SUM on that raw binary file. The output can be compared to LoLo's output.

    Of course the last step just gets rid of that temporary binary file as you probably don't want it hanging around.

    Hope this helps,

    --mikee
    yu_yx@emotive.com.sg
    New Member
    New Member
    Posts:


    --
    07 Jul 2004 11:45 PM
    Hi Aaron and Mikee,

    Thanks for the clarifications.

    The next problem I have is that I cannot save a binary image into the CompactFlash I've mounted.
    I've mounted a compactflash device.
    Load an elf file.
    Execute the Burn Command.
    But an error that says "unable to burn without a loaded flash image" appears.

    Have I missed a step or this is not the right way to save a binary file into compactflash?

    Below are the captures from TeraTerm:

    Regards,
    Yu



    losh> mount fatfs /dev/cf

    losh> load elf
    loading from stdin:
    R.
    elf file type : 0x0002
    machine type: 0028 version: 1
    prog start addr : 0xc00c03fc
    num prog headers: 1
    num sect headers: 18
    offset : 0x00008000 disk length: 0x000086ec mem len: 0x00008da4
    phyaddr: 0xc00c0000 vaddr : 0xc00c0000 dl addr: 0xc00c0000
    ignoring rest of file... 60785 bytes. done
    running md5sum on the _loaded_ portion of the file:
    82671ea7febebc03ddc580ff54dbe484 - addr: c00c0000 len: 000086ec

    losh> burn /dev/cf
    unable to burn without a loaded flash image
    command failed
    usage:
    burn [device]
    burns the already-loaded image into flash device 'device'
    example:
    mikee@logicpd.com
    New Member
    New Member
    Posts:


    --
    08 Jul 2004 09:20 AM
    yu_yx,

    The LogicLoader does not currently support programming Compact Flash devices. Therefore, you won't be able to accomplish your immeadiate goal. Around here we typically use SanDisk USB devices to program Compact Flash cards. They are both inexpensive and reliable. I'm currently using a SanDisk "ImageMate" which is SanDisk part number SDDR-31.

    Due to the above fact, the only valid target for the "burn" command is the resident flash memory array. The image you were loading was built for RAM (evident by the output; "loading from stdin: R."). That is why LoLo reported the error as; "unable to burn without a loaded flash image."

    Hope this clears things up.

    --mikee
    yu_yx@emotive.com.sg
    New Member
    New Member
    Posts:


    --
    13 Jul 2004 04:20 AM
    Hi Mike,
    thanks for your reply.
    Is there anyway to auto run an elf file from a flash or CompactFalsh memory instead of the SRAM?
    I'm asking this question because if I were to use this board in an embedded system, I cannot affort to link it to a PC to load the elf into the SRAM memory and load it on every power up.

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


    --
    13 Jul 2004 08:15 AM
    yu_yx,

    You can certainly execute in place from Flash memory. However, you cannot execute in place from Compact Flash memory. LoLo provides a scripting capability to automatically launch an executable at board reset. You should check the LogicLoader's user manual for more information. There is a whole section in there describing bootime scripts.

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