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]

Q: PowerPC HAL '.vectors', ROM/RAM, etc.


Hello,

I'm trying to port eCos to the MPC50x processors. To debug the port I have to
use proprietary board that already has very simple loader that sits in ROM and
can load program through RS232 port to RAM and execute it. So I build eCos as 
startup type 'ram'.

Now, I need the '.vectors' section to be put in RAM, but 'vectors.S' file
generates '.vectors' section only if at least one of the following conditions
is met:

#if     defined(CYG_HAL_STARTUP_ROM)    || \
        defined(CYGPKG_HAL_POWERPC_SIM) || \
        defined(CYGSEM_HAL_POWERPC_COPY_VECTORS)

The second condition here seems to be a bad idea anyway because code in
'powerpc/arch' should not know about particular target being supported, I
believe. Anyway, in my case I need '.vectors', but neither of these conditions
are true. I guess that was the problem with SIM target as well, and the
vectors.S was just quickly adopted. Obviously doing the same thing for my
target is even less acceptable. How do I solve this?

Another problem is that code in 'powerpc/arch' assumes RAM is located at 0,
but it's not the case with my board where both RAM and vectors are located at
0xfff00000, and ROM is located at 0.

The best solution for these problems would be to fix PPC HAL to make ROM/RAM
configuration, ROM/RAM location, vectors location, and requirement to copy
vectors from ROM to RAM be separate parameters that are to be defined by
target, but I don't fill myself familiar enough with eCos to predict required
amount of work and all the consequences. Any suggestions?

BTW, I noticed that linker files in the PowerPC variants define variables like,
e.g., '__reserved_vsr_table', that currently seem to be used nowhere. Are they
invented to get rid of static definition of 'hal_vsr_table' in the
'powerpc.ld' file?

Forgot to say that I'm working with version from CVS.

Thanks in advance for any help.

BR,
Sergei Organov.


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