8 Replies Latest reply on Jan 14, 2015 1:32 PM by MichaelF_56

    How to Determine Actual Code Size and NVRAM Record Size?


        We have a need to maximize the amount of EEPROM we can use for storing recorded application data.  That being said I believe I am understanding how I can adjust the *.btp file and the ws_upgrade.c file for the correct ds, ss, and vs locations and length to maximize the vs size.  That being said I have 2 questions in regards to this.


      1) In using the cfa_memfree() I can see that there is 16196byte left FREE in RAM.  So if I subtract this from 60KB(60*1024) which is the total available RAM internally on the BCM2073x I end up with 45244 bytes total that are apparently being used up.  If I subtract out the SS location which is from what I understand 256bytes that leaves 44988bytes which I would have to assume is what my actual code size is though this can't be the case?  Can you help me understand how to calculate the actual code size based on what is output from the cfa_mm_MemFreeBytes() API function?


      2) Regarding NVRAM DLConfigVSLength and correspondence to ID's which range from 0x00-0x6F.  I am rather confused by what is being termed the 'Item' or 'Record' length.  I understand that the Page size is 32bytes and that each page has a 3byte overhead.  So my question is if I was to say use a 'Item/Record' length of 128 for each of the ID's 0x00-0x6F would I need to make the DLConfigVSLength = 112(6F + 0 location) * 128 = 14336?


      3) It is imperative that I truly understand how to calculate the actual code size from the cfa_mm_MemFreeBytes() function output OR is there some means to inspect some sort of a file that actually shows the compiled sections so I can see from that what the actual individual section sizes are.  Being that it is a GNU/GCC compiler I would think there is a means to show the actual compiled listing or memory map file as can be done with a typical MCU.  I can't seem to find any sort of file output that shows this vs. having to backwards calculate from the leftover memory.