View previous topic :: View next topic |
Author |
Message |
linuxpenguin
Joined: 19 May 2009 Posts: 2
|
Manually setting RAM address for variables |
Posted: Mon Feb 22, 2010 11:43 am |
|
|
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
|
|
Posted: Mon Feb 22, 2010 12:13 pm |
|
|
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
|
|
Posted: Mon Feb 22, 2010 12:47 pm |
|
|
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! |
|
|
|