Hi,I am trying to change the mechanism for the bootloader and I am coming across a linker problem when I try to seperate some sections. Below is part of my new linker script that I am using for testing: MEMORY {ram_data : ORIGIN = 0x1000, LENGTH = 16000k} MEMORY {rom_text : ORIGIN = 0xa000000, LENGTH = 4000k} MEMORY {image_text : ORIGIN = 0x0400000, LENGTH = 2M} ENTRY(__vectors) SECTIONS { .image_stuff : AT (_endtext + SIZEOF(restartBuf) + SIZEOF(.data) + SIZEOF(.bss)) { objs/image.o } > rom_text .init : { *(.init) } > rom_text .text : { btext = .; *(.text) (.gnu.linkonce.t) *(.rodata) …the rest of the linker is the same } this links fine, and I can see the ‘image_stuff’ section when using objdump. However this is still running the code from ROM and I want this section to run in RAM. If I change the ‘> rom_text’ to ‘> image_text’ of the image_stuff section I get errors reported: relocation truncated to fit: R_ARM_PC24 NALedGreenOn NALedGreenOn is used in image.o Any help would be really appreciated! Cheers Mark
Just to add to my message. Whilst hunting the internet for clues I found a switch option that I believe should help. -mlong-calls this turns all b asm instructions to bl instructions. Unfortunatley gcc doesn’t seem to recognise this switch!? Can anyone tell me why it isnt recognised. Cheers