Hi all! I am trying to merge two applications by using this way: http://www.keil.com/forum/20886/. So I created two projects "first_program" (starts first and located at 0x0000...0x2000) and "second_program" (runs from "first_program" and located at 0x2000...0x8000). I did the follow: 1) Generated first_program.bin file using fromelf.exe 2) In "second_program" created bootOptions.s with follow code:
AREA Bootloader, CODE, READONLY, PREINIT_ARRAY INCBIN ..\\first programm\first_programm.bin END
3) In scatter file ("second_program"):
LR_IROM2 0x00002000 0x0006000 { ; load region size_region ER_IROM2 0x00002000 0x0006000 { ; load address = execution address *.o (RESET, +First) *(InRoot$$Sections) .ANY (+RO) } RW_IRAM1 0x100000C0 0x2000 { ; RW data .ANY (+RW +ZI) } } LR_IROM1 0x00000000 0x0002000 { ER_IROM1 0x00000000 0x00002000 { ; load address = execution bootOptions.o (+RO) } }
4) compiled "second_program" and downloaded it to my target.
Program don't start at all (hardfault_handler occurs). Programs work individually. What am I doing wrong? Regards, Vasilij.