本文介绍了gcc --- __attribute __((interrupt(irq)))的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始使用arm的设备驱动程序...在每个处理程序中我都看到--- __attribute__((interrupt( irq )))-..我很困惑此属性如何调用我们的驱动程序.. ??

i started with device driver for arm ... there i saw for each handler mention --- __attribute__((interrupt( irq ))) -.I am confused how this attribute will place a call to our driver routine ..??

机械臂的IRQ具有以下向量地址-0x00000018(或0xFFFF0018)由于同一行上可以有许多中断处理程序.假设我们有4个设备驱动程序,每个驱动程序都有自己的IRQ.

IRQ of arm have following Vector address--- 0x00000018 (or 0xFFFF0018)As there can be many interrupt handler on same line. Suppose if we have 4 device driver each with its own IRQ to be reistered.

意味着GCC编译器将为IRQ处理程序&提供一些启动代码.编译器将在该中断处理程序的启动代码中调用例程.

Means some startup code will be provided by the GCC compiler for the IRQ handler & compiler will place call to our routine in that startup code for interrupt handler ..... Am i right ...?

推荐答案

来自 GCC文档用于中断属性:

您可以轻松地使用objdump来查看此属性如何更改二进制文件,这将为您更好地阐明情况.

You can use objdump easily to see how this attribute changes your binary which should clarify the situation for you much better.

这篇关于gcc --- __attribute __((interrupt(irq)))的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-12 19:06