惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
Stack Overflow Blog
Stack Overflow Blog
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
T
The Blog of Author Tim Ferriss
博客园 - 叶小钗
N
Netflix TechBlog - Medium
腾讯CDC
C
Check Point Blog
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
S
SegmentFault 最新的问题
F
Fortinet All Blogs
美团技术团队
U
Unit 42
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 司徒正美
F
Full Disclosure
Recorded Future
Recorded Future
D
DataBreaches.Net
博客园 - 【当耐特】
Martin Fowler
Martin Fowler
J
Java Code Geeks
I
InfoQ
Y
Y Combinator Blog
A
About on SuperTechFans
AI
AI
爱范儿
爱范儿
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Forbes - Security
Forbes - Security
W
WeLiveSecurity
M
MIT News - Artificial intelligence
雷峰网
雷峰网
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
Schneier on Security
Schneier on Security
The GitHub Blog
The GitHub Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
aimingoo的专栏
aimingoo的专栏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
Latest news
Latest news
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
D
Docker
Recent Commits to openclaw:main
Recent Commits to openclaw:main
量子位
V2EX - 技术
V2EX - 技术
Project Zero
Project Zero

博客园 - midhillzhou

windows 11关闭防火墙 以使得 外部的开发板可以主动发起ping通电脑 uboot中调试景略以太网phy JL3111A2-NA windows上excel运行macro之后出现错误 在linux上移植sgdisk 在linux上移植phytool + 调试tja1103 以太网phy 使用gdb调试user程序 之 某个线程的调用栈 在uboot中修改tja 1103以太网phy from slave to master porting perf性能观测工具 porting 开源memtester uboot 2020版本下gpio命令的使用 + linux下的libgpiod lib库的移植使用 ubi文件系统的 制作 + 挂载 + 若干问题 i2c指令使用 + 仿照开源i2ctransfer实现的自己的i2ctransfer windows下outlook 撤回邮件 安装repo uboot中各种memory读写命令 uboot nand flash dump 环境变量 + 制作环境变量分区 + 代码结构详解 uboot bootm代码详解图 Beyond Compare 进行二进制文档的比对时,怎么去对齐(转载) notepad++分析log小技巧 使用继电器控制开发板上下电 uboot debug小技巧
使用lauterbach debug uboot之重定位
midhillzhou · 2025-06-03 · via 博客园 - midhillzhou

1.首先运行cmm脚本,attach cpu,让cpu停在romcode阶段

当运行完cmm脚本后,观察下右下角lauterbach的状态栏变化,最终状态是stopped。

power down -> Running -> stopped

cmm脚本内容如下

 1 RESet
 2 SYStem.RESET
 3 SYStem.config SWDP ON
 4 SYStem.CPU CortexA7MPCORE
 5 SYStem.CONFIG CoreNumber 4.
 6 system.resetout
 7 CORE.NUMber 4.
 8 
 9 SYStem.CONFIG DEBUGACCESSPORT 0.
10 SYStem.CONFIG APBACCESSPORT 0.
11 SYStem.CONFIG MEMORYACCESSPORT 1.
12 SYStem.CONFIG AXIACCESSPORT 1.
13 
14 SYStem.CONFIG COREDEBUG Base DAP:0x80030000 DAP:0x80032000 ;DAP:0x80014000 DAP:0x80710000
15 SYStem.CONFIG BMC       Base DAP:0x80031000 DAP:0x80033000 ;DAP:0x80630000 DAP:0x80730000
16 
17 SYStem.JtagClock 2MHz
18 
19 SYStem.CONFIG.DEBUGPORTTYPE SWD
20 
21 SYStem.Mode Attach
22 break
23 
24 ENDDO

2.加载spl elf,完成ddr的初始化

2.1可以选中文件直接拖进来,也可以输入以下命令。

Data.LOAD.Elf Y:\sdk\SDK_2024\boot\bl1\spl\spl.elf

2.2 设置断点到uboot的第一条指令

从代码里面可以看到spl跳到uboot执行的地址是 0x50000400

2.3 点击go,完成ddr的初始化

 3. 加载uboot.bin到ddr地址0x50000400

Data.LOAD.Binary Y:\sdk\SDK_2024\boot\uboot\u-boot-2020.04\u-boot.bin 0x50000400

并加载对应的elf文件到lauterbach

Data.LOAD Y:\sdk\SDK_2024\boot\uboot\u-boot-2020.04\u-boot /nocode

4.做源代码路径转换

sYmbol.SourcePATH.Translate "/home/zhongshan" "Y:\"

我是把虚拟机ubuntu里面的/home/zhongshan通过samba服务器映射为windows上的Y盘

5.设置断点并查看reloc_off值

5.1 setup_reloc

5.2 点击go

5.3 查看reloc_off值

 6.用offset重新加载对应的elf文件到lauterbach

Data.LOAD Y:\sdk\SDK_2024\boot\uboot\u-boot-2020.04\u-boot 0x2ff09c00 /nocode

7.在重定位后的board_init_r打断点(一定要删除重定位前打的断点,不然会出现错误)

 点击go,观察串口输出

8.在启动linux kernel的do_bootm_states打断点

打完断点后,点击go,查看串口log

注1:参考网上的两个图片