On Mon, 9 Jul 2018 01:57:44 +0200
Tomas Brännström <tomas.brannst...@gmail.com> wrote:

> Hello!
> I am trying to build a small gameboy application with a custom crt0 (for
> now it's just a copy of the default one with some interrupt handlers added,
> though I did try with an exact copy of the default crt0 also) but "makebin"
> refuses to work and just tells me that the "size of the buffer is too
> small".

Firstly makebin defaults to a max of 32K (no idea why, I think it's just
written to wind people up) so do 

makebin -s 65535

Secondly the linker has a weird and totally undocumented way of ordering
areas, which is that they are ordered by first mention. Thus you often
need your crt0 to start with something like

        .AREA _BOOT
        .AREA _CODE
        .AREA _INITIALIZED
        etc

in the order you need to pack things so you don't find your code
somewhere above 0xC000 or similar.


Also makebin

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to