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 CCS Technical Support

DSPIC HEX FILE

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



Joined: 18 Nov 2008
Posts: 281
Location: Athens, Greece.

View user's profile Send private message

DSPIC HEX FILE
PostPosted: Tue Nov 18, 2014 7:34 am     Reply with quote

Hello,

I am using a DSPIC33FJ64GP802.

I would like to know if I place this in the code:

Code:
const int Test[]={125,126,127,128};


Can I find these values in the hex file so that I can modify them without having to re compile?

Thanks!
_________________
George.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Nov 19, 2014 12:03 am     Reply with quote

You can #org it at a specified address. See this thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=51976
Then you can look in the hex file at that address.
georpo



Joined: 18 Nov 2008
Posts: 281
Location: Athens, Greece.

View user's profile Send private message

PostPosted: Thu Nov 20, 2014 1:19 am     Reply with quote

Hello and thanks for the reply.

I used
Code:
#ROM 0XA000 = {0X0A,0X0B,0X0C}


and I can see the values in the hex file.

Now, how can I read these values during runtime?
_________________
George.
Ttelmah



Joined: 11 Mar 2010
Posts: 19546

View user's profile Send private message

PostPosted: Thu Nov 20, 2014 7:09 am     Reply with quote

Not as easily as a variable. You have to use the read_program_memory command.
Look at the #ORG solution, PCM_Programmer has already given. Makes the code a lot simpler.
You can also find 'where' a const is without ORG, by using 'label_address', which will tell you where it is, but this is only useable in the code.
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