0
点赞
收藏
分享

微信扫一扫

嵌入式问题解决:ERROR: The hex files cannot be merged since there are conflicts.



文章目录

  • 一、遇到问题
  • 二、分析问题
  • 三、解决问题
  • 四、验证


一、遇到问题

  • 合并nRF52832生成的三个hex出现问题
  • mergehex --merge nrf52832_xxaa.hex bootload.hex softdevice.hex --output o1.hex

mergehex --merge nrf52832_xxaa.hex bootload.hex softdevice.hex --output o1.hex
Parsing input hex files.
Merging files.
ERROR: The hex files cannot be merged since there are conflicts.

嵌入式问题解决:ERROR: The hex files cannot be merged since there are conflicts._hex

二、分析问题

  • 错误信息简洁易懂,一目了然
  • Parsing input hex files.:解析输入的hex文件
  • Merging files.:合并文件
  • ERROR: The hex files cannot be merged since there are conflicts.:错误:hex文件不能合并因为这里有冲突
  • 具体什么冲突,这里没说。不过按照合并原理,是按照在flash中的地址进行合并。
  • 所以应该是flash地址冲突了,需要确认几个地方
  • IROM1的地址范围
  • __attribute__指定地址的数组

嵌入式问题解决:ERROR: The hex files cannot be merged since there are conflicts.___attribute___02

嵌入式问题解决:ERROR: The hex files cannot be merged since there are conflicts._mergehex_03

  • 果然,找到了。我把nrf_dfu_settings从bootloader搬到app中用了,所以这一块的地址,bootloader和app重复冲突了。

三、解决问题

  • 要解决这个问题也比较简单,就是不使用__attribute__,将其注释掉。
  • 然后,直接指定地址从flash中读即可。修改如下:

嵌入式问题解决:ERROR: The hex files cannot be merged since there are conflicts._conflict_04

四、验证

mergehex --merge nrf52832_xxaaV3.hex bootload.hex softdevice.hex --output o1.hex
Parsing input hex files.
Merging files.
Storing merged file.

嵌入式问题解决:ERROR: The hex files cannot be merged since there are conflicts._hex_05

觉得好,就一键三连呗(点赞+收藏+关注)


举报

相关推荐

0 条评论