简体   繁体   English

pic30 / xc16的objcopy-哪里可以找到,类似物

[英]objcopy for pic30/xc16 - where to find, analogs

I am working with a non-standalone project on PIC24 which requires a bootloader and I want to debug it with a bootloader. 我正在使用需要引导程序的PIC24上的非独立项目,并且我想使用引导程序对其进行调试。 I am able to produce an .hex file that contains the application code with the bootloader, registering a custom script that executes after compilation. 我能够通过引导加载程序生成一个包含应用程序代码的.hex文件,注册一个在编译后执行的自定义脚本。

If I now select "Launch Debugger Main Project" in the menu, the debugger normally executes the summary code and even reaches the the application startup, but does not display debug information, because it is not contained in .hex file. 如果现在我在菜单中选择“启动调试器主项目”,则调试器通常会执行摘要代码,甚至到达应用程序启动时,但不会显示调试信息,因为该信息不包含在.hex文件中。 But if I choose "Debug Main Project", debugger is loading .elf file that contains debugging information but does not contain loader code instead of manufactured .hex file. 但是,如果我选择“调试主项目”,则调试器将加载包含调试信息但不包含加载器代码的.elf文件,而不是制造的.hex文件。

Is there a way to force the debugger to load debug information from one file and executable code from another file? 有没有一种方法可以强制调试器从一个文件中加载调试信息,并从另一个文件中加载可执行代码? Or is there a way to add a section in compiled .elf file or completely replace the code within it ? 还是有办法在已编译的.elf文件中添加节或完全替换其中的代码? There is no 'objcopy' utility neither for pic30, nor for xc16, are there any analogs? pic30和xc16都没有“ objcopy”实用程序,是否有任何类似物?

These are pictures for question: 这些是问题图片:

[1] https://s15.postimg.cc/59jynpikr/2018-06-27-0001.png [1] https://s15.postimg.cc/59jynpikr/2018-06-27-0001.png

[2] https://s15.postimg.cc/kv1a7q7ej/2018-06-27-0002.png [2] https://s15.postimg.cc/kv1a7q7ej/2018-06-27-0002.png

[3] https://s15.postimg.cc/idpj0hid7/2018-06-27-0003.png [3] https://s15.postimg.cc/idpj0hid7/2018-06-27-0003.png

[4] https://s15.postimg.cc/8t5wdm0qz/2018-06-27-0004.png [4] https://s15.postimg.cc/8t5wdm0qz/2018-06-27-0004.png

[5] https://s15.postimg.cc/np4fl7rl7/2018-06-27-0005.png [5] https://s15.postimg.cc/np4fl7rl7/2018-06-27-0005.png

[6] https://s15.postimg.cc/xz6ukgwwb/2018-06-27-0006.png [6] https://s15.postimg.cc/xz6ukgwwb/2018-06-27-0006.png

[7] https://s15.postimg.cc/bn91r35i3/2018-06-27-0007.png [7] https://s15.postimg.cc/bn91r35i3/2018-06-27-0007.png

When two HEX files are combined with the method you described all of the symbolic debug information is lost. 当两个HEX文件与您描述的方法结合使用时,所有的符号调试信息都将丢失。

Starting a debug session from MPLABX will download the combined image but only the symbolic information from the "active" project is loaded for the debug session. 从MPLABX启动调试会话将下载组合的映像,但仅从“活动”项目中加载符号信息以进行调试会话。

A work around is to create a "special" project that builds both the bootloader and application as one HEX file will put all of the symbolic information in one name space. 解决方法是创建一个“特殊”项目,该项目同时构建引导程序和应用程序,因为一个HEX文件会将所有符号信息放在一个名称空间中。

This tends to be tricky and requires the creation of a custom linker script file. 这往往很棘手,需要创建自定义链接描述文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM