[問題] IAR 如何何設置 alias

看板C_and_CPP (C/C++)作者 (eleghost)時間11年前 (2014/09/01 18:58), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
開發平台(Platform): (Ex: VC++, GCC, Linux, ...) ARM-Cortex M4 MCU 問題(Question): 目前更換新的MCU, 所以之前寫的code需要重新porting. 在porting到下面function總會遇到錯誤. 之前使用 GNU GCC, 現在使用IAR 有問題語法: #1 #define ALIAS(f) __attribute__((weak, alias (#f))) #2 void TIMER0_IRQHandler(void) ALIAS(IntDefaultHandler); 遇到錯誤: Error[Pe130]: expected a "{" //錯誤行數 #2 感覺是compiler誤會了, 以為ALIAS(..) 為 TIMER0_IRQHandler(void) 的函式內容, 所以預期會有 "{". 請問有人知道該怎樣在IAR下使用 function alias attribute嗎? 謝謝. -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 223.138.242.49 ※ 文章網址: http://www.ptt.cc/bbs/C_and_CPP/M.1409569133.A.1E4.html
文章代碼(AID): #1K155j7a (C_and_CPP)
文章代碼(AID): #1K155j7a (C_and_CPP)