• AVR Freaks

Hot!Can't find 0x200 words for psect "dataBIGRAM" in class "BIGRAM"

Author
eugeniobonifacio
Firmware engineer
  • Total Posts : 8
  • Reward points : 0
  • Joined: 2016/10/17 15:44:02
  • Location: 0
  • Status: offline
2020/05/31 00:17:55 (permalink)
0

Can't find 0x200 words for psect "dataBIGRAM" in class "BIGRAM"

Hello,
I revamped an old project on PIC18F67K22, which was originally developed under MPLAB X IDE 3.40 and XC8 v1.40, to the new IDE v5.40 and XC8 v2.20. I'm under linux Kubuntu 18.04.
 
The project has some data buffers each of 64 bytes and one with 256 bytes size.
 
At first I just made only some few enhancements needed for the new compiler version and, after a small work, now it compiles without problems. This is the memory summary:
 
Memory Class Usage:

Program space:
    CODE used 1427Ah ( 82554) of 20000h bytes ( 63.0%)
    CONST used 0h ( 0) of 20000h bytes ( 0.0%)
    SMALLCONST used 0h ( 0) of 1F000h bytes ( 0.0%)
    MEDIUMCONST used 1E6Ah ( 7786) of 1E000h bytes ( 6.3%)

Data space:
    COMRAM used 5Fh ( 95) of 5Fh bytes (100.0%)
    ABS1 used 0h ( 0) of F16h bytes ( 0.0%)
    BIGRAM used 200h ( 512) of F15h bytes ( 13.3%)
    RAM used 0h ( 0) of EB6h bytes ( 0.0%)
    BANK0 used 70h ( 112) of A0h bytes ( 70.0%)
    BANK1 used 100h ( 256) of 100h bytes (100.0%)
    BANK2 used 100h ( 256) of 100h bytes (100.0%)
    BANK3 used 100h ( 256) of 100h bytes (100.0%)
    BANK4 used 100h ( 256) of 100h bytes (100.0%)
    BANK5 used 100h ( 256) of 100h bytes (100.0%)
    BANK6 used FEh ( 254) of 100h bytes ( 99.2%)
    BANK7 used FEh ( 254) of 100h bytes ( 99.2%)
    BANK8 used FFh ( 255) of 100h bytes ( 99.6%)
    BANK9 used D7h ( 215) of 100h bytes ( 84.0%)
    BANK10 used 100h ( 256) of 100h bytes (100.0%)
    BANK11 used 100h ( 256) of 100h bytes (100.0%)
    BANK12 used 100h ( 256) of 100h bytes (100.0%)
    BANK13 used 0h ( 0) of 100h bytes ( 0.0%)
    BANK14 used 0h ( 0) of 100h bytes ( 0.0%)
    BANK15 used 0h ( 0) of 16h bytes ( 0.0%)

Configuration bits:
    CONFIG used Eh ( 14) of Eh bytes (100.0%)

EEPROM space:
    EEDATA used 58h ( 88) of 400h bytes ( 8.6%)

ID Location space:
    IDLOC used 8h ( 8) of 8h bytes (100.0%)


Memory Summary:
    Program space used 160E4h ( 90340) of 20000h bytes ( 68.9%)
    Data space used EA1h ( 3745) of F16h bytes ( 97.0%)
    Configuration bits used 7h ( 7) of 7h words (100.0%)
    EEPROM space used 58h ( 88) of 400h bytes ( 8.6%)
    ID Location space used 8h ( 8) of 8h bytes (100.0%)

 
As you can see, data space usage is close to the end.
After this, I started working in RAM optimization and I thought all should be fine, but when I compile this new version, which has two buffers less, I get this message:
:0:: error: (1347) can't find 0x200 words (0x200 withtotal) for psect "dataBIGRAM" in class "BIGRAM" (largest unused contiguous range 0x196)
I know it's a linker issue with the insufficient RAM space but I cannot understant why. I'm not very good at how the linker works.
 
If tried reducing the bigger buffer (256 bytes), at 64 bytes of size it compiles with the following memory map:
 
Memory Class Usage:

Program space:
    CODE used 128FDh ( 76029) of 20000h bytes ( 58.0%)
    CONST used 0h ( 0) of 20000h bytes ( 0.0%)
    SMALLCONST used 0h ( 0) of 1F000h bytes ( 0.0%)
    MEDIUMCONST used 141Ch ( 5148) of 1E000h bytes ( 4.2%)

Data space:
    COMRAM used 59h ( 89) of 5Fh bytes ( 93.7%)
    ABS1 used 0h ( 0) of F16h bytes ( 0.0%)
    BIGRAM used 200h ( 512) of F15h bytes ( 13.3%)
    RAM used 0h ( 0) of EB6h bytes ( 0.0%)
    BANK0 used 82h ( 130) of A0h bytes ( 81.2%)
    BANK1 used 100h ( 256) of 100h bytes (100.0%)
    BANK2 used 100h ( 256) of 100h bytes (100.0%)
    BANK3 used 100h ( 256) of 100h bytes (100.0%)
    BANK4 used FFh ( 255) of 100h bytes ( 99.6%)
    BANK5 used FEh ( 254) of 100h bytes ( 99.2%)
    BANK6 used FEh ( 254) of 100h bytes ( 99.2%)
    BANK7 used FEh ( 254) of 100h bytes ( 99.2%)
    BANK8 used EBh ( 235) of 100h bytes ( 91.8%)
    BANK9 used D1h ( 209) of 100h bytes ( 81.6%)
    BANK10 used CDh ( 205) of 100h bytes ( 80.1%)
    BANK11 used C0h ( 192) of 100h bytes ( 75.0%)
    BANK12 used C0h ( 192) of 100h bytes ( 75.0%)
    BANK13 used 0h ( 0) of 100h bytes ( 0.0%)
    BANK14 used 0h ( 0) of 100h bytes ( 0.0%)
    BANK15 used 0h ( 0) of 16h bytes ( 0.0%)

Configuration bits:
    CONFIG used Eh ( 14) of Eh bytes (100.0%)

EEPROM space:
    EEDATA used 58h ( 88) of 400h bytes ( 8.6%)

ID Location space:
    IDLOC used 8h ( 8) of 8h bytes (100.0%)


Memory Summary:
    Program space used 13D19h ( 81177) of 20000h bytes ( 61.9%)
    Data space used DDDh ( 3549) of F16h bytes ( 91.9%)
    Configuration bits used 7h ( 7) of 7h words (100.0%)
    EEPROM space used 58h ( 88) of 400h bytes ( 8.6%)
    ID Location space used 8h ( 8) of 8h bytes (100.0%)

 
I cannot understand. I see 3549 bytes used of 3862, so I still have 313 bytes free. If I add the bytes I had to remove to let it compile (192 bytes), I obtain 3741 bytes that is almost the RAM usage of the original project. Despite the fact that even removing two buffers I get the same RAM usage, so I didn't a very good optimization in code refactor, I wonder why it doesn't compile at all.
 
Any help would be appreciated. Thank you.
 
 
post edited by eugeniobonifacio - 2020/05/31 00:54:55
#1

4 Replies Related Threads

    eugeniobonifacio
    Firmware engineer
    • Total Posts : 8
    • Reward points : 0
    • Joined: 2016/10/17 15:44:02
    • Location: 0
    • Status: offline
    Re: Can't find 0x200 words for psect "dataBIGRAM" in class "BIGRAM" 2020/05/31 01:03:41 (permalink)
    0
    I forgot to say I'm using same settings on both versions of the project, I'm using C90 standard and I activated the 60 days trial period for PRO version of the compiler. Nothing changed.
    #2
    ric
    Super Member
    • Total Posts : 28324
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Can't find 0x200 words for psect "dataBIGRAM" in class "BIGRAM" 2020/05/31 01:21:52 (permalink)
    0
    eugeniobonifacio
     activated the 60 days trial period for PRO version of the compiler. Nothing changed.

    Did you actually select a higher optimisation level?
    Activating PRO mode doesn't automatically do that.
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #3
    eugeniobonifacio
    Firmware engineer
    • Total Posts : 8
    • Reward points : 0
    • Joined: 2016/10/17 15:44:02
    • Location: 0
    • Status: offline
    Re: Can't find 0x200 words for psect "dataBIGRAM" in class "BIGRAM" 2020/05/31 01:37:02 (permalink)
    0
    ric
    Did you actually select a higher optimisation level?
    Activating PRO mode doesn't automatically do that.



    Yes, I did. I set the highest optimization level: s.
    post edited by eugeniobonifacio - 2020/06/01 08:46:45
    #4
    NKurzman
    A Guy on the Net
    • Total Posts : 18898
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: Can't find 0x200 words for psect "dataBIGRAM" in class "BIGRAM" 2020/05/31 08:38:58 (permalink)
    +1 (1)
    Download and install the original 1.40 compiler.
    Then tell the project to use that one.
    See if that works, and how much memory is left.
    You can leave the newer compiler installed.
    Installing multiple compiler’s on the same computer is not a problem.
    #5
    Jump to:
    © 2020 APG vNext Commercial Version 4.5