This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
How to run a program with "go" command from RedBoot ?
- To: ecos-discuss at sourceware dot cygnus dot com
- Subject: [ECOS] How to run a program with "go" command from RedBoot ?
- From: Gozman Florian Leonard <leonard at bluegem dot codec dot ro>
- Date: Mon, 06 Aug 2001 16:45:28 +0300
- Organization: bluegem
Jesper Skov wrote:
> >>>>> "Gozman" == Gozman Florian Leonard <leonard@bluegem.codec.ro>
writes:
>
> Gozman> Hi,
>
> Gozman> My target is: AT91EB40. I ready installed RedBoot and I tried
> Gozman> to run some of examples. When I tried to run the "hello
> Gozman> world" program with "go" command into RedBoot as follow:
> RedBoot> load -m y -b 0x02040000 // select the file with ".srec" ext.
> Gozman> oint: 0x02020040, address range: 0x02020000-0x02026c4c
> Gozman> xyzModem - CRC mode, 653(SOH)/0(STX)/0(CAN) packets, 6 retries
> RedBoot> go // blocks !!! none from the following commands works:
> Gozman> "go", "go 0x02040000" and "go 0x02020040"
>
> Gozman> What is the problem ?
>
> Impossible to tell. Try to use GDB instead, then you might get an
> exception - or at least be able to step through the code to see where
> and why it fails.
>
> At a guess, did you build the test in the same directory as you built
> redboot? You need to build from a clean directory.
>
> Jesper
With GDB works fine, but I want to write a script in RedBoot that will
be
executed at boot time and then which executes my program. The program
that I
have executed with GDB is one as follow:
/* this is a simple hello world program */
// led_blink.c
#include <stdio.h>
extern void set_leds(int val);
int main(void)
{
int i=0;
while(1)
{
set_leds(0x04);//red LED
for(i=1;i<100000;i++);
set_leds(0x02);//green LED
for(i=1;i<100000;i++);
}
return 0;
}
// end of led_blink.c
This program runs fine with GDB but not with "go" command within
RedBoot.
So, I don't know what is the error.
Thanks !
--
Leonard