XC8 linker force output to be coherent
I am using a PIC16F18346 along with XC8 v1.44 compiler to build an application that is programmed by a bootloader into the chip. This bootloader can only handle a binary file. The XC8 linker creates a hex-file with several code sections spread over the available program memory space. That is unfortunate and unwanted, because I transfer the Intel-hex file into a bin file and the inter-program sections that the linker did not use are contained in the binfile which cause the binfile to be much larger than I really need.
My question therfore is: What is the (best) way to instruct the linker to create an hex output file with code that is put as close together as it can? Any help would be nice :-)
With kind regards,