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


Browsing this Thread:   1 Anonymous Users




(1) 2 »


Re: 無法進入除錯模式
#11
版主
版主


查看用戶資訊
PIC18F 的堆疊已在 LKR 檔定義了,C30 會由 LINKER 產生位址但要自行寫入道W15及SPLIM

組合語言都要,C 會自行處理。

定義 CPU 是使用 dsPIC30F4011

發表於: 2006/9/1 10:49
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 無法進入除錯模式
#10
資深會員
資深會員


查看用戶資訊
謝謝
正常了
為何dsPIC需要初始化這個堆疊指標啊?
PIC18都不需要管這個

只要有使用呼叫就需要加這幾行嗎
不論哪一顆dsPIC都要這樣?

另外請問一下
.equ __30F4011, 1
這一行的意義是什麼?

發表於: 2006/9/1 8:43
木亟缶夬金戔
彳艮缶夬金戔
走召缶夬金戔
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 無法進入除錯模式
#9
版主
版主


查看用戶資訊
主要問題: 你忘了設定堆疊指標,修改後得成式如下:

.equ __30F40111
          
.INCLUDE "P30F4011.INC"

;設定變數位址
      
.section bss
TMP
:          .SPACE 2                  ;保留2個位元組
DLY_CNT1
:     .SPACE 2


;COUNTER:      .space 2
;TEMP:         .space 2

;定義全區標籤
          
.GLOBAL  __reset              ;.GLD 連結檔內定程式開頭名稱
;定義全區變數 => 為了在WATCH中能看到數值方便除錯
          
.GLOBAL TMP
;程式碼起點
          
.TEXT
__reset
:
        
MOV #__SP_init, W15       ;Initalize the Stack Pointer
        
MOV #__SPLIM_init, W0     ;Initialize the Stack Pointer Limit Register
        
MOV W0SPLIM

         CLR    TRISB

         MOV    
#0B0000000000000000,W0
         
MOV    W0,ADCON1
         MOV    
#0B0000000000000001,W0
         
MOV    W0,TMP
loop
:
         
RLNC   TMP
         MOV    TMP
,W0
         MOV    W0
,PORTB
         CALL  DELAY             
;呼叫時間延遲
         BRA    loop

DELAY
:
   
MOV  #3 , W0
   
DO  W0 ,  AZA
      NOP
AZA
:  NOP
      
RETURN


      .
END

發表於: 2006/8/31 18:12
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 無法進入除錯模式
#8
版主
版主


查看用戶資訊
可以的,傳過來吧! richard.yang@microchip.com

發表於: 2006/8/31 16:05
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 無法進入除錯模式
#7
資深會員
資深會員


查看用戶資訊
我用的是7.41版
剛剛換到另一台電腦
他用的是7.40版
一樣情形

去網站下載你說的修正檔
結果MPLAB不給下載到ICD2 出現錯誤訊息
所以目前還是不知道怎麼回事 ╮( ̄▽ ̄")╭

要我把整個專案程式子目錄都打包寄給你試試嗎?
總檔案25KB
dsPIC30F4011是從你給我的APP009板子上挖下來的...

發表於: 2006/8/31 10:40
木亟缶夬金戔
彳艮缶夬金戔
走召缶夬金戔
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 無法進入除錯模式
#6
版主
版主


查看用戶資訊
如果你是使用MPLAB IDE v7.40 的話,就需要加入一個 de30f_RevB.hex 放在 C:\Program Files\Microchip\MPLAB IDE\ICD2 的目錄下。
你可以在這裡下載到此修正檔:
MPLAB ICD2 Firmware update for dsPIC30f devices (for MPLAB IDE v7.40 only

發表於: 2006/8/31 9:48
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 無法進入除錯模式
#5
資深會員
資深會員


查看用戶資訊
嗯...
兩顆正常的ICD2使用起來都是相同的情形
軔體也更新好幾次了 (手動自動都有)
昨天去上課時順便買了一顆
等收到那一顆再試試

MPLAB系統出問題?!
那換一台電腦試試看好了
謝囉...

發表於: 2006/8/31 8:33
木亟缶夬金戔
彳艮缶夬金戔
走召缶夬金戔
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 無法進入除錯模式
#4
版主
版主


查看用戶資訊
ICD2 的 Firmware 更新ㄧ下,也有可能是 MPLAB IDE 系統出了問題,如真的無法解決 ICD2 寄回 Microchip Taipei 給我換新的給你。

發表於: 2006/8/30 15:42
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 無法進入除錯模式
#3
資深會員
資深會員


查看用戶資訊
我目前遇到的問題是
按F9執行時都正常
按F7單步執行時
只要沒碰到 return 指令就都正常
一執行過 return 後就發生錯誤
所以應該跟以上幾點沒關係...

發表於: 2006/8/28 17:52
木亟缶夬金戔
彳艮缶夬金戔
走召缶夬金戔
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 無法進入除錯模式
#2
版主
版主


查看用戶資訊
有人整理過此類的問題: 換電阻的是使用30F2011,30F4011不用。

1. ICD2 is selected as programmer not as debugger.
2. The target application has somehow become corrupted or contains errors. For example, the regular linker script was used in the project instead of the ICD2 version of the linker script (e.g., 18F8722.lkr was used instead of 18F8722i.lkr). Try rebuilding and reprogramming the target application. Then initiate a power-on-reset of the target.
3. Other configuration settings are interfering with debugging. Any configuration setting that would prevent the target from executing code will also prevent the ICD from putting the code into debug mode. This is to say WDT should be disabled while you want to debug your application. Some of our PICmicro 4. 16 Bit MCU requires to be enabled the debug mode using configuration register settings.
5. ICD 2 cannot always perform the action requested. For example, the ICD cannot set a breakpoint if the target application is currently running.
6. The oscillator is not working. Check your configuration bits setting for the oscillator as per your application hardware.
7. It is possible that target board does not allow ICD2 to enter in the debug mode. i.e. Target board is accidentally damaged.
8. The ICD2 has somehow become physically disconnected from the target board. Check the communications cable connection.
9. ICD2 to PC communications has somehow been interrupted. Reconnect to the ICD2 in MPLAB IDE.
10. It may be possible that the error shows only once due to some unknown reasons. Try to use ICD2 as debugger again.
11. The target board is not powered. Check the power cable connection.
12. The device is code-protected. Check your configuration bits setting for code protection.
13. The ICD2 has somehow become physically disconnected from the PC. Check the USB or COM communication cable connection.

發表於: 2006/8/28 16:11
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... ]

教育訓練中心

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