This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
EB40a Redboot flash programming issues
- From: Øyvind Harboe <oyvind dot harboe at zylin dot com>
- To: <ecos-discuss at sources dot redhat dot com>
- Date: Mon, 2 Jun 2003 16:25:41 +0200
- Subject: [ECOS] EB40a Redboot flash programming issues
I've now gotten my first hello world app(see end) up and running on
my EB40a board, using the instructions I got on the
mailinglist.
Q1: why am I having problems programming flash using
Redboot [ROM], whereas it works fine using Redboot [RAM]?
Q2: Using Redboot [RAM] why am I having problems programming
to 0x1010000, whereas programming to 0x1020000 works fine?
Various info:
- Redboot ROM will refuse to program the flash. Various
error messages/hangs, ref.
http://sources.redhat.com/ml/ecos-discuss/2003-05/msg00365.html
I programmed the Redboot ROM using Wiggler and a special purpose
flash programmer software.
- Redboot RAM will refuse to program at 0x1010000("unknown error"),
but it works like a charm when I program at 0x1020000.
To program my application, I use Redboot ROM to load Redboot RAM,
which I then use to program my app at 0x1020000.
- The config files list the EB40a FLASH size as being 0x100000,
but AFAIK, it is 0x200000.
This is how I ended up creating my ROM application build environment:
- ecosconfig new eb40a default
- in configtool -> change startup type to ROM
- in configtool -> add two serial port drivers
- ecosconfig tree
- make
- manually edit ROM offset in the two files. I left ram offsets alone,
as I don't care about Redboot after my app has launched. (At least
not for now, the idea was that I would debug using JTAG Wiggler and
not need.
install/include/pkgconf/mlt_arm_at91_eb40a_rom.ldi
install/include/pkgconf/mlt_arm_at91_eb40a_rom.h
- make
- Read install/lib/target.ld, it should have picked up the new addresses
- Rebuild app using the new environment
Øyvind
/* extract from my hello world app */
for (;;)
{
/* write to serial port */
err = cyg_io_write( handle, test_string, &len );
/* all leds on. */
hal_at91_led_on(0xffffffff);
/* sleeping implies that threads are running! */
cyg_thread_delay(ticks);
/* all leds off. */
hal_at91_led_off(0xffffffff);
cyg_thread_delay(ticks);
}
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss