Secondary bootloader
Hello
I try make a secondary bootloader. I must send my code program from stm32f103 board to SPC560P board via CAN, and program should downlaod by BAM to flash.
I used transceivers. I know i should make user.ld, but can you explain me how?
I make some standalone_ram.ld in ghs, here is my file, it is correct to ran uC in BAM mode?
MEMORY {
// 384k Internal Flash
flash_rsvd1 : ORIGIN = 0x00000000, LENGTH = 8flash_memory : ORIGIN = ., LENGTH = 384K-8flash_rsvd2 : ORIGIN = ., LENGTH = 0// 24KB of internal SRAM starting at 0x40000000dram_rsvd1 : ORIGIN = 0x40000000, LENGTH = 0dram_reset : ORIGIN = ., LENGTH = 0dram_memory : ORIGIN = ., LENGTH = 24K-256heap_reserve:origin = ., LENGTH = 8Kstack_reserve:origin = ., LENGTH = 8Kdram_rsvd2 : ORIGIN = ., LENGTH = 16}
DEFAULTS {stack_reserve = 4K
heap_reserve = 4K}
//// Program layout for running out of RAM.////SECTIONS
{.PPC.EMB.sdata0 ABS : > dram_memory.PPC.EMB.sbss0 CLEAR ABS : > ..text : > dram_memory
.vletext : > ..syscall : > ..rchw NOCHECKSUM : > ..secinfo : > ..rodata : > ..sdata2 : > ..fixaddr : > ..fixtype : > ..sdabase ALIGN(16) : > dram_memory
.sdata : > ..sbss : > ..data : > ..bss : > ..heap ALIGN(16) PAD(heap_reserve) : > . .stack ALIGN(16) PAD(stack_reserve) : > .//
// These special symbols mark the bounds of RAM and ROM memory.// They are used by the MULTI debugger.//__ghs_ramstart = MEMADDR(dram_rsvd1);__ghs_ramend = MEMENDADDR(dram_memory);__ghs_romstart = MEMADDR(flash_rsvd1);__ghs_romend = MEMENDADDR(flash_rsvd2);_ram_image_heap = ENDADDR (heap_reserve);_ram_image_stack = ENDADDR (stack_reserve);_ram_image_end = ENDADDR (.bss);}
Best regards
Mateusz
