Jump to content
Sign in to follow this  
crash_n_burn

Strange Memory Useage Report

Recommended Posts

Im using BoostC V5.6.1 with update 1.3 Alpha. The target device is a PIC 18F8720.

 

I looked in the .LST file to see the memory usage (ROM) of my project. I have the following :

 

Data from adresses 0x1000 to 0x1015 ( 22 bytes )

Data from adresses 0x2000 to 0x2E07 ( 3592 bytes )

Code from adresses 0xFC9A to 0xFFFF ( 870 bytes )

 

4484 bytes total if my calculations are ok.

 

 

The memory useage report shows this :

 

Memory Useage Report

====================

RAM available:3840 bytes, used:20 bytes (0.6%), free:3820 bytes (99.4%)

ROM available:65536 bytes, used:12653 bytes (19.4%), free:52883 bytes (80.6%)

 

 

It's not even near my calculations. Am I missing something ?

 

 

Also, the device has a program memory space of 131072 bytes ( adresses from 0 to 0x1FFFF ). Should we read 131072 bytes available instead of 65536 ? I know this CPU is using two bytes for each instruction but each adress is pointing to a byte not a word.

 

 

I can provide all my code and project files if you want to check the memory usage.

 

Thank you.

Share this post


Link to post
Share on other sites

I modified the location of the data in my project. I placed the data after the code :

 

Code from 0x0FC9A to 0x0FFFF (870 bytes)

Data from 0x11000 to 0x11015 (22 bytes)

Data from 0x12000 to 0x12E07 (3592 bytes)

 

Still 4484 bytes total.

 

 

And got a different memory usage report :

 

Memory Useage Report

====================

RAM available:3840 bytes, used:20 bytes (0.6%), free:3820 bytes (99.4%)

ROM available:65536 bytes, used:909 bytes (1.4%), free:64627 bytes (98.6%)

 

 

?

Share this post


Link to post
Share on other sites
Guest Dave

Crash,

 

MPLAB doesn't seem to work properly when memory addresses >64K are used - I find that at least breakpoints are affected.

Currently linker allocates memory from the top a tempoary artificial limit of 64K has been introduced so the resulting code can be assembled and run under MPLABS.

 

 

Also it look like something else here isn't making sense, so I would apprecitae you sending me the project and I will look into it further.

 

dave@picchip.com

 

Regards

Dave

Share this post


Link to post
Share on other sites

The files are in the mail.

 

This 64k limit could explain why i'm having other problems when I try to put too much data in the code memory space. In my example i have 3.5K of data. When I hit 6k of data or more the compiler sends me messages like : "error, missing right paren". I know this message is wrong because the compiler did it's job correcly a minute before with just less data in the memory space.

 

But why do you mention MPLAB ? I dont' use it. I'm using BoostC in the SourceBoost IDE.

 

 

Thank you for looking into this matter.

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...