楼主看下这个答案 https://microchipdeveloper.com/m ... oadable-bootloaders
To combine a bootloader with application code:
Create one project for your application and one project for your bootloader.
Load the bootloader project or hex file into the application project. See Projects Window – Loadables Setup or Project Properties Window – Loading Setup for how to do this.
lcczg 发表于 2021-11-17 15:09
楼主看下这个答案 https://microchipdeveloper.com/mplabx:projects-loadable-bootloaders
To combine a bo ...
看了版主提供的链接,测试了下,会提示地址冲突,不知如何解决,单片机型号是dsPIC33EP128GM306。如果先写入bootloader,再用UnifiedHost-1.17.0通过串口写入App,是一切正常的。
错误信息如下:
(944) data conflict at address 0h between dist/default/production/TS3.170GM66.X.production.hex and ../Boot_3_33_6B_GM306.X/dist/default/production/Boot_3_33_6B_GM306.X.production.hex
编译器手册里针对错误的详细解释是:
(944) data conflict at address *h between * and * (Hexmate)
Sources to Hexmate request differing data to be stored to the same address. To force one data source to override the other, use the ‘+’ specifier. If the two named sources of conflict are the same source, then the source can contain an error.
你查看两个HEX文件,在地址零处应该是不一样的。你可以手动修改为一样且是你想要的指令。
两个HEX的地址零处到底是什么指令哪?