On Fri, 19 Aug 2016 10:51:41 -0300 Augusto Fraga Giachero <augustof...@gmail.com> wrote:
> Hello Peter, > > > As stated in the documentation, the ABS areas "automatically invokes > OVR" (Page 1-27, .area Directive), so (ABS) or (ABS,OVR) have the same > effect, indeed I've tried what you suggested resulting in the same behavior. > > > I think I've managed to workaround this issue in my case. I don't known > if it's the best way to solved but is good enough for me. It seems that > the sdld linker needs to be explicitly informed where to put the > different areas, so I've declared an global symbol at the end of the > boot.asm file: > > > ; boot.asm > > .globl HexToU8, BOOT_END > .area _START (ABS) > .org 0 > ld SP, #0xFFFF > call HexToU8 > BOOT_END: > > And used the linker flags "-i -b _CODE=BOOT_END -b _START=0" to inform the > start address for the areas. The other files that uses the _CODE(REL,CON) > area the linker relocate them as expected. It should be sufficient simply to link the startup module first with the start code first in the code segment and just leave _CODE as 0. Alan ------------------------------------------------------------------------------ _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user