Reporting program statistics


Closed Thread
Results 1 to 2 of 2

Hybrid View

  1. #1
    alex's Avatar
    alex Guest

    Default Reporting program statistics

    Does anyone know of a good way to report statistics, like RAM usage and code space usage, using PBP? Perhaps an external program or an IDE exists which would do such a thing.

    Alex

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Hi Alex,

    You can see how much RAM is used, and what your compiled program size is by examining the .lst file generated after you compile your code.

    If your BASIC file name is test.bas, you should have a file named test.lst after compile. Open this .lst file to see RAM allocation, and compiled program code size.

    It will look something like this depending on the PIC type, and how many variables you use;
    Code:
    RAM_START       		EQU	00020h
    RAM_END         		EQU	001EFh
    RAM_BANKS       		EQU	00004h
    BANK0_START     		EQU	00020h
    BANK0_END       		EQU	0007Fh
    BANK1_START     		EQU	000A0h
    BANK1_END       		EQU	000EFh
    BANK2_START     		EQU	00110h
    BANK2_END       		EQU	0016Fh
    BANK3_START     		EQU	00190h
    BANK3_END       		EQU	001EFh
    EEPROM_START    		EQU	02100h
    EEPROM_END      		EQU	021FFh
    R0              		EQU	RAM_START + 000h
    R1              		EQU	RAM_START + 002h
    R2              		EQU	RAM_START + 004h
    R3              		EQU	RAM_START + 006h
    R4              		EQU	RAM_START + 008h
    R5              		EQU	RAM_START + 00Ah
    R6              		EQU	RAM_START + 00Ch
    R7              		EQU	RAM_START + 00Eh
    R8              		EQU	RAM_START + 010h
    FLAGS           		EQU	RAM_START + 012h
    GOP             		EQU	RAM_START + 013h
    RM1             		EQU	RAM_START + 014h
    RM2             		EQU	RAM_START + 015h
    RR1             		EQU	RAM_START + 016h
    RR2             		EQU	RAM_START + 017h
    _EADD            		EQU	RAM_START + 018h
    _EDAT            		EQU	RAM_START + 019h
    _X               		EQU	RAM_START + 01Ah
    R0 to RR2 are PBP system variables. _EADD, _EDAT and _X are variables I created. From looking at my .lst file I know 27 RAM locations are being used by my program.

    Program code size is also shown in the .lst file. Scroll down to the last line, and look at the hex number on the left.
    Code:
    + 00D0- 0008  return
    00D0h shows that my compiled program size was 209 words.

    If you use an editor like MicroCode Studio, it will show the compiled program size on the lower left of the screen.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Similar Threads

  1. Presetting Configuration Fuses (PIC Defines) into your Program
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 82
    Last Post: - 15th December 2013, 09:54
  2. Replies: 1
    Last Post: - 23rd May 2009, 09:22
  3. Compile and Program help using PICKit2
    By ozarkshermit in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 10th March 2009, 14:51
  4. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  5. PIC16F684 Program question
    By Nicholas in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th December 2006, 14:30

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts