实例介绍
对vitesse交换芯片工作的总结,主要包括vitesse的PHy芯片8664,8488,seraiLED驱动的移植及总结。ecosystem 应用程序示例。
while(1) deay=200+(rand0%50); / note: printf must be protected by acall to cyg_mutex_lock*/ cyg_mutex_lock(&cliblock) elek printf("Thread %d and now a delay of %d clock ticks\n", messag cyg_mutex_unlock(&cliblock) cyg_thread_delay(delay) 1:应用程序编译, flash分区 INSTALL_DR=/wan/ vitesse/ build/obj/ecos/ instal!/编译ecos之后生成的目录 include s(INSTALL_DIR)/include/pkgconf/ ecos. mak XCO S(ECOS_COMMAND_PREFIX)gcc XOXX S(XCC ⅩLD S(XCC OBJCOPY S(ECOS_COMMAND_PREFIX)objcopy CFLAGS IS(INSTALL DIR)/include CXXFLAGS S(CFLAGS LDFLAGS nostartfiles-LS(INSTALL_DIR)/lib-Ttarget Id all twothreads clean rm -f twothreads twothreads o twothreads; twothreads o S(XLD)S(LDFLAGS) S(ECOS GLOBAL_LDFLAGS)-OSQS@o S(OBJCOPY)-O srec $@ s@srec S(OBJCOPY)-0 binary $@ $@. bin GNU Make Utility basicc GNU Cross Compiler 1386-elf-gcc GNU Linker libtarget. a i386-elf-d basiclexe GNU Binutils 1386-elf-objcopy basiclsrec root@ loca Thost /wlan/vitesse/bui ldyobj/ecos/install/lib]511 ta22804 -rw-p--p root r。ot3626262013-10-0807:48 extras.o roat root 395332 2013-10-08 07: 48 ibextras a -rw-r--r--.1 root oot225711862013-10-0807:481 target r。atrt 132013-10-0807:48 target,ld -rw-r. root root 2013-10-08 48 vectors. o r。。t@ loca lhos n/vitesse/build/obj/ecos/install/lib]Scat target. ld OUTPUT FORMAT gaps gmp 1f32-littlemips) STARTUP (vectors.oa32) OUTPUT_ARCH(mips: i ENTRY(reset_vect。r) INPUT(extras.o GROUP (libtarget a libgcc. a libsupc++.a) MEMORY ram: ORIGIN=0x80040000, LENGTH=(0x08000000-0X40000 有上面的饿 makefile可以知道在编译 ecosystem应用程序的使用会将eos编译进 应用程序之后,ecos操作系统是以静态库的方式提供给应用程序使用的 开发板自带的分区信息如下 Flash Layout of WebsparX-III Name FLASH Addr Mem Addr Length Entry Point FisValid 0x00000000|0x000000000x00000000|0x00000000 RedBaot 0x400000000×400000000x000400000x00000000 conT 0x400400000x00000000|0x00040000|0x00000000 stackconf 0x4080000ox00000000|0x00100000|0x00000000 sys⊥og 0x401800000x00000000x000400000x0000000 managed 0x401c00000x800400000x00600000|0x80040BC managed. bk 0×407c00000x800400000X006000000×800400Bc F工 s directory0×40F400000×40F400000×000400000×0000 RedBoot config 「0×40F00004000000000 Redundant 0x40FC00000x40FC00000x000400000xo00000 3:7460系统自带命令接口 General Commands Help/?: Get help on a group ar a specific command Up Move one command level up Logout:ExcL工 Command Groups: System System settings and reset options 工P IP confi gur ation and Ping Port Port management MAC MAC address table Virtua Private securlty security management STP Spanning Tree Protoco l Link Aggregation Link Aggregation Control Protocol Link Layer Discovery Protocol LDPMED Link Layer Di scovery ProtocoI Media GreenEthernet: Power savings features POE Power Over Ethernet Ethernet synchronization EVC Ethernet virtual Connections EPS Ethernet Protection Switching MEP Maintainence enti ty End Point Quality of service Mirror Port mirror ing Config Load/save of configuration via TFTP Firmware Down load of firmware via TFtP UPnP Universal Plug and Play IEEE1588 Precision Time Protocol MVR Multicast VLAN Registration Voice VLAN specific VLAN for voice traffic ERPS Ethernet Ring Protection Switching Ethernet link OAM oop Protect Loop Protection LPMC MLD/IGMP Snoopin VLAN Control list Debug Switch debug faci ities Type'<group>to enter command group, e.g.port 系统信息 systemsver slon Version CEServices (standa lone) Version 3.20_BETA Bui ld 731712 Bui d Date 2013-02-11T11:35:06+01:00 Code revision 08450cef7de System> Configuration system contact system Name system Location MAC Address 00-01-c1-00-00-00 chip工D VSC7460 system Tme 970-01-01T00:00:40+00:00 system UptIme 00:00:40 Software Version: CEServices (standa lone) Version 3. 20_BETA Build 731712 Software date 2013-02-11T11:35:06+01:00 Previous Restart: cold System> 4:自编译SDK 编译时, build目录下面使用的连接脚本为: config. mk configs/ce_switch _ jrl_ref mk root( loca lhost /wlan/vitesse/bui ldIsT total 1036 -rw-r--r--.1 root root 722805 2013-10-08 07: 51 build_ecos_app.txt rw-r--r--,1 rootroot 180169 2013-10-08 07: 57 build redboot. txt lrwxrwxrwx, 1 root root 28 2013-10-09 13: 11 config.mk - configs/ce_switch jrl ref mk drwxr wxrwx,2274411240962013-05-0301:10 configs drwxr wxrwx 11240962013-05-0301:101ib drwxrwxrwx, 4 2744 11240962013-05-03 01: 10 make drwxrwxrwx.5274411240962013-05-0301:10redb wxrwxrwX 274411240962013-05-0301:1 drwxrwxrwx,2274411240962013-05-0301:23vtss_1ibs root@loca Thost /wlan/vitesse/bui ldIScd obj root@loca lhost /wlan/vitesse/bui ld/obj]sls CEServices CEServices, bin CEServices dat CEServices elf CEServices gz CEServi ces. txt [root@loca Thost /wlan/vitesse/bui ld/obj]SIs CEServices* CEServices bin CESer vices dat CEServices-elf CEServices gz CEServices txt Root@loca Thost /w lan/vitesse/bui ld/]$ 将上面的 ESErvices. gz下载到板子中,其启动的之后的界面如下: Platform: VCore-III (MIPS32 24KEC) JAGUAR RAM: 0x80000000-0x88000000_[Ox80021da8-0x87fb0000 avai lab le] FLASH: 0x40000000-0x4offffff. 64 x 0x40000 blocks Executing boot script in 3.000 seconds -enter Ac to abort RedBoot> lo -m ymodem -b 0x80040000-r starting ymodem transfer. Press ctr l+c to cancel Transferring ESErvices. gz 100%4688KB3KB/s00:19:45 o Errors Raw file loaded 0x80040000-0x80b1368f, assumed entry at 0x80040000 xyzModem-CRC mode, 37513(sOH)/O(STX)/O(CAN) packets, 5 retries RedBoot> go 0x800400bc press ENT ER to get started Username: admin Password e Ip em mpty and you must backup until entering e hep list tihe shows ailable options wo styles of he lp are provided Full help is avai lable when are ready to enter a command argument (e. g.' show )and describes each possible argument 2. Partial help is provided when an abbreviated argument is entered and you want to know what arguments match the input (e. g. show pr?.) 其帮助命令如下:以下的命令与自带的系统的命令差异较大,没有实用。 clear Reset functions onfi Enter confi guration mode copy Copy from source to destination g Debugging functions de lete De lete one file in flash: fi le system d Ir Directory of all files in flash: file system disable Turn off privi leged command To run exec commands in config mode dot1 IEEE Standard for port-based Network Access Control enab le Turn on privi leged commands Exit from EXEC mode firmware Firmware upgrade/swap Description of the interactive help system link-cam Link oAM configuration logout Exit from EXEC mode more Di sp lay fi Negate a command or set its defaults pIng Send IaMP echo messages ptP Enab le wireless mode for an inter face eload Re load system send Send a message to other tty lines show show running system information Set terminal line parameters 版本信息如下 t show version MEMORY Total=83670 KBytes, Free=61061 KBytes, Max=61060 KBytes 0x400000040fF 64 x 0x40000 blocks Address 00-01-c1-00-00-00 Previous Restart: cold system Contact: System Name System Location steMm T"me 1970-01-01T00:02:47+00:00 system uptime :00: 02: 47 Error: unable to lookup active image SID: 1 chipset VSC7460 Board Type Jaguar-1 CU24 Referenc Port count vitesse ESErvices switch software version: cEServices (standalone)dev-bui'ld by "oot@ loca lhost. localdomain 2013-10-09T13: 14: 21+08: 00 conf g: ce_switch-jrl_ref, mk Build Date 2013-10-09T13:14:21+08:00 Show命令如下: show aaa access access-list aggregation clock eps evc green-ethernet hi story interface lpc ipv6 acp line ink-oam logging loop-protect Hac mep mvR networ k-clock oe port-secur1 ty ptp pvlan gos radius-server rmon running-config snmp spanning-tree switchport tacacs-server terminal upnp users version vlan oI ce web 5:sdk代码入口 在文件Manc( eservices\vtss_appl\main)中其中的 cyg user_ start是ecos中的 main函数。即程序的入口代码。 void yg_user_start(void) }函数中是C74345dk代码的入口 同时在Ⅴ vitesse提供的SDK中,其代码使用层次结构话。 个人理解为:驱动是建立在 ecosystem操作系统之上,同时在 ecosysten系统之上 编写应用程序,提供用户使用的CMD。 Fiqure 2 Webstax overview Management CLI Web SNMP MarnagerrlenIL API Control Port MsTP… Packet VTSS API VTSS APL 6:VLAN配置及测试 61:系统及软件版本 System>Configuration System Contact System Name System Location MAC Address:00-01-c1-00-00-00 Chip iD VSC7460 System Time 1970-01-01T00:245:15+00:00 System Upti 00:45:15 Software Version CEServices(standalone) version 3. 20 BETA Build 731712 Software date:2013-02-11T11:35:06+01:00 Previous restart: Cold System> version Version CEServices(standalone) version 3. 20 BETA Build 731712 Build date:2013-02-11T11:35:06+01:00 Code Revision: 08450cef7de 62:系统默认an及ip配置 ########################################################## ## Port PVid Frame Type Ingress Filter Tx Tag Port Type Disabled Untag PVID Unaware 111111 Disabled Untag pvid Unaware Disabled Untag pvid Unaware Isable Untag pvid Unaware All Disabled Untag PVID Unaware Disabled Untag pvid Unaware VID VLAN Name Port 1 default 1-29 IP>confi Mode router van1:mtu=1500IPv4=1920.2.1/24 63:VLAN配置 并###并#并##########并####并###并##井##并###########并############ # 配置之后的VLAN VLAN>confi VLAN Configuration Port PVid Frame Type Ingress Filter Tx Tag Port Type AAA Disabled Untag PVId Unaware Disabled Untag PVID Unaware Disabled Untag PVId Unaware A Disabled Untag All Unaware gge d Disabled Tag all C-Port Tagged Disabled Tag al g C-Port All Disabled Untag PⅦ D Unaware Disabled Untag pvid Unaware All Disabled Untag PVID Unaware 10 1223331111111 All Disabled Untag pvid Unaware 11 All Disabled Untag Pvid Unaware Disabled Untag Pvid∪ aware 13 Disabled Untag PVID Unaware 14 All Disabled Untag Pvid Unaware 15 All Disabled Untag PVid Unaware 16 All Disabled Untag PVId Unaware 17 11111111 All Disabled Untag Pvid Unaware 18 All Disabled Untag PVId Unaware 19 All Disabled Untag pvid Unaware 201 All Disabled Untag PVid Unaware 21 Disabled Untag pvid Unaware 22 111 All Disabled Untag pvid Unaware 23 Disabled Untag PVID Unaware 【实例截图】
【核心代码】
标签:
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论