⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stallion.txt

📁 《嵌入式系统设计与实例开发实验教材二源码》Linux内核移植与编译实验
💻 TXT
📖 第 1 页 / 共 2 页
字号:
   mark the boards as using level triggered interrupts. Do this by replacing   the "0" entry at field position 6 (the last field) in the board   configuration structure with a "1". (This is the structure that defines   the board type, I/O locations, etc. for each board). All boards that are   sharing an interrupt must be set this way, and each board should have the   same interrupt number specified here as well. Now build the module or   kernel as you would normally.2. When physically installing the boards into the system you must enter   the system EISA configuration utility. You will need to install the EISA   configuration files for *all* the EasyIO and EasyConnection 8/32 boards   that are sharing interrupts. The Stallion EasyIO and EasyConnection 8/32   EISA configuration files required are supplied by Stallion Technologies   on the EASY Utilities floppy diskette (usually supplied in the box with   the board when purchased. If not, you can pick it up from Stallion's FTP   site, ftp.stallion.com). You will need to edit the board resources to   choose level triggered interrupts, and make sure to set each board's   interrupt to the same IRQ number.You must complete both the above steps for this to work. When you rebootor load the driver your EasyIO and EasyConnection 8/32 boards will besharing interrupts.2.4 USING HIGH SHARED MEMORYThe EasyConnection 8/64-EI, ONboard and Stallion boards are capable ofusing shared memory addresses above the usual 640K - 1Mb range. The ONboardISA and the Stallion boards can be programmed to use memory addresses up to16Mb (the ISA bus addressing limit), and the EasyConnection 8/64-EI andONboard/E can be programmed for memory addresses up to 4Gb (the EISA busaddressing limit).The higher than 1Mb memory addresses are fully supported by this driver.Just enter the address as you normally would for a lower than 1Mb address(in the driver's board configuration structure).2.5 TROUBLE SHOOTINGIf a board is not found by the driver but is actually in the system then themost likely problem is that the I/O address is wrong. Change the module loadargument for the loadable module form. Or change it in the driver stallion.cor istallion.c configuration structure and rebuild the kernel or modules, orchange it on the board.On EasyIO and EasyConnection 8/32 boards the IRQ is software programmable, soif there is a conflict you may need to change the IRQ used for a board. Thereare no interrupts to worry about for ONboard, Brumby or EasyConnection 8/64(ISA, EISA and MCA) boards. The memory region on EasyConnection 8/64 andONboard boards is software programmable, but not on the Brumby boards.3. USING THE DRIVERS3.1 INTELLIGENT DRIVER OPERATIONThe intelligent boards also need to have their "firmware" code downloadedto them. This is done via a user level application supplied in the driverutility package called "stlload". Compile this program wherever you droppedthe package files, by typing "make". In its simplest form you can then type    ./stlload -i cdk.sysin this directory and that will download board 0 (assuming board 0 is anEasyConnection 8/64 or EasyConnection/RA board). To download to anONboard, Brumby or Stallion do:    ./stlload -i 2681.sysNormally you would want all boards to be downloaded as part of the standardsystem startup. To achieve this, add one of the lines above into the/etc/rc.d/rc.S or /etc/rc.d/rc.serial file. To download each board just addthe "-b <brd-number>" option to the line. You will need to download code forevery board. You should probably move the stlload program into a systemdirectory, such as /usr/sbin. Also, the default location of the cdk.sys imagefile in the stlload down-loader is /usr/lib/stallion. Create that directoryand put the cdk.sys and 2681.sys files in it. (It's a convenient place to putthem anyway). As an example your /etc/rc.d/rc.S file might have thefollowing lines added to it (if you had 3 boards):    /usr/sbin/stlload -b 0 -i /usr/lib/stallion/cdk.sys    /usr/sbin/stlload -b 1 -i /usr/lib/stallion/2681.sys    /usr/sbin/stlload -b 2 -i /usr/lib/stallion/2681.sysThe image files cdk.sys and 2681.sys are specific to the board types. Thecdk.sys will only function correctly on an EasyConnection 8/64 board. Similarlythe 2681.sys image fill only operate on ONboard, Brumby and Stallion boards.If you load the wrong image file into a board it will fail to start up, andof course the ports will not be operational!If you are using the modularized version of the driver you might want to putthe insmod calls in the startup script as well (before the download linesobviously).3.2 USING THE SERIAL PORTSOnce the driver is installed you will need to setup some device nodes toaccess the serial ports. The simplest method is to use the stallion utility"mkdevnods" script. It will automatically create device entries for Stallionboards. This will create the normal serial port devices as /dev/ttyE# where# is the port number starting from 0. A bank of 64 minor device numbers isallocated to each board, so the first port on the second board is port 64,etc. A set of callout type devices is also created. They are created as thedevices /dev/cue# where # is the same as for the ttyE devices.For the most part the Stallion driver tries to emulate the standard PC systemCOM ports and the standard Linux serial driver. The idea is that you shouldbe able to use Stallion board ports and COM ports interchangeably withoutmodifying anything but the device name. Anything that doesn't work like thatshould be considered a bug in this driver!If you look at the driver code you will notice that it is fairly closelybased on the Linux serial driver (linux/drivers/char/serial.c). This isintentional, obviously this is the easiest way to emulate its behavior!Since this driver tries to emulate the standard serial ports as much aspossible, most system utilities should work as they do for the standardCOM ports. Most importantly "stty" works as expected and "setserial" canalso be used (excepting the ability to auto-configure the I/O and IRQaddresses of boards). Higher baud rates are supported in the usual fashionthrough setserial or using the CBAUDEX extensions. Note that the EasyIO andEasyConnection (all types) support at least 57600 and 115200 baud. The newerEasyConnection XP modules and new EasyIO boards support 230400 and 460800baud as well. The older boards including ONboard and Brumby support amaximum baud rate of 38400.If you are unfamiliar with how to use serial ports, then get the Serial-HOWTOby Greg Hankins. It will explain everything you need to know!4. NOTESYou can use both drivers at once if you have a mix of board types installedin a system. However to do this you will need to change the major numbersused by one of the drivers. Currently both drivers use major numbers 24, 25and 28 for their devices. Change one driver to use some other major numbers,and then modify the mkdevnods script to make device nodes based on those newmajor numbers. For example, you could change the istallion.c driver to usemajor numbers 60, 61 and 62. You will also need to create device nodes withdifferent names for the ports, for example ttyF# and cuf#.The original Stallion board is no longer supported by Stallion Technologies.Although it is known to work with the istallion driver.Finding a free physical memory address range can be a problem. The olderboards like the Stallion and ONboard need large areas (64K or even 128K), sothey can be very difficult to get into a system. If you have 16 Mb of RAMthen you have no choice but to put them somewhere in the 640K -> 1Mb range.ONboards require 64K, so typically 0xd0000 is good, or 0xe0000 on somesystems. If you have an original Stallion board, "V4.0" or Rev.O, then youneed a 64K memory address space, so again 0xd0000 and 0xe0000 are good.Older Stallion boards are a much bigger problem. They need 128K of addressspace and must be on a 128K boundary. If you don't have a VGA card then0xc0000 might be usable - there is really no other place you can put thembelow 1Mb.Both the ONboard and old Stallion boards can use higher memory addresses aswell, but you must have less than 16Mb of RAM to be able to use them. Usualhigh memory addresses used include 0xec0000 and 0xf00000.The Brumby boards only require 16Kb of address space, so you can usuallysqueeze them in somewhere. Common addresses are 0xc8000, 0xcc000, or inthe 0xd0000 range. EasyConnection 8/64 boards are even better, they onlyrequire 4Kb of address space, again usually 0xc8000, 0xcc000 or 0xd0000are good.If you are using an EasyConnection 8/64-EI or ONboard/E then usually the0xd0000 or 0xe0000 ranges are the best options below 1Mb. If neither ofthem can be used then the high memory support to use the really high addressranges is the best option. Typically the 2Gb range is convenient for them,and gets them well out of the way.The ports of the EasyIO-8M board do not have DCD or DTR signals. So theseports cannot be used as real modem devices. Generally, when using theseports you should only use the cueX devices.The driver utility package contains a couple of very useful programs. One is a serial port statistics collection and display program - very handyfor solving serial port problems. The other is an extended option settingprogram that works with the intelligent boards.5. DISCLAIMERThe information contained in this document is believed to be accurate andreliable. However, no responsibility is assumed by Stallion TechnologiesPty. Ltd. for its use, nor any infringements of patents or other rightsof third parties resulting from its use. Stallion Technologies reservesthe right to modify the design of its products and will endeavour to changethe information in manuals and accompanying documentation accordingly.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -