用IDE调试u-boot/kernel

本文介绍如何在Eclipse环境下搭建调试环境来调试U-Boot和Kernel。通过详细步骤指导读者从新建工程到设置交叉编译器路径,再到建立编译目标,最终实现代码的高效编译和调试。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

   回忆当年,调试TI OMAP3平台,总是在linux下利用命令调试uboot/kernel,编译不方便且不说,关键是代码浏览极不方便,耗时,考验耐性。如今即将面临调试TI OMAP4平台,实在是没办法不尝尝IDE调试u-boot/kernel了。
果断地道去下载eclipse for c/c++包,解压....
不用解释eclipse是甚,大家都懂的...
1.新建工程:File->New->Project...
2.选择Makefie Project With Eixst Code ,


3.Next后填写Project Name,浏览选择代码路径,注意Project Name要与代码目录名字一样。


4.果断地点finish完成。然后设置交叉编译器路径,此步骤很关键。现在工程属性,加入环境变量,

由环境变量指定编译器路径


5.设置完编译器路径后,建立一个编译target,即指定编译的平台配置文件。

Project->Make Target ->Create


注意在“Build command:”中加入编译的特定命令,如果使用默认的make则无需修改此处。

6.完成,可以点Build Project编译代码,也可以点Make Target ,选择rebuild 。现在还不明确两者区别,

待继续观察。



ERROR: device-tree-xilinx-v2020.2+gitAUTOINC+f725aaecff-r0 do_compile: Error executing a python function in exec_python_func() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_python_func() autogenerated', lineno: 2, function: <module> 0001: *** 0002:devicetree_do_compile(d) 0003: File: '/home/ljj/petalinux/csl_zynqsys_1/components/yocto/layers/core/meta/classes/devicetree.bbclass', lineno: 131, function: devicetree_do_compile 0127: if not(os.path.isfile(dtspath)) or not(dts.endswith(".dts") or devicetree_source_is_overlay(dtspath)): 0128: continue # skip non-.dts files and non-overlay files 0129: except: 0130: continue # skip if can't determine if overlay *** 0131: devicetree_compile(dtspath, includes, d) 0132:} 0133: 0134:devicetree_do_install() { 0135: for DTB_FILE in `ls *.dtb *.dtbo`; do File: '/home/ljj/petalinux/csl_zynqsys_1/components/yocto/layers/core/meta/classes/devicetree.bbclass', lineno: 119, function: devicetree_compile 0115: dtcargs += ["-i", i] 0116: dtcargs += ["-o", "{0}.{1}".format(dtname, "dtbo" if isoverlay else "dtb")] 0117: dtcargs += ["-I", "dts", "-O", "dtb", "{0}.pp".format(dts)] 0118: bb.note("Running {0}".format(" ".join(dtcargs))) *** 0119: subprocess.run(dtcargs, check = True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) 0120: 0121:python devicetree_do_compile() { 0122: includes = expand_includes("DT_INCLUDE", d) 0123: listpath = d.getVar("DT_FILES_PATH") File: '/opt/pkg/petalinux/2020.2/components/yocto/buildtools/sysroots/x86_64-petalinux-linux/usr/lib/python3.7/subprocess.py', lineno: 512, function: run 0508: raise 0509: retcode = process.poll() 0510: if check and retcode: 0511: raise CalledProcessError(retcode, process.args, *** 0512: output=stdout, stderr=stderr) 0513: return CompletedProcess(process.args, retcode, stdout, stderr) 0514: 0515: 0516:def list2cmdline(seq): Exception: subprocess.CalledProcessError: Command '['dtc', '-@', '-p', '0x1000', '-i', '/home/ljj/petalinux/csl_zynqsys_1/build/tmp/work-shared/zynq-generic/kernel-source/arch/arm/boot/dts', '-i', '/home/ljj/petalinux/csl_zynqsys_1/build/tmp/work-shared/zynq-generic/kernel-source/scripts/dtc/include-prefixes', '-i', '/home/ljj/petalinux/csl_zynqsys_1/project-spec/configs/../../components/plnx_workspace/device-tree/device-tree', '-i', '/home/ljj/petalinux/csl_zynqsys_1/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2020.2+gitAUTOINC+f725aaecff-r0', '-o', 'system-top.dtb', '-I', 'dts', '-O', 'dtb', 'system-top.dts.pp']' returned non-zero exit status 1. Subprocess output: Error: /home/ljj/petalinux/csl_zynqsys_1/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2020.2+gitAUTOINC+f725aaecff-r0/system-user.dtsi:7.2-8 syntax error FATAL ERROR: Unable to parse input tree ERROR: Logfile of failure stored in: /home/ljj/petalinux/csl_zynqsys_1/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2020.2+gitAUTOINC+f725aaecff-r0/temp/log.do_compile.76229 ERROR: Task (/home/ljj/petalinux/csl_zynqsys_1/components/yocto/layers/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb:do_compile) failed with exit code '1'
最新发布
03-22
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值