Re: [問題] MIPS32 24kec 異常位址

看板ASM (組合語言)作者 (mips)時間5年前 (2018/10/23 10:39), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/3 (看更多)
找了一下 datasheet 都沒提到 memory map.... MT7688_Datasheet_v1_4.pdf 從mtk7688管網找到 build bootcode的方法 連到 github下找 注意到:build的 bootcode是放在 TEXT_BASE=0xBC000000 cache address是在 9c000000, 住意不是 bfc00000, 代表在 bfc00000已經有 romcode了。 你可以用 ice讀 0xbc000000是不是你 flash內容, 以及 0xbfc00000 作反組譯 看能不能反出有意義的 text code. 附上 找 mtk7688的過程 mtk7688介紹: https://docs.labs.mediatek.com/resource/linkit-smart-7688/ en/tutorials/firmware-and-bootloader/bootloader-and-kernel-console Step 1 — Get bootloader source code Clone the UBOOT source from GitHub repository. 連到 github https://github.com/MediaTek-Labs/linkit-smart-7688-uboot 尋找:TEXT_BASE https://github.com/MediaTek-Labs/linkit-smart-7688-uboot/ search?q=TEXT_BASE&unscoped_q=TEXT_BASE .config TEXT_BASE=0xBC000000 config.mk CPPFLAGS := $(DBGFLAGS) $(OPTFLAGS) $(RELFLAGS) \ -D__KERNEL__ -DTEXT_BASE=$(TEXT_BASE) \ -I$(TOPDIR)/include \ LDFLAGS += -Bstatic -T $(LDSCRIPT) -Ttext $(TEXT_BASE) $(PLATFORM_LDFLAGS) Step 3 — Build and upload the modified bootloader Now build the bootloader and upload it to the board. ※ 引述《ice0803 (SoFarSoGood)》之銘言: : 目前在學習MIPS32 24Kec的cpu架構 : 使用 usbWiggler™ - Macraigor Systems LLC : 用 Ocd Commander程式透過 jtag上觀察cpu的register : 目前環境是 flash是完全清除下,也就是0xFFFFF.... : 照 MIPS的文件上說他會從 0xbfc00000開始讀指令 : https://www.dropbox.com/s/7x3hmo5qv1vrs1q/Exception%20Vectors.jpg?dl=0 : 但讀到0xffffffff之後,因為解不出來,所以產生exception : 理論上 PC應該是跳轉到0xbfc00380才對 : 但在 Ocd Commander 卻顯示0x9c000380 : https://www.dropbox.com/s/iv65dpmdo09g5q6/issue.jpg?dl=0 : 請問這是為什麼? : 謝謝大家 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 59.124.166.19 ※ 文章網址: https://www.ptt.cc/bbs/ASM/M.1540262365.A.42C.html
文章代碼(AID): #1RpedTGi (ASM)
討論串 (同標題文章)
本文引述了以下文章的的內容:
以下文章回應了本文
完整討論串 (本文為第 2 之 3 篇):
文章代碼(AID): #1RpedTGi (ASM)