This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[urgent] error problem of code size



Can somone tell me what parameter to change when this error :

Thank you

Linking
Error[e16]: Segment BANK_RELAYS (size: 0x102c align: 0) is too long for segment definition. At least 0x70 more bytes 
needed. The problem occurred while processing the segment placement command 
"-Z(CODE)BANK_RELAYS=_CODE_START-_CODE_END", where at the moment of placement the available memory 
ranges were "CODE:1944-28ff"
   Reserved ranges relevant to this placement:
   CODE:0-85            INTVEC
   CODE:86-165          CSTART
   CODE:166-10fb        RCODE
   CODE:10fc-1943       NEAR_CODE
   CODE:1944-28ff       BANK_RELAYS
   BIT:0-7              BREG
   BIT:80-97            SFR_AN
   BIT:a0-af            SFR_AN
   BIT:b8-c7            SFR_AN
   BIT:d8-df            SFR_AN
   BIT:e8-ef            SFR_AN
 
Total number of errors: 1
Total number of warnings: 0

 

I forgot to say it is in debug mode

  • In the f8w2430.xcl file, there is a statement: -D_CODE_END=0x28FF that defines the end of "ROOT' memory, where the linker places certain items, such as constants, bank_relay blocks, etc. The error message indicates that "at least 0x70 more bytes needed", so you should increase the value of _CODE_END. I would suggest adding 0x100 to provide a little more room for more constants, etc in the future: try -D_CODE_END=0x29FF.

     

  • Yes I tried that before your post

    I retried it with code_end=0x29ff : this time it's another segment which has problems

    Linking
    Error[e16]: Segment XDATA_ID (size: 0x311 align: 0) is too long for segment definition. At least 0x281 more bytes needed. 
    The problem occurred while processing the segment placement command 
    "-Z(CODE)BIT_ID,BDATA_ID,DATA_ID,IDATA_ID,IXDATA_ID,PDATA_ID,XDATA_ID=_CODE_START-_CODE_END", 
    where at the moment of placement the available memory ranges were "CODE:2970-29ff"
       Reserved ranges relevant to this placement:
       CODE:0-85            INTVEC
       CODE:86-165          CSTART
       CODE:166-10fb        RCODE
       CODE:10fc-1943       NEAR_CODE
       CODE:1944-296f       BANK_RELAYS
       CODE:2970-29ff       XDATA_ID
       BIT:0-7              BREG
       BIT:80-97            SFR_AN
       BIT:a0-af            SFR_AN
       BIT:b8-c7            SFR_AN
       BIT:d8-df            SFR_AN
       BIT:e8-ef            SFR_AN
     
    Total number of errors: 1
    Total number of warnings: 0

    but thank it's ok It finally work with code_end=0x32ff

    But please can you tell me why this problem happen now although It worked hundreds of time with the same material and the same or heavier code before?

    and also what is the highest code_end value possible?

    Thank

  • Software debugging is often like peeling an onion -- when you remove the outer layer there's another beneath! Good luck with your project.

  • hi there,

                 I am also getting the same Error[e16]: Segment BANK_RELAYS. As per your suggestion i changed END_CODE from 0x3FFF to 0x43FF. 

               When i am doing OAD with the same changes, the code was not working. 

    Kindly help me to resolve this issue.

    Regards

    Krishna