eCos系统的VSR支持(VSR Support)
来源:互联网 发布:mac免费软件下载网站 编辑:程序博客网 时间:2024/05/22 15:29
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
译文:http://blog.csdn.net/zoomdy/article/details/19250557
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.
原文见:http://blog.csdn.net/zoomdy/article/details/19250557
- eCos系统的VSR支持(VSR Support)
- eCos系统的VSR支持(VSR Support)
- VSR实验
- 下载ecos系统的源代码
- eCos 系统
- Oracle产品支持的三个策略(Premier Support,Extended Support,Sustaining Support)
- ecos 自带的Microwindows中加入mwin的支持
- 如何通过hg(水银)代码管理系统搭建完整的ecos源码平台
- Multiple APK Support(多种apk的支持)
- ubuntu 13.04 没有语言支持(language support)的解决方法
- NDK之CPLUSPLUS-SUPPORT(C++支持的android NDK)
- android 的 Testing Support Library 测试支持包(库)
- STM32 eCos 启动代码分析(一)系统复位
- LPC1768 eCos 启动代码分析(1)系统复位
- STM32 eCos 启动代码分析(三)系统时钟滴答
- matlab2015a支持的usb webcams support package
- android-support-percentlayout支持库的使用
- Android注解支持(Support Annotations)
- inux /dev/shm的用途
- 三四线城市移动互联网应用观察
- .NET多值绑定中的强类型集合和字典集合
- 二十八、在自我批判中进步(任总在GSM鉴定会后答谢词)
- C指针原理(94)-汇编基础(1)
- eCos系统的VSR支持(VSR Support)
- 二十七、不做昙花一现的英雄
- 文献标识码
- 二十五、全心全意对产品负责,全心全意为客户服务
- centos修改系统时间
- 在virtualBox中使用Centos如何自定义分辨率
- 二十四、华为的红旗到底能打多久
- 用一段哲理来鞭策自己
- 英文分享代码