Re: [问题] MIPS32 24kec 异常位址

楼主: bfc00000 (mips)   2018-10-23 10:39:19
找了一下 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
: 请问这是为什么?
: 谢谢大家

Links booklink

Contact Us: admin [ a t ] ucptt.com