CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Manually setting RAM address for variables

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
linuxpenguin



Joined: 19 May 2009
Posts: 2

View user's profile Send private message

Manually setting RAM address for variables
PostPosted: Mon Feb 22, 2010 11:43 am     Reply with quote

Hi Guys,

Sorry if this has been covered elsewhere, I searched for awhile but I wasn't able to find anything related to this.

I am using PCD on the DSPIC/PIC24F series chips and am wondering if there is any way to force a variable into a specific part of memory (RAM). I want to make use of the special boot-loader protected area of RAM (Yes, I know there is a boot protected area for flash ROM, I am referring to the enhanced RAM protection portion available on the DSPIC33FJ series chips).

The boot-RAM protected area only covers the first several hundred bytes of memory if enabled and I have variables I'd like to force into those areas.

I know how to force program memory into specific parts of ROM using #org, is there a similar tool / method for reliably redirecting RAM locations? I realize this can get a little tricky since all of the memory addresses for the "userland" code will need to be offset so they don't fight with the bootloader variables, but I'm looking to know if I have the option.

Thanks!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Feb 22, 2010 12:13 pm     Reply with quote

Quote:

I know how to force program memory into specific parts of ROM using
#org, is there a similar tool / method for reliably redirecting RAM locations?

Look in the Memory Control section of the PCD manual. It lists the
directives which allow you to control the address of RAM variables.
http://www.ccsinfo.com/downloads/PCDReferenceManual.pdf
linuxpenguin



Joined: 19 May 2009
Posts: 2

View user's profile Send private message

PostPosted: Mon Feb 22, 2010 12:47 pm     Reply with quote

PCM programmer wrote:
Quote:

I know how to force program memory into specific parts of ROM using
#org, is there a similar tool / method for reliably redirecting RAM locations?

Look in the Memory Control section of the PCD manual. It lists the
directives which allow you to control the address of RAM variables.
http://www.ccsinfo.com/downloads/PCDReferenceManual.pdf


Ahha, I believe I was looking at an old version of the PCD reference manual. Thanks for the tip. #locate should work fine for my purposes.

Thanks!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group