1

I have a bootloader project and an app project within the same workspace in Eclipse.

I'd like to merge the hex files of theses two project into one single hex, so that I can flash in my MCU both project at the same time.

I know this is possible using some tools (https://www.keil.com/support/docs/2666.htm), but I would like that the merge process happens in Eclipse using a post-build command or else.

Thanks

Lundin
  • 195,001
  • 40
  • 254
  • 396
PLB
  • 197
  • 1
  • 10
  • 1
    In _Project > Properties: Builders_ click _New..._ – howlger Jan 27 '22 at 13:00
  • @howlger: any tutorials on this menu ? tons of options, I can't figure how to merge the hex only – PLB Jan 27 '22 at 13:32
  • 1
    See https://help.eclipse.org/latest/topic/org.eclipse.platform.doc.user/gettingStarted/qs-96_non_ant_pjs.htm Please tell the exact command line command that you want do automatically by Eclipse as last step of a project build. – howlger Jan 27 '22 at 14:29

1 Answers1

1

Intel hex are just text files, you can merge them manually in any text editor by using simple copy/paste. Grab the data rows only from one of the files.

This assuming that there's no CRC on the program as whole. Also, you probably shouldn't have multiple rows with the same address in the same file or you might confuse some tools.

I'd recommend doing this through a diff tool such as for example WinMerge, or the one integrated in your version control system. Once you have it working you could write a file handling script for merging them automatically.

Lundin
  • 195,001
  • 40
  • 254
  • 396
  • thanks but I was searching to automate this process within eclipse, so that I don't merge manually or with an other tool – PLB Jan 27 '22 at 15:55
  • @PLB Just run a script after linking is done. That way you don't create any tight coupling between a certain IDE and your project either. – Lundin Jan 27 '22 at 15:57
  • yeah I should do that way ! thanks – PLB Jan 27 '22 at 16:03