This file describes the steps to build the CS8900A NDIS Ethernet Driver for
Windows CE 5.x.
=================================================================================
====================== Defines Used in Compiler ===============================
=================================================================================
The following defines can be used in the sources file.
1. ARM_PROCESSOR
If your processor type is ARM or Strong ARM, ARM_PROCESSOR must be
defined in the sources file. For example:
CDEFINES=$(CDEFINES) -DNDIS_MINIPORT_DRIVER -DARM_PROCESSOR
2. SHx_PROCESSOR
If your processor type is SH3 or SH4, SHx_PROCESSOR must be
defined in the sources file. For example:
CDEFINES=$(CDEFINES) -DNDIS_MINIPORT_DRIVER -DSHx_PROCESSOR
The default C_DEFINES used in the sources file is
C_DEFINES=$(C_DEFINES) -DNDIS_MINIPORT_DRIVER.
For Network Card without EEPROM: User can assign the default values in the
AssignedUserDefinedConfig() function in the cs8900a.c file.
================================================================================
============ Build the CS8900A NDIS DLL Lib for WinCE 5.x ==================
================================================================================
If your WinCE version is 5.x:
1. Got to the directory \WinCE_Directory\Public\Common\Oak\Drivers\NetCard.
2. Make a subdirectory CS8900A.
3. Copy the source files to the CS8900A directory.
4. Edit the file, Sources, to set the compiler flag options as described above.
5. Start the CE Platform Builder then click File -> Open Workspace.
Select your Platform.
6. Add CS8900A.cec to Catalog:
Click File -> Manage Catalog Items -> Import.
Go to \WinCE_Directory\Public\Common\Oak\Drivers\NetCard\CS8900A
and select CS8900A.cec.
Then, click OK.
6. Click View -> Catalog. The "CS8900A Ethernet" component is in
Third Party -> Device Drivers -> Networking
-> Local Area Networking (LAN) devices.
8. Add "CS8900A Ethernet" to your platform:
Right click "CS8900A Ethernet" then select "Add to OS Design".
From the OSDesignView window, you will see "CS8900A Ethernet" is under
Device Drivers -> Networking -> Local Area Networking (LAN) devices.
9. Cirrus provides cs8900a.bib to include cs8900a.dll in the run-time image.
Under normal condition, you don't need to modify this file.
MODULES :
cs8900a.dll $(_FLATRELEASEDIR)\cs8900a.dll NK SH
10. Cirrus provides cs8900a.reg for cs8900a's registry.
You may need to modify cs8900a.reg to meet your own configuration.
Please read the section "CS8900A.DLL Example for WinCE 5.x
Registry" below in this file.
11. Build the run-time image for downloading:
Click Build OS -> Build and Sysgen,
12. Optional. Just show you how to manually build the
CS8900A DLL driver, cs8900a.dll:
Click Build OS -> Open Release Directory.
From the command prompt,
cd \WinCE_Directory\Public\Common\Oak\Drivers\NetCard\CS8900A
build -c
The output cs8900a.dll will reside in
\WinCE_Directory\Platform\YourPlatform\target\YourCpuType\DebugOrRetail
======================================================================
=========== CS8900A.DLL Example for WinCE 5.x Registry ===========
======================================================================
This is the contents of cs8900a.reg.
;==== VNT GETCE5B Driver Registry =====
; @CESYSGEN IF COREDLL_FULL_CRT
IF BSP_CIRRUS_CS8900A
[HKEY_LOCAL_MACHINE\Comm\CS8900A]
"DisplayName"="CS8900A Ethernet Driver"
"Group"="NDIS"
"ImagePath"="cs8900a.dll"
[HKEY_LOCAL_MACHINE\Comm\CS8900A\Linkage]
"Route"=multi_sz:"CS8900A1"
[HKEY_LOCAL_MACHINE\Comm\CS8900A1]
"DisplayName"="CS8900A Ethernet Driver"
"Group"="NDIS"
"ImagePath"="cs8900a.dll"
[HKEY_LOCAL_MACHINE\Comm\CS8900A1\Parms]
; BusNumber=0 and BusType=1 are proper for ix86 ISA bus.
; Change the entries depend on your hardware.
; Do NOT delete BusNumber or BusType, otherwise ends4isa.dll won't be loaded.
"BusNumber"=dword:0
"BusType"=dword:1
;This assumes the adapter will use IRQ 10.
;On CEPC this will be SYSINTR_FIRMWARE + IRQ
"InterruptNumber"=dword:0a
"Sysintr"=dword:1a
; DuplexMode: 0:AutoDetect; 1:HalfDuplex; 2:FullDuplex.
"DuplexMode"=dword:1
; The Ethernet Physical Address. For example,
; Ethernet Address 00:24:20:10:bf:03 is MACAddress1=0024,
; MACAddress2=2010,and MACAddress3=bf03.
; MACAddress=0000:0000:0000 means to read it from EEPROM.
"MACAddress1"=dword:0000
"MACAddress2"=dword:0000
"MACAddress3"=dword:0000
[HKEY_LOCAL_MACHINE\Comm\CS8900A1\Parms\TcpIp]
"EnableDHCP"=dword:1
"DefaultGateway"=""
"UseZeroBroadcast"=dword:0
"IpAddress"=""
"Subnetmask"=""
"DNS"=""
"WINS"=""
ENDIF BSP_CIRRUS_CS8900A
; @CESYSGEN ENDIF
======================
= !!! Must Read !!! =
======================
InterruptNumber and Sysintr are new items in CE 5.0 registry for ISA devices.
These two items tell the CE kernel how to map the IRQ to the System Interrupt.
Usually, the mapping is Sysintr=InterruptNumber(IRQ) + SYSINTR_FIRMWARE(=16).
You must specify these two items correctly. Otherwise, the Ethernet interrupt
won't work.
e.g.
"InterruptNumber"=dword:0a
"Sysintr"=dword:1a
The CE kernel will map InterruptNumber 10 to System Interrupt 26.
The CS8900A driver itself will NOT read the InterruptNumber from Registry.
Instead, it reads IRQ from its own EEPROM. Therefore, InterruptNumber and Sysintr
in cs8900a.reg must match the interrupt value stored in CS8900A's EEPROM.
=================================================================================
============= Required Modifications for SH3 or SH4 ================
=================================================================================
The CS8900A WinCE driver supports only the IO mode. The SHx's address lines should be
connected to CS8900A in a special way to enable IO mode on CS8900A. Thus, the SHx's
address lines become CS8900A's IO port lines.
First, SHx_PROCESSOR must be defined in the sources file:
CDEFINES=$(CDEFINES) -DNDIS_MINIPORT_DRIVER -DSHx_PROCESSOR
Second, change the values of CS8900_INTERRUPT_REQUEST_PIN_NUM and
CS8900_IOPORT_MEM_ADDR in cshrd.h.
The CS8900A has four interrupt request output pins that can be connected directly
to Processor. Only one interrupt output pin is connected to SHx.
CS8900_INTERRUPT_PIN_NUM defines which interrupt pin is used.
0: INTRQ0
1: INTRQ1
2: INTRQ2
3: INTRQ3
#define CS8900_INTERRUPT_REQUEST_PIN_NUM 0 /* or other number: 0-3 */
For SHx, CS8900_IOPORT_MEM_ADDR is the physical memory address of the CS8900A IO
port according to your target board:
#define CS8900_IOPORT_MEM_ADDR 0x????????L
Third, an IRQ line must be assigned to the CS8900A Ethernet controller.
You may need to modify WinCE's kernel to hook up the Ethernet Interrupt to the
SHx processor. Please read WinCE's on-line help first to get some ISR ideas.
The following instructions will give you ideas how to modify the
WinCE kernel.
****** Note: Must Read!!!!!!!!!!! ********
The following description is based on CE 3.x. So, it just gives
you the ideas but not the exact way for CE 4.x and CE 5.x.
The following steps describes what to do to hookup IRQ2 to its service routine:
1) In OEMInit( ) function in platform\YourPlatform\kernel\HAL\cfwp2.c (or other files), add
{
// Set Priority 4 to Ether_ISR, but you can choose different
priority based on your platform.
HookInterrupt(4, Ether_ISR);
}
2) In OEMInterruptEnable/Disable/Done() functions in cfwp2.c, add
{
case SYSINTR_ETHER: /*It may not work for your processor. Please find out
wince SMDK2410 bsp
需积分: 3 92 浏览量
2009-05-20
19:11:34
上传
评论 1
收藏 1.74MB RAR 举报
adrian_bleu
- 粉丝: 7
- 资源: 1
最新资源
- 基于yolov5识别算法实现的DNF自动脚本源码.zip
- 基于Python实现的自动化办公项目.zip
- 基于python实现的基于PyQt5和爬虫的小说阅读系统.zip
- 机械设计整经机上纱自动化sw20非常好的设计图纸100%好用.zip
- Screenshot_20240427_031602.jpg
- 网页PDF_2024年04月26日 23-46-14_QQ浏览器网页保存_QQ浏览器转格式(6).docx
- 直接插入排序,冒泡排序,直接选择排序.zip
- 在排序2的基础上,再次对快排进行优化,其次增加快排非递归,归并排序,归并排序非递归版.zip
- 实现了7种排序算法.三种复杂度排序.三种nlogn复杂度排序(堆排序,归并排序,快速排序)一种线性复杂度的排序.zip
- 冒泡排序 直接选择排序 直接插入排序 随机快速排序 归并排序 堆排序.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈