2012-04-17 72 views
1

我試圖用我的代替一些CS3中斷處理程序。 下面的 「中斷服務程序的stellaris_blizzard」 文件CodeSourcery CS3中斷處理程序覆蓋

#if defined (L_stellaris_blizzard_isr_interrupt) 
    .globl __cs3_isr_interrupt 
    .type __cs3_isr_interrupt, %function 
__cs3_isr_interrupt: 
    b . 
    .size __cs3_isr_interrupt, . - __cs3_isr_interrupt 

    .weak __cs3_isr_reserved_7 
    .globl __cs3_isr_reserved_7 
    .set __cs3_isr_reserved_7, __cs3_isr_interrupt 
    ... 
    .weak __cs3_isr_GPIOM 
    .globl __cs3_isr_GPIOM 
    .set __cs3_isr_GPIOM, __cs3_isr_interrupt 
    ... 
#endif /* interrupt */ 
... 

#if defined (L_stellaris_blizzard_isr_systick) 
    .globl __cs3_isr_systick 
    .type __cs3_isr_systick, %function 
__cs3_isr_systick: 
    b . 
    .size __cs3_isr_systick, . - __cs3_isr_systick 

#endif /* systick */ 

我的處理程序的一部分

extern "C" void __cs3_isr_systick() { ... } 
extern "C" void __cs3_isr_GPIOM() { ... } 

系統定時器中斷效果很好。但是當發生端口M的GPIO中斷時,默認調用「__cs3_isr_interrupt」。 我怎樣才能取代GPIO中斷處理程序?

回答

0

看起來很喜歡__cs3_isr_GPIOM是__cs3_isr_interrupt的弱別名。如果你已經將自己的版本定義爲非弱,那麼應該沒有問題。

您應該檢查目標文件是否具有您期望的正確弱/非弱類型(使用nm)。

如果這樣不能解決問題,那麼你有一個鏈接器的問題,這些都很難弄清楚。這可能是一個排序問題,或者只是一個錯誤的地方。