I'm trying to combine my bootloader and application projects made in Keil uVision5 into one single hex or binary file. I have used the bootloader to upload a binary of the application and it works. I have scatter file that places them where I want in memory Bootloader:
LR_IROM1 0x00000000 0x00004000 { ; load region size_region ER_IROM1 0x00000000 0x00004000 { ; load address = execution address *.o (RESET, +First) *(InRoot$$Sections) .ANY (+RO) } RW_IRAM1 0x20000000 0x00001000 { ; RW data .ANY (+RW +ZI) *(ram_code) } }
Application:
LR_IROM1 0x00004100 0x00007F00 { ; load region size_region ER_IROM1 0x00004100 0x00007F00 { ; load address = execution address *.o (RESET, +First) *(InRoot$$Sections) .ANY (+RO) } RW_IRAM1 0x20000000 0x00001000 { ; RW data .ANY (+RW +ZI) *(ram_code) } }
Looking at other posts, I took up people's suggestions to use srec_cat.exe I used the command srec_cat.exe BL.bin -Binary -o BL.hex -Intel to get a hex file from my binary. I did the same for my application. However the addresses for the hex files are identical. They both start at 0 and increment from there. Here are a few lines of the hex from both Bootloader:
:020000040000FA :20000000000B0020450600004D0600004F06000051060000530600005506000000000000B7 :200020000000000000000000000000005706000059060000000000005B0600005D06000040 :200040005F060000B31800005F0600005F0600005F0600005F0600005F0600005F06000012 :200060005F060000BF1800005F0600005F0600005F0600005F0600005F0600005F060000E6
:020000040000FA :20000000E80D0020D1410000D9410000DB410000DD410000DF410000E14100000000000023 :20002000000000000000000000000000E3410000E541000000000000E7410000C95800002D :20004000EB410000EB410000EB4100008B70000073700000EB410000A9590000EB410000E4 :20006000EB410000EB410000EB410000EB410000EB410000EB410000EB410000EB41000020
How come they're being put in the same addresses? I know the binaries are properly starting them at the right address.