bankswitching support in binutils

Simon Richter Simon.Richter@hogyros.de
Fri Jan 27 16:44:00 GMT 2006


Hi,

David D. Hagood wrote:
> I am working with a build of binutils and GCC supplied by Cypress 
> Semiconductors for their EZUSB chips. Unfortunately, this code isn't in 
> the mainline branches (probably because Cypress didn't want to maintain 
> it).

Well, they need to maintain it one way or the other.

> The chip supports bankswitched memory, but I don't know if bankswitch 
> support is in binutils. So, I'd like some pointers as to where to look 
> in the code for binutils to see if this is present, and if so, how to 
> use it to park routines in different banks.

My approach to a problem like this would be via linker relaxation, where 
the object files contain code to do bank switched accesses to all code 
and data and hints how to replace them by simple accesses in case the 
code happens to be accessible from the bank the PC is currently on.

What would be needed in ld would be a way to specify that functions may 
not cross certain "boundaries", and a gas that would create the 
appropriate code for jumps.

At least the 80C51 does not have initialized data, so the matter of 
accessing that is a non-issue for now.

> NOTICE:  This e-mail is intended solely for use of the individual or
> entity to which it is addressed and may contain information that is
> proprietary, privileged, company confidential and/or exempt from
> disclosure under applicable law.  [...]

Gesundheit.[1]

    Simon

[1] Yes, I am aware that you did not add the footer yourself.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 307 bytes
Desc: OpenPGP digital signature
URL: <https://sourceware.org/pipermail/binutils/attachments/20060127/a4930609/attachment.sig>


More information about the Binutils mailing list