Andy,

SDCC generates a so-called extended intel-hex file. This 
also contains records to indicate the start of a new 
segment/bank. If your bootloader or whatever you use to 
program the chip(s) does not understand extended hex-
files you can use srecord to split the file into several 
hex-files for the banks.

HTH,
Maarten

> I'm evaluating SDCC for a project, which needs code-banking (we estimate
> code size >64k). Are there any examples of how to do code-banking? I
> have seen and followed the instructions (see below), but I think there
> is one thing I still need to know.
> 
> On our hardware, the common area is 0x4000-0x7fff, with banks from
> 0x8000-0xFFFF.
> 
> The keil compiler outputs a separate .ihx file for each bank. However I
> can't find how to do that with SDCC. I can build an image using the
> script below, and the .map file shows everything at the right place
> (BANK1 and BANK2 look correctly overlaid). However I don't see how a
> single .ihx file can work. Is there a way to produce many .ihx files, or
> some way to produce an output that describes >64k code?
> 
> Can someone help me in the right direction?
> Thanks,
> Andy
> 
> 
> 
> COMPILE:-
> sdcc -c main.c
> sdcc -c bank1stuff.c  (this contains pragma codeseg BANK1)
> sdcc -c bank2stuff.c  (this contains pragma codeseg BANK2)
> asx8051 mytrampoline.asm
> 
> LINK:-
> sdcc --code-loc 0x4000 -Wl-bBANK1=0x18000 -Wl-bBANK2=0x28000 -Wl-r
> $(OBJS)
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> _______________________________________________
> Sdcc-user mailing list
> Sdcc-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sdcc-user
> 



------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to