Back to index

cell-binutils  2.17cvs20070401
tic54x.h
Go to the documentation of this file.
00001 /* TI COFF information for Texas Instruments TMS320C54X.
00002    This file customizes the settings in coff/ti.h. 
00003    
00004    Copyright 2000, 2001 Free Software Foundation, Inc.
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; either version 2 of the License, or
00009    (at your option) any later version.
00010    
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014    GNU General Public License for more details.
00015    
00016    You should have received a copy of the GNU General Public License
00017    along with this program; if not, write to the Free Software
00018    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
00019 
00020 #ifndef COFF_TIC54X_H
00021 #define COFF_TIC54X_H
00022 
00023 #define TIC54X_TARGET_ID 0x98
00024 #define TIC54XALGMAGIC  0x009B  /* c54x algebraic assembler output */
00025 #define TIC5X_TARGET_ID  0x92
00026 #define TI_TARGET_ID TIC54X_TARGET_ID
00027 #define OCTETS_PER_BYTE_POWER 1 /* octets per byte, as a power of two */
00028 #define HOWTO_BANK 6 /* add to howto to get absolute/sect-relative version */
00029 #define TICOFF_TARGET_ARCH bfd_arch_tic54x
00030 #define TICOFF_DEFAULT_MAGIC TICOFF1MAGIC /* we use COFF1 for compatibility */
00031 
00032 /* Page macros
00033 
00034    The first GDB port requires flags in its remote memory access commands to
00035    distinguish between data/prog space.  Hopefully we can make this go away
00036    eventually.  Stuff the page in the upper bits of a 32-bit address, since
00037    the c5x family only uses 16 or 23 bits.
00038 
00039    c2x, c5x and most c54x devices have 16-bit addresses, but the c548 has
00040    23-bit program addresses.  Make sure the page flags don't interfere.
00041    These flags are used by GDB to identify the destination page for
00042    addresses. 
00043 */
00044 
00045 /* Recognized load pages (by common convention).  */
00046 #define PG_PROG         0x0         /* PROG page */
00047 #define PG_DATA         0x1         /* DATA page */
00048 #define PG_IO           0x2         /* I/O page */
00049 
00051 #define NEEDS_PAGE(X) ((X)==C_EXT)
00052 #define PAGE_MASK       0xFF000000
00053 #define ADDR_MASK       0x00FFFFFF
00054 #define PG_TO_FLAG(p)   (((unsigned long)(p) & 0xFF) << 24)
00055 #define FLAG_TO_PG(f)   (((f) >> 24) & 0xFF)
00056 
00057 #include "coff/ti.h"
00058 
00059 #endif /* COFF_TIC54X_H */