This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

data group use with no reason ?

I add and call 2 assembler routines defined in C as
void rtn (void)
to a C program

After being surprised I rewrite the assembler routines as
rtn: ret
I get the following linker error:

*** ERROR 107: ADDRESS SPACE OVERFLOW
SPACE: DATA
SEGMENT: _DATA_GROUP_
LENGTH: 002AH

I know what the message means and can possibly salvage some data space elsewhere
BUT: what are those data segment bytes and is there any way to get rid of this (non)use of valuable space ?

Erik Malund

Parents
  • What version are you using?

    I found a bug in C51.exe v6.20, which could generate a spurious empty data segment; I know that's not what you're seeing, but maybe related?
    Keil fixed it in v6.20b.

    Also, there is a long-standing "feature" of the Global Register Optimisation which can cause the link to fail with ADDRESS SPACE OVERFLOW if your DATA space is very nearly full; eg,

    I have a project which has only 1 spare byte of DATA space; so long as this has been successfully built at least once before, further builds will work.
    However, if I completely clean the project directories of all generated files, the link fails with ADDRESS SPACE OVERFLOW!

    This is due to the project.ORC file, which is not removed by uVision's 'Rebuild All' option.
    It seems that this file gives the Global Register Optimiser a "head start" without which it can't manage to fit the project!

Reply
  • What version are you using?

    I found a bug in C51.exe v6.20, which could generate a spurious empty data segment; I know that's not what you're seeing, but maybe related?
    Keil fixed it in v6.20b.

    Also, there is a long-standing "feature" of the Global Register Optimisation which can cause the link to fail with ADDRESS SPACE OVERFLOW if your DATA space is very nearly full; eg,

    I have a project which has only 1 spare byte of DATA space; so long as this has been successfully built at least once before, further builds will work.
    However, if I completely clean the project directories of all generated files, the link fails with ADDRESS SPACE OVERFLOW!

    This is due to the project.ORC file, which is not removed by uVision's 'Rebuild All' option.
    It seems that this file gives the Global Register Optimiser a "head start" without which it can't manage to fit the project!

Children