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 18 Jul 2005 05:55 PM by  Jean Boucher
Placing a small program in flash
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Gadeberg
New Member
New Member
Posts:4


--
23 Mar 2005 06:39 AM
    Hi all,
    I'm a bit new to all of this, and my question is simple: How do I go about placing a program in flash?
    I know that I'm supposed to use the burn command, but that requires a special flash image to be located in mem … how to do?

    Thanks in advance,
    Jesper
    Anonymous
    Posts:


    --
    23 Mar 2005 02:09 PM
    Jesper,

    Logic provides a Zoom Sample Application that provides a point reference for learning how to develop your own applications that will will run in LoLo. A link is provided below, you will need to have created an account online and registered your kit to download this file:

    http://www.logicpd.com/do...pplication_2_0_3.zip

    Please refer to the README contained in the .zip file for instructions on building the sample application.

    You will need Cygwin and GNU Tools in order to compile and work with this code:

    http://www.logicpd.com/downloads/237/Cygwin.zip

    http://www.logicpd.com/downloads/111/GNU.zip


    Please keep in mind that this sample code and not intended for production.

    Thank you,
    Gadeberg
    New Member
    New Member
    Posts:4


    --
    29 Mar 2005 01:06 AM
    In the readme, it says:
    Quote:
    The sample application can be built for two scenerios. The first is to download to and run out of RAM. The second is to download to RAM and run out of FLASH. Follow the instructions below.

    But I don't see any info regarding the second - the only thing that is covered is how to download a new LogicLoader.
    I found an older sample on the included CD, where MAKE is called with an, _RAM or _FLASH argument - there is no support for the LLH7a404 - but it works!
    MAKE is a bit new to me and i'm not quite sure what it is that makes the elf file 'burnable' ... can you give me some hints?
    Jean Boucher
    New Member
    New Member
    Posts:


    --
    18 Jul 2005 05:55 PM
    Jesper,

    I've found that you don't need to rebuild your app to run out of Flash (unless you want to) if all you want is for the board to run your app automatically when it powers-up. Here's what I did:

    I was hoping to download a file to /dev/flash0/usr/ using the console connection I already have, instead of having to find an Ethernet cable & hub, insert it between my PC and my wall jack, connect the LH7A404 board to it (find another straight RJ45 cable because the cable provided in the kit is a cross-over), find & setup a TFTP server (luckily, this was easy because I used ftp://ftp.3com.com/pub/utilbin/win32/3cdv2r10.zip), then finally downloaded my 1 KB helloworld.elf to the board. You have to admit that's more effort than just clicking on "File -> Transfer -> Zmodem -> Send" and selecting the file. ;o)

    I had hoped I could do somthing like "cp /dev/serial_7a404_2 test". That gives "cp /dev/serial_7a404_2 -> test", at which point I send the file using Tera Term's "File -> Send File" in binary mode, but I never get my losh prompt back (I have to send a break sequence (Control -> Send break) to get my prompt back):

    losh> cp /dev/serial_7a404_2 test

    cp /dev/serial_7a404_2 -> test
    error: cp: failed to read (/dev/serial_7a404_2)
    losh>

    Anyhow, I got the file transferred to /dev/flash0/usr/helloworld.elf using "cp /tftp/<ip_addr>:<filename> /usr/helloworld.elf", and confirmed that an app linked to run in RAM can be loaded from a bootup script using the "load elf <filename>" command. Now, here's what I get when I power-up the board:


    // this line is from //dev/serial_eeprom (starts with "LOLO...")
    add-yaffs usr nor 0x00C00000 0x00400000; mount yaffs /usr; source /usr/sys_init; exit;\n
    add-yaffs: inserted: start 0xc00000 - len 0x400000
    Mounting a YAFFS partition.

    ---------------------------------------------------
    Starting YAFFS file system:
    Current YAFFS partition table:
    0: usr
    1: <NULL>
    2: <NULL>
    3: <NULL>

    YAFFS initialized.
    ---------------------------------------------------
    // this line is from my /usr/sys_init script
    cd /usr; load elf helloworld.elf; exec; exit;\nloading from helloworld.elf:
    .
    loaded 592 @ 0xc00c0000 Ram
    md5sum of _loaded_ portion of the file:
    a080a4a81145ec3786971011ebb323af - addr: c00c0000 len: 00000250
    file loaded
    hello world // output from the unmodified sample app in RAM!!!

    ********************************************************
    LogicLoader

    (c) Copyright 2002-2005, Logic Product Development, Inc.
    All Rights Reserved.
    Version 2.0.1-LLH7a404_11 0001
    ********************************************************

    losh>

    Hope that helps you!
    You are not authorized to post a reply.