This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Gameboy Advance vectors.S (dealing with BIOS)
- From: Jonathan Larmour <jlarmour at redhat dot com>
- To: Bill Diehls <billabloke at yahoo dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Tue, 22 Jan 2002 19:49:48 +0000
- Subject: Re: [ECOS] Gameboy Advance vectors.S (dealing with BIOS)
- Organization: Red Hat UK Ltd.
- References: <20020122184231.64709.qmail@web20105.mail.yahoo.com>
Bill Diehls wrote:
>
> Hi Jonathan,
> Thank you for the suggestions! Regarding
> PLATFORM_VECTORS and (3) (described below), it seems
> that PLATFORM_VECTORS is good for inserting code into
> vectors.S, but as far as inserting a new section (with
> its own absolute address) into arm.ld, another
> mechanism is required. One possibility is to create
> PLATFORM_SECTION and insert it into arm.ld such as:
>
> #ifndef PLATFORM_SECTION
> #define PLATFORM_SECTION
> #endif
>
> #define SECTION_fixed_vectors(_region_, _vma_, _lma_)
> \
> .fixed_vectors _vma_ : _lma_ \
> { FORCE_OUTPUT; KEEP (*(.fixed_vectors)) } \
> > _region_ \
> PLATFORM_SECTION
>
> That is, if it wants to be included after
> fixed_vectors. Is there a better way to do this?
Probably, what about:
#ifndef CYG_PLF_DEFINED_SECTION
#define CYG_PLF_DEFINED_SECTION( _region_, _vma_, _lma_ )
#endif
#define SECTION_platform_defined1( _region_, _vma_, _lma_)
\ CYG_PLF_DEFINED_SECTION( _region_, _vma_, _lma_ )
You'll have to ensure CYG_PLF_DEFINED_SECTION is defined in hal.h but
that's easy. Then in the memory layout files (.ldi/.mlt/.h) for the GBA,
make sure that new section is added and placed appropriately. Then other
platforms don't need to know about it.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine