[toc]
-m 显示添加目标架构
- 通常,objdump会自己识别目标架构;如果没有识别出来可以自行添加架构
file命令查看.O文件的架构信息
- 查看后指定目标架构既可
objdump -i 输出所支持的架构
- 用于选择-m 的参数要输入什么
交叉编译的使用
- 由于主机的objdump架构与编译目标的架构不同;
- 需要使用特定的objdump;
- 例如armv7m要使用arm-none-eabi-objdump
文章作者: Liya Huang
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 wdfk-prog的个人博客!
相关推荐
2025-10-03
U-BOOT CLANGD使用 + 避坑注意事项
[toc] 步骤1 参考如下教程操作;安装clangd + bear https://blog.csdn.net/oushaojun2/article/details/129877412 步骤2 使用方式,看版本 bear make 或者 bear – make 注意事项 出现 Unknown argument: ‘-mword-relocations’ 根目录新建.clangd文件,写入Remove的选项 1234CompileFlags: # Tweak the parse settings Add: [-xc++, -Wall] # treat all files as C++, enable more warnings Remove: -W* # strip all other warning-related flags Compiler: clang++ # Change argv[0] of compi...
2025-10-03
ubantu st-link 调试
@[toc] Linux如何安装/卸载.deb文件 https://blog.csdn.net/vuipp/article/details/126031945 安装.deb 只要输入“sudo dpkg -i 文件名”就可以了 Ubuntu中gcc-arm-none-eabi的安装 https://blog.csdn.net/qq_20016593/article/details/125343260 手动安装(推荐)(1)官网下载:https://developer.arm.com/downloads/-/gnu-rm 1234567pushd .tar -jxf gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2sudo mv gcc-arm-none-eabi-6-2017-q2-update /optexportline="export PATH=/opt/gcc-arm-none-eabi-6-2017-q2-update/bin:\$PATH"if grep -Fxq "$...
2025-10-03
uboot 调试
@[toc] 成功debug https://blog.csdn.net/qq_39665253/article/details/145641929 u-boot 配置 https://docs.u-boot.org/en/latest/develop/gdb.html 123CONFIG_CC_OPTIMIZE_FOR_DEBUG=yCONFIG_LTO=n CONFIG_LOG_MAX_LEVEL=9 重新编译.得到u-boot的elf文件(不带后缀就是),可以使用file u-boot确认 ST-LINK debug失败12345678910111213141516171819202122232425262728293031{ "version": "0.2.0", "configurations": [ { "name": "Stlink-Debug", "cwd...
2025-10-03
向u-boot提交补丁的流程
@[toc] 首先需要订阅一下,地址在此https://lists.denx.de/listinfo/u-boot,使邮箱地址对应有一个成员名称,才能向uboot社区发送补丁,否则会收到Post by non-member to a members-only list2. 注册完毕即可发送补丁,发送完之后即可在https://patchwork.ozlabs.org/project/uboot/list/看到了(首次贡献的话发送完补丁后需要等待至少12个小时才会将发送的补丁显示在patchwork上)。 观看如下文档的步骤使用patman工具 https://docs.u-boot.org/en/latest/develop/sending_patches.html pip install patch-manager git config sendemail.aliasesfile doc/git-mailrc 使用git config --list | grep sendemail检查是否生效 patman send -n试运行,并不会真的发出去...
2025-10-03
UBOOT 早期串口调试功能CONFIG_DEBUG_UART适配教程
@[toc] https://github.com/wdfk-prog/u-boot/tree/art-pi-debug 前提条件 该思路使用与STM32系列,其他芯片系列仅做参考 Kconfi配置 开启如下配置 其中CONFIG_DEBUG_UART_BASE是串口的寄存器地址.地址看手册就行,找不到也基本不用看了. CONFIG_DEBUG_UART_CLOCK是串口所在时钟的频率. 需要注意该频率是没有初始化时钟源,默认采用HSI,分频与倍频都是1时的时钟频率 可以使用CUBEMX辅助计算 1234CONFIG_DEBUG_UART_BOARD_INIT=yCONFIG_DEBUG_UART=yCONFIG_DEBUG_UART_BASE=0x40004c00CONFIG_DEBUG_UART_CLOCK=64000000 编写makefile 参考board/st/stm32mp1/debug_uart.c和makefile的实现编写 找到所在的板子的路径 我这里使用的是board/st/stm32h750-art-pi 添加makefile,把de...
2025-10-03
U-BOOT 配置按钮功能及使用教程
@[toc] https://github.com/wdfk-prog/u-boot/tree/art-pi-debug Kconfig配置 添加如下配置,使用按键驱动与按键绑定命令功能与按键命令识别 12345CONFIG_BUTTON_CMD=yCONFIG_CMD_BUTTON=yCONFIG_BUTTON=yCONFIG_BUTTON_GPIO=yCONFIG_CMD_BOOTMENU=y 添加env环境变量 路径参考:board/st/stm32h750-art-pi/stm32h750-art-pi.env 这里的button_cmd_0=后面是需要支持的cmd命令,必须要可以使用的 这里使用bootmenu体现 1234567891011button_cmd_0_name=Userbutton_cmd_0=bootmenubootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenubootmenu_1=fastboot=echo S...
评论
公告
欢迎光临!有任何问题或想法,欢迎在文章下留言交流,或者通过 关于页面 联系我。