eCos系统的VSR支持(VSR Support)
2014-02-15 20:30
288 查看
eCos系统为应用开发人员提供了抽象的中断处理机制,在这种抽象机制的帮助下,应用开发人员不需要知道特定硬件架构的中断机制就可以编写中断处理函数(ISR),但是这种机制会增加中断延迟,如果某个中断的实时性要求非常高,eCos可以提供替换掉这种机制直接处理中断从而最小化中断延迟的解决办法。
eCos官网:http://ecos.sourceware.org
eCos中文技术网:http://www.52ecos.net
eCos交流QQ群:144940146。
原文:http://ecos.sourceware.org/docs-latest/ref/kernel-interrupts.html
译文:/article/8120114.html
mingdu.zheng<at>gmail<dot>com
当产生中断时,硬件将跳转到一段被称作VSR的代码处执行,VSR也就是向量服务例程(Vector Service Routine)。默认情况下,VSR代码是由eCos系统提供的,通常使用汇编语言编写,但是某些架构也可以使用C语言实现VSR例程,这需要在作为VSR例程的C函数上添加interrupt属性。关于如何使用C语言实现VSR的更多内容可以查阅编译器文档。eCos系统的默认VSR将计算出哪个ISR函数应当处理当前产生的中断,然后创建一个适合该ISR函数执行的C运行时环境。
某些应用可能希望替换掉默认的VSR直接处理部分中断,这将最小化中断延迟,但是需要应用开发人员在更低的层次上进行编程。通常情况下,编写自定义VSR的最佳途径是拷贝一份eCos提供的现成的VSR代码,然后在这基础上进行适当地修改。cyg_interrupt_get_vsr函数可以用来获取指定中断向量的当前VSR,当自定义VSR不再需要时,可以恢复默认的VSR。cyg_interrupt_set_vsr函数可以用来安装替换默认VSR的自定义VSR,通常该函数的vsr参数对应于某个汇编源文件导出的符号。
When an interrupt occurs the hardware will transfer control to a piece of code known as the VSR, or Vector Service Routine. By default this code is provided by eCos. Usually it is written in assembler, but on some architectures it may be possible to implement
VSRs in C by specifying an interrupt attribute. Compiler documentation should be consulted for more information on this. The default eCos VSR will work out which ISR function should process the interrupt, and set up a C environment suitable for this ISR.
For some applications it may be desirable to replace the default eCos VSR and handle some interrupts directly. This minimizes interrupt latency, but it requires application developers to program at a lower level. Usually the best way to write a custom VSR
is to copy the existing one supplied by eCos and then make appropriate modifications. The function cyg_interrupt_get_vsr can be used to get hold of the current VSR for a given interrupt vector, allowing it to be restored if the custom VSR is no longer required.
cyg_interrupt_set_vsr can be used to install a replacement VSR. Usually the vsr argument will correspond to an exported label in an assembler source file.
eCos官网:http://ecos.sourceware.org
eCos中文技术网:http://www.52ecos.net
eCos交流QQ群:144940146。
原文:http://ecos.sourceware.org/docs-latest/ref/kernel-interrupts.html
译文:/article/8120114.html
mingdu.zheng<at>gmail<dot>com
当产生中断时,硬件将跳转到一段被称作VSR的代码处执行,VSR也就是向量服务例程(Vector Service Routine)。默认情况下,VSR代码是由eCos系统提供的,通常使用汇编语言编写,但是某些架构也可以使用C语言实现VSR例程,这需要在作为VSR例程的C函数上添加interrupt属性。关于如何使用C语言实现VSR的更多内容可以查阅编译器文档。eCos系统的默认VSR将计算出哪个ISR函数应当处理当前产生的中断,然后创建一个适合该ISR函数执行的C运行时环境。
某些应用可能希望替换掉默认的VSR直接处理部分中断,这将最小化中断延迟,但是需要应用开发人员在更低的层次上进行编程。通常情况下,编写自定义VSR的最佳途径是拷贝一份eCos提供的现成的VSR代码,然后在这基础上进行适当地修改。cyg_interrupt_get_vsr函数可以用来获取指定中断向量的当前VSR,当自定义VSR不再需要时,可以恢复默认的VSR。cyg_interrupt_set_vsr函数可以用来安装替换默认VSR的自定义VSR,通常该函数的vsr参数对应于某个汇编源文件导出的符号。
When an interrupt occurs the hardware will transfer control to a piece of code known as the VSR, or Vector Service Routine. By default this code is provided by eCos. Usually it is written in assembler, but on some architectures it may be possible to implement
VSRs in C by specifying an interrupt attribute. Compiler documentation should be consulted for more information on this. The default eCos VSR will work out which ISR function should process the interrupt, and set up a C environment suitable for this ISR.
For some applications it may be desirable to replace the default eCos VSR and handle some interrupts directly. This minimizes interrupt latency, but it requires application developers to program at a lower level. Usually the best way to write a custom VSR
is to copy the existing one supplied by eCos and then make appropriate modifications. The function cyg_interrupt_get_vsr can be used to get hold of the current VSR for a given interrupt vector, allowing it to be restored if the custom VSR is no longer required.
cyg_interrupt_set_vsr can be used to install a replacement VSR. Usually the vsr argument will correspond to an exported label in an assembler source file.
相关文章推荐
- eCos系统的VSR支持(VSR Support)
- Android Support Font 安卓系统支持字体(配图)
- 文件系统中写边界支持(Write Barrier Support)
- 解决谷歌为Android系统提供的支持库android-support-v4。jar不能绑定查看源码的问题
- Android百分比布局支持库介绍——com.android.support:percent
- 一个ACM在线提交系统,支持c#提交
- ubifs文件系统的制作过程&&遇到的问题及解决方案总结---之一“uboot中添加对UBIFS文件系统的支持”
- AIX 5L支持的5种文件系统:JFS,JFS2,NFS,CDRFS,UDFS
- 远程计算机需要网络级别身份验证,而您的计算机不支持该验证,请联系您的系统管理员或者技术人员来获得
- 【教程】从零制作文件系统到jz2440,使其支持telnet , ftp 和tftp
- 在virtualbox下的xp系统添加串口设备支持
- 可牛免费杀毒1.5beta2 全新自我保护支持64位系统
- 3.23andorid多语言支持--系统架构
- flash 10.1对android系统的支持等有关信息总结
- WEB视频聊天室/远程视频会议/远程教学系统/支持P2P
- 32位系统最大只能支持4GB内存之由来和相关的知识
- android 支持的系统级服务表
- 微软新系统还会支持vb6多久,是支持还是封杀?
- 支持万台服务器分布式监控系统原始手稿
- 基于codeigniter框架写的网站日志系统适配器(支持写入本地文件、数据库、远程服务器)