I am working with a non-standalone project on PIC24 which requires a bootloader and I want to debug it with a bootloader. I am able to produce an .hex file that contains the application code with the bootloader, registering a custom script that executes after compilation.
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. 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.
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 ? There is no 'objcopy' utility neither for pic30, nor for xc16, are there any analogs?
These are pictures for question:
[1]https://s15.postimg.cc/59jynpikr/2018-06-27-0001.png
[2]https://s15.postimg.cc/kv1a7q7ej/2018-06-27-0002.png
[3]https://s15.postimg.cc/idpj0hid7/2018-06-27-0003.png
[4]https://s15.postimg.cc/8t5wdm0qz/2018-06-27-0004.png
[5]https://s15.postimg.cc/np4fl7rl7/2018-06-27-0005.png