MPLAB-X Wrong Memory Size In Dashboard

Author
ECCsimmons
New Member
  • Total Posts : 6
  • Reward points : 0
  • Joined: 2018/10/05 13:07:24
  • Location: 0
  • Status: offline
2018/10/10 13:17:33 (permalink)
0

MPLAB-X Wrong Memory Size In Dashboard

MPLAB X IDE v5.05       
 

 
After getting some of my projects ported over, I started playing around with some if the IDE features and quickly took a liking to the "Dashbord - Memory" section which gives nice visuals of memory usage (Data/Program). 
 
The odd thing is, for my PIC24FJ64GB002 it shows:
Data 8,192 (0x2000) bytes
Data Used: 54.6%
Data Used: 4,472 (0x1178) Free: 3,720 (0xE88)
Program 21,756 (0x54FC) words
Program Used: 73.7%
Program Used: 16,041 (0x3EA9) Free: 5,715 (0x1653)
 
Looking at the datasheet this should have 64k(Program) and 8k(Data). Is this just omitting the "loaders" that are actually started prior to my application? If so, why on earth would they omit that information? It's still very useful to know.
#1

3 Replies Related Threads

    qhb
    Superb Member
    • Total Posts : 7203
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: MPLAB-X Wrong Memory Size In Dashboard 2018/10/10 14:33:22 (permalink)
    0
    I think you missed that "Data" is reported in bytes, and "Program" is in words.

    Data 8,192 (0x2000) bytes
    Program 21,756 (0x54FC) words


    Worst forum problems are now fixed, but the damn firewall is still there.
    #2
    ECCsimmons
    New Member
    • Total Posts : 6
    • Reward points : 0
    • Joined: 2018/10/05 13:07:24
    • Location: 0
    • Status: offline
    Re: MPLAB-X Wrong Memory Size In Dashboard 2018/10/11 05:36:13 (permalink)
    +1 (1)
    Wow, palm-to-forehead. Thank you for the awakening!
     
    So according to the datasheet I see:
    The PIC24F CPU module has a 16-bit (data) modified Harvard architecture with an enhanced instruction set. The CPU has a 24-bit instruction word with a variable length opcode field. The Program Counter (PC) is 24 bits wide and addresses up to 4M x 24 bits of user program memory space
     
    21756 (words) * 24 (bit word) = 522144 (bits) / 8 = 65268 (bytes). Is this the correct thought process?
    post edited by ECCsimmons - 2018/10/11 05:46:58
    #3
    JPortici
    Super Member
    • Total Posts : 387
    • Reward points : 0
    • Joined: 2012/11/17 06:27:45
    • Location: Grappaland
    • Status: offline
    Re: MPLAB-X Wrong Memory Size In Dashboard 2018/10/11 06:25:16 (permalink)
    0
    Yes.
    Add a Nop() statement somewhere, compile, notice that program size has increased by 3 bytes :)
    #4
    Jump to:
    © 2018 APG vNext Commercial Version 4.5