• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
:::


Browsing this Thread:   1 Anonymous Users






Re: 請問關於LKR檔裡面的gprX
#2
版主
版主


查看用戶資訊
1. 是不是在中斷函式裡有用到加、減、乘、除 的計算功能,因為這些功能會與主程式的計算共用同一RAM, 所以進入中斷時要將其保留: See C18 User's Guide (2.9.2.4 ISR CONTEXT SAVING)

If an interrupt service routine calls another function, the normal functions' temporary
data section (which is named .tmpdata) should be saved using a
save=section(".tmpdata") qualifier on the interrupt pragma command. For
example:
#pragma interrupt high_interrupt_service_routine save=section(".tmpdata")

2. Local Variable 不一定放在 Stack 裡,也有可能放在沒有用到的 RAM 裡,這要看你在 compiler 時的選擇,

Project-->project-->MPLAB C18 --> Default Storage Class 中設定要 Stack or overlay

發表於: 2005/7/15 17:07
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


請問關於LKR檔裡面的gprX
#1
高級會員
高級會員


查看用戶資訊
原本灌完C18 18F6520的LKR檔裡面有gpr0~7
我因為程式需要把2~6改成我要的名字
因為程式有時候在run了4~5天會掛掉
一直找不到原因~~
像gpr7是放stack的東西~gpr1是放共用變數的地方
不知道其他是否有什麼特別的東西,導致我的程式會在4~5天就當掉,希望知道的大大可以幫忙解決
謝謝~~辛苦了
對了~還有用c定義的區域變數會放在stack裡面對吧
用debugger模式看是這樣
還是我的觀念錯了咧


發表於: 2005/7/11 17:45
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------