This is the mail archive of the ecos-discuss@sourceware.cygnus.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]

Re: eCos porting questions


>>>>> "Joerg" == =?iso-8859-1?B?SvZyZyBSYXBrYQ==?=  <iso-8859-1> writes:

Joerg> Hello all I'm porting eCos 1.3.1 to the Motorola 68331.
Joerg> According to the eCos reference manual I start with the GDB
Joerg> stub.  In general, the documentation about the HAL is not so
Joerg> clear.

Joerg> I have the following questions:

Joerg> 1. The eCos configuration tool allows the following linker
Joerg> defined memory regions to be used for the memory layout: -
Joerg> vectors - fini - rodata - rodata1 - fixup - gcc_except_table -
Joerg> sbss - text - data - bss The last three one (text, data, bss) I
Joerg> know from an older version of m68k GNU tools (gcc 2.7.2). But
Joerg> what about the others? They are processor dependent?  Which one
Joerg> I have to use for m68k?

All of them. Some of them will probably end up empty, depending on
compiler options. All you should have to do is copy an existing file
and possibly adjust the __ mangling on some of the symbols.

Later on, when you get to the point where final binaries are linked,
you will be told if there are symbols that did not get mapped, and you
can update the linker script if necessary. But this doesn't happen
often.

Joerg> 2. For the GDB stub I have to implement an exception
Joerg> handling. In the document I read, that the entire processor
Joerg> state must be saved, interrupts must be disabled and then the
Joerg> debugger entry point must be invoked.  What are the entry point
Joerg> for the debugger? Is it function "void __handel_exception
Joerg> (void);" defined in file "/hal/common/generic-stub.c"?  If it
Joerg> is so, how did this function use the saved processor state
Joerg> (since this function has no input parameter)?  In the file
Joerg> "/hal/ARCH/include/hal_arch.h" the structure
Joerg> "HAL_SavedRegisters" is defined.  Did I need a variable of this
Joerg> type to handle the stuff above?

Look in powerpc/arch/.../src/hal_misc.c - the true entry point is
cyg_hal_exception_handler(HAL_SavedRegisters *regs) which sets the
global variable _hal_registers - this is where the stubs get the
registers from.

Jesper

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