Mark,
You need to put the code and consts in named segments
and locate these somewhere in the banks. See 4.1.3 in
the manual.
Maarten
> I am continuing to experiment with the new --model-huge option.
>
> When I try to link files that exceed 64 of code, I get an insufficient
> memory error from the linker:
> ?ASlink-Error-Insufficient ROM/EPROM/FLASH memory.
>
> I assume that I will need to modify the linker script and manually link
> the files. I checked the mailing list and the changelist for the latest
> snapshot, and didn't see anything that indicates I need to get a newer
> snapshot.
>
> My project is very simple, it contains initialization code, a uart
> driver and 4 files, called bankster0.c up to bankster3.c. I took a
> simple subroutine and stuffed a huge constant into it to fatten up files
> to force actual bankswitching.
>
> Each of the banksterX.c files looks more or less like this:
>
> #include <stdio.h>
> #include "bankster.h"
>
> void bank_three(void) {
> const __code BigDataHog hog = {{ {1} }};
> printf( "I have bank %02X.\r\n", PSBANK );
> }
>
> And bankster.h:
>
> typedef char OneKArray[1024];
> typedef struct {
> OneKArray foo[20];
> } BigDataHog;
>
>
> void bank_zero(void);
> void bank_one(void);
> void bank_two(void);
> void bank_three(void);
>
> The command to SDCC at link time is:
> sdcc --debug --model-huge --code-loc 0x2800 --code-size 0x1D400
> -Iinclude -I../sensor-libs/include -o build/project-name.ihx
> build/main.rel build/bankster0.rel build/bankster1.rel
> build/bankster2.rel build/bankster3.rel build/char_io.rel
> build/core_cpu_init.rel build/serial0.rel
>
> The linker script is:
>
> -w 0x1d400
> -z
> -b HOME = 0x2800
> -b ISEG = 0x0000
> -b BSEG = 0x0000
> -k c:\Program Files\SDCC-2.9.7\bin\..\lib\huge
> -l mcs51
> -l libsdcc
> -l libint
> -l liblong
> -l libfloat
> build/main.rel
> build/bankster0.rel
> build/bankster1.rel
> build/bankster2.rel
> build/bankster3.rel
> build/char_io.rel
> build/core_cpu_init.rel
> build/serial0.rel
>
> -e
>
> My SDCC version is SDCC :
> mcs51/gbz80/z80/ds390/pic16/pic14/TININative/ds400/hc08 2.9.7 #5729
> (Mar 9 2010) (MINGW32)
>
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Sdcc-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sdcc-user
>
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user