Hi,
I am trying to create a project in RealView so that it contains both bootloader and application in same source. Everytime I recompile my project (application source code changed but bootloader source code unchanged), I get different compiler-generated object. For example:
0x00100000 0x00000128 Code RO 3183 RESET sam7.o 0x00100128 0x00000008 Code RO 3488 * !!!main __main.o(c_t__un.l) 0x00100130 0x00000038 Code RO 3758 !!!scatter __scatter.o(c_t__un.l) 0x00100168 0x00000060 Code RO 3756 !!dclz77c __dclz77c.o(c_t__un.l) 0x001001c8 0x00000028 Code RO 3760 !!handler_copy __scatter_copy.o(c_t__un.l) 0x001001f0 0x0000002c Code RO 3762 !!handler_zi __scatter_zi.o(c_t__un.l) 0x0010021c 0x00000004 Ven RO 3658 .emb_text lib_init.o(c_t__un.l) 0x00100220 0x00000010 Code RO 3658 .emb_text lib_init.o(c_t__un.l) 0x00100230 0x00000020 Code RO 3184 .text sam7.o 0x00100250 0x0000005e Code RO 3449 .text _printf_str.o(c_t__un.l)
These objects are lum together with bootloader region. When I update my application using my bootloader, all these old object was never updated and I have problem running my new application. Does anyone know how to get rid of this?. Thanks in advanced.
I am trying to sectorize using scatter-loading file as shown below:
LOAD_RESERVED 0x00100000 0x00001000 { EXE_RESERVED 0x00100000 { *.o (RESET, +First) *.o (+RO) * (+RO) } RAM_RESERVED 0x00200000 0x00000800 { *.o (+RW +ZI) } } LOAD_BOOTLOADER 0x00101000 0x00003000 { RAM_BOOTLOADER 0x00200800 0x00003000 { boot_commandram.o (+RO +RW +ZI) boot_bootloader.o (+RO +RW +ZI) boot_protocol.o (+RO +RW +ZI) boot_command.o (+RO +RW +ZI) boot_transport.o (+RO +RW +ZI) } } LOAD_FIRMWARE 0x00104000 0x0003A000 { EXE_APPLICATION 0x00104000 0x0003A000 { boot_commandflash.o (+RO) } RAM_VARIABLE 0x00203800 0x0000C800 { boot_commandflash.o (+RW +ZI) } } LOAD_INFO 0x0013E000 0x00001000 { EXE_INFO 0x0013E000 0x00001000 { region_info.o (+RO) } } LOAD_OEM 0x0013F000 0x00001000 { EXE_OEM 0x0013F000 0x00001000 { region_oem.o (+RO) } }
My flash size is 0x40000 and RAM size is 0x10000. Flash remap address starts from 0x100000. RAM address starts from 0x200000. There are totally 5 regions. LOAD_INFO and LOAD_OEM regions are used to store factory information. LOAD_BOOTLOADER is to store bootloader firmware. LOAD_FIRMWARE is to store application firmware.
I have problem with LOAD_RESERVED region where I use to store compiler-generated object. I think I am doing something wrong here but I cannot figure out the mistake.