[ECOS] Help Reboot on Load

Claudio Corsi claudio.corsi@grangepoint.com
Thu Jul 19 18:36:00 GMT 2007


I am just starting to learn to develop with eCOS.

I am working with an x86 target (a spare pc)

I have been following the tutorial in the 'Embedded programming with 
eCOS' book.

So far I have built RedBoot and have it booting from GRUB on a cdrom, I 
have built a default eCOS to compile my applications with but I can not 
seem to get the apps to run on the target.

When I boot into RedBoot:

RedBoot(tm) bootstrap and debug environment [GRUB]
Non-certified release, version UNKNOWN - built 13:46:05, Jul 19 2007

Platform: PC (I386)
Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
Copyright (C) 2003, 2004, 2005, 2006 eCosCentric Limited

RAM: 0x00100000-0x040f0000, [0x00190d50-0x01000000] available
RedBoot>

I am just trying to get the hello.c app to compile and run using the 
following

hello.c

/* this is a simple hello world program */
#include <stdio.h>

int main(void)
{
  printf("Hello, eCos world!\n");
  return 0;
}

Makefile

INSTALL_DIR=../ecos/ecos_install/

XCC=i386-elf-gcc

CFLAGS=-g -Wall -I$(INSTALL_DIR)/include -ffunction-sections -fdata-sections

LDFLAGS=-nostartfiles -L$(INSTALL_DIR)/lib -Wl,--gc-sections -Wl,--Map 
-Wl,hello.map
LIBS=-Ttarget.ld -nostdlib
LD=$(XCC)

all: hello

hello.o: hello.c
        $(XCC) -c -o $*.o $(CFLAGS) $<

hello: hello.o
        $(LD) $(LDFLAGS) -o $@ $@.o $(LIBS)

These files are as per the tutorial

Everything builds without error.

When I try to load hello.srec from my tftp server the target PC reboots 
as soon as the transfer starts, if I specify a base address to the load 
then the transfer will complete with the following output

RAM: 0x00100000-0x040f0000, [0x00190d50-0x01000000] available
RedBoot> load -v -b 0x00190d50 -h 192.168.0.11 hello.srec
Using default protocol (TFTP)
Address offset = 0x00088d50
Entry point: 0x00190d50, address range: 0x00190d50-0x00199030
RedBoot>

but when i try to run the app with 'go' or 'go 0x00190d50' the computer 
hangs

Any help would be appreciated.

Claudio Corsi











-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list