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!