Hi all, I'm working on a project which contain 4 banks (4 x 64 K), and When I compile my project following errors happens.
*** ERROR L107: ADDRESS SPACE OVERFLOW SPACE: CODE SEGMENT: ?PR?INITMODEDEPENDENTDESCR?USERPREF LENGTH: 000008H *** ERROR L107: ADDRESS SPACE OVERFLOW SPACE: CONST SEGMENT: ?CO?GMZX_OSD LENGTH: 0025B9H *** ERROR L121: IMPROPER FIXUP MODULE: .\outputs\I2crout.obj (I2CROUT) SEGMENT: ?PR?CHECK_EEPROM_DATA?I2CROUT OFFSET: 000039H Program Size: data=156.5 xdata=36280 const=22393 code=142557
156.5 + 36280 + 22393 + 142557 = 201387 Byte That calculation is so meaningless it's not even wrong. You apparently have no idea what banking is and how it works. The real calculation you would have to make can't even be based on the above numbers. It'd rather have to be: 4*(consts + common_code) + non_common_code Even assuming you had no common code at all, you'ld be at 4*(22393 + 0) + 142557 = 232129 Bytes That's easily close enough to 256 KiB for you to be in trouble --- 10 KiB of common code would push you over the edge.
how can I learn how much common code my program use?
Have you read about banking in the Compiler & Linker Manuals? Have you checked for Application Notes and Knowledgebase articles?
Look at the link map file? Jon
Wow, someone actually used the SI prefixes for powers of two instead of ten. Now if only it didn't sound like you were talking about feeding your cat when you say "kibibytes", we might be on to something...