收藏 分销(赏)

CodeWarrior-USBTAP调试U-Boot技巧.doc

上传人:仙人****88 文档编号:9448741 上传时间:2025-03-26 格式:DOC 页数:3 大小:23.50KB
下载 相关 举报
CodeWarrior-USBTAP调试U-Boot技巧.doc_第1页
第1页 / 共3页
CodeWarrior-USBTAP调试U-Boot技巧.doc_第2页
第2页 / 共3页
点击查看更多>>
资源描述
CodeWarrior+USBTAP调试U-Boot2010-07-15 15:55:50 分类: LINUX !# U-Boot 编译调试 ## 请参考Pro_&_Linux_App_Edition_Targeting_Manual.chm ./ltib ## install ltib $ ./ltib -p u-boot -m prep ## get U-Boot source $ cd rpm/BUILD/u-boot-1.1.3 $ vim config.mk DBGFLAGS = -g2 -gdwarf-2 AFLAGS_DEBUG = -Wa,-gdwarf2 OPTFLAGS = -O1 $ vim u-boot-1.1.3/lib_ppc/board.c ## line624: debug => printf debug ("Now running in RAM - U-Boot at: %08lx\n", dest_addr); => printf ("Now running in RAM - U-Boot at: %08lx\n", dest_addr); $ make ## 编译,最好用 ./ltib -p u-boot -m scbuild 注意: 用ltib 编译,要修改confing/platform/mpc8349itx/.config中CLFAGS参数 编译常用(make distclean ; make MPC8349ITX_config ; make ) 启动linux samba服务,将u-boot目录做共享目录由windows访问 在windows上访问uboot共享目录,打开后右键点击共享目录,映射为磁盘驱动器z 启动CodeWarrior IDE, @ IDE: File > Open , find and open ELF file: u-boot , click OK @ IDE: Choose Debugger : CodeWarrior USB TAP , click OK 按照提示选择添加缺少的文件start.S(前提是将源码完全复制),其余会自动添加,不能自动添加的,手动添加。 设置好断点,开发板上电。 加上跳线J22E,利用u-boot烧写u-boot.bin 到 fe700000 => erase 0xfe70000 0xfe74ffff => cp.b $loadaddr 0xfe700000 $filesize 完毕,重启,去掉J22E调试。或flash 烧写u-boot.bin到fe700000 (依据Pro_&_Linux_App_Edition_Targeting_Manual.chm) 上面利用u-boot烧写u-boot.bin到fe700000相当于下面的操作: 去掉J22 A,B,C,E,利用CodeWarrior烧写u-boot.bin到 0xfef0_0000 flash programmer加载配置文件liuby.xml,修改Flash Memory Base Address为fe80_0000 在Erase/Blank_chek窗口不要勾选 All Sectors,鼠标选取 fef00000 <-> fef4_ffff,擦除 在Program/Verify窗口选取u-boot.bin,修改Apply Address Offset: 0xfef00000,烧写。 完毕,插上J22 A,B,C,重启,调试。 调试分为3个阶段: Debugging U-Boot before the MMU is Enabled Debugging U-Boot after the MMU is Enabled Debugging the U-Boot Section in RAM 1. Debugging U-Boot before the MMU is Enabled 遵照<Pro*.chm>选择alternate load address: 0xfef0 0000 不选择Use Target Initialization File CW -> Debug -> Attach to Process ;break停止,F10单步运行 2. Debugging U-Boot after the MMU is Enabled 遵照<Pro*.chm>,不选择Alternate Load Addr: 不选择Use Target Initialization File CW -> Debug -> Attach to Process ;break停止,F10单步运行 board_init_f(board.c)函数入口处设置 hardware断点。 随记.
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传
相似文档                                   自信AI助手自信AI助手

当前位置:首页 > 教育专区 > 小学其他

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2025 宁波自信网络信息技术有限公司  版权所有

客服电话:4009-655-100  投诉/维权电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服