贊助廠商

娛樂城推薦

首頁

刊登資訊

  • 刊登者:匿名
  • 時間:2021-06-01 19:50:07

尚未解答組合語言-開發uVision 5 - 8051 debugger

組合語言-開發uVision 5 - 8051 debugger

小弟最近在研究開發uVision5 - C51 debugger,
先前做了一些功課粗略知道應從Target driver-硬件調試器(AGDI)方向下手

參考連結
http://www.keil.com/appnotes/docs/apnt_145.asp

目前已經確定可以執行Flash DownLoad/ GetRegs 兩種行為。

=======================前言簡介結束,問題來了============================
開始進入Debug mode後,
依以前使用它家MCU的經驗都會顯示 ASM code在Disassembly視窗,
可是即便我能透過pF = (FLASHPARM *)pCbFunc(AG_CB_GETFLASHPARAM, NULL);
或其他手段取得Binary code,卻無從打印上去Disassembly視窗。

之前嘗試往以下四個方向著手
AG_READ => read memory
AG_WRITE =>write memory
AG_RDOPC =>read code memory(used for disassmbly)
AG_WROPC =>write code memory(use while loading a user program)
但找不出可以執行打印Disassembly視窗的關鍵處


附上片段程式碼希望能對了解問題有幫助
/*
* Read 'nMany' bytes out of the code space into buffer 'pB'
* return: 0:=Ok, else 'ErrorAddress | (amCODE << 24)'
*/

UL32 ReadCode (BYTE *pB, DWORD nAdr, DWORD nMany)
{
if (CacheValid (pB, nAdr, nMany)) // use cache, if possible
return (0);
else
memset (pB, 0, nMany); // for now, we return 0 bytes (NOP's)
}


請有經驗的前輩大大不吝給任何指點/方向/討論AGDI的地方

--

0個答案 組合語言-開發uVision 5 - 8051 debugger

其他問題

友站連結