This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ATMEL eb55 Redboot_RAM problem !


Hello everybody,

here is a description of my problem :

I have an ATMEL eb55 evaluation board. I downloaded the latest ecos (V 2.0)
from the repository, and applied a few patches from the list, resulting in a
sane subdivision of the at91 directory.

Using tools under Linux RedHat 8.0, I create a new project from the template
eb55, selecting RedBoot package. I did not configure any platform and
everything was set for building a simple RedBoot for running in RAM. I don'
t care about the flash memory for now.

Compiling was OK but in order to be able to run, I had to modified the
linker .ldi file to avoid to overwrite Angel while it was downloading. I
configured my RedBoot_RAM elf file for downloading at address 0x2000000 and
execution at 0x2000040. And downloading was OK. I ran  RedBoot_RAM as
specified in documentation, but I can not get the RedBoot> prompt.

After investigation using various methods (using Angel stub, or set leds
on/off), I found the problem resides in the macro CYGACC_CALL_IF_DELAY_US
called from main.c.

That macro resulting assembler code from the compiled and linked RedBoot_RAM
file is simple and consists in fetching from memory the address of a routine
and pass a value which I supposed to be a delay. Unfortunately, the fetched
routine address (0x2000048) is bullshit and when the PC is set to that
value, an exception is generated.
But the GDB stub is running and I can connect to the target with serial
settings  that are different from angel's (38400 instead of 9600).

I tried to investigate how the few assembler lines of code correcponding to
that macro were generated and arrived in the file
../hal/common/current/include/hal_if.h

Here I found the macro code but it is very confusing.

Did somebody already encounter that problem ??? Anyway, I will appreciate
any hints or advice.

There is also one thing that is not clear in my head : I am running a
program (RedBoot_RAM) with a stub (Angel or GDB) that allow some debugging.
Basically, debugging in RAM consists in replacing an instruction with an
interrupt that will activate the debugger. The interrupt was placed at
proper place by the debugger.
Here is what bother me : on one side we have a debugger that is tied to a
software interrupt, and on the other side we have a RedBoot_RAM code that
will dialog through a serial communication with a host computer running GDB,
and using serial port forced to use interrupts also..
Is it safe ??? I suppose that the RedBoot_RAM uses the GDB stub to
communicate with the host, am I right ??? Should I build my RedBoot_RAM
without the GDB stub ???

Thank you for your attention and answers.
Denis


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]