[ECOS] EDB7xxx Ethernet Driver with different bus width
honda@itri.org.tw
honda@itri.org.tw
Tue Jun 19 20:47:00 GMT 2001
Hi,
I'm porting eCos to a EP7312 system. Its bus width for CS8900 is
configured as 16 bit. So the register address is different that that
defined in the cs8900.h. So I tried to modified the code as
#ifdef(__EDB7312)
#define CS8900_RTDATA *(volatile unsigned short *)(CS8900_BASE+0x00)
#define CS8900_TxCMD *(volatile unsigned short *)(CS8900_BASE+0x04)
#define CS8900_TxLEN *(volatile unsigned short *)(CS8900_BASE+0x06)
#define CS8900_ISQ *(volatile unsigned short *)(CS8900_BASE+0x08)
#define CS8900_PPTR *(volatile unsigned short *)(CS8900_BASE+0x0A)
#define CS8900_PDATA *(volatile unsigned short *)(CS8900_BASE+0x0C)
#else
#define CS8900_RTDATA *(volatile unsigned short *)(CS8900_BASE+0x00)
#define CS8900_TxCMD *(volatile unsigned short *)(CS8900_BASE+0x08)
#define CS8900_TxLEN *(volatile unsigned short *)(CS8900_BASE+0x0C)
#define CS8900_ISQ *(volatile unsigned short *)(CS8900_BASE+0x10)
#define CS8900_PPTR *(volatile unsigned short *)(CS8900_BASE+0x14)
#define CS8900_PDATA *(volatile unsigned short *)(CS8900_BASE+0x18)
#endif
But the compiler did not recognized the symbol __EDB7312 that I defined in
the HAL cdl. How can I make it automatically when I specify the CPU type in
HAL, then it add -D__EDB7312 in whole project for gcc option.
Kuang-Yang Chuang
OES / ITRI
J220, Bldg. 78, 195-8, Sec. 4, Chung-Hsing Rd.
Chutung, Hsinchu 310, Taiwan, ROC
TEL: 886-3-5917546
FAX: 886-3-5917531
More information about the Ecos-discuss
mailing list