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

How do I change the value in "windows watches" MPL
Goto page 1, 2  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
sergioigel



Joined: 13 Aug 2010
Posts: 26
Location: RJ/Brazil

View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger

How do I change the value in "windows watches" MPL
PostPosted: Fri May 03, 2019 9:53 am     Reply with quote

Hi,
How do I change the value in "windows watches" MPLABX ?
using simulator...
thanks,
Ttelmah



Joined: 11 Mar 2010
Posts: 19504

View user's profile Send private message

PostPosted: Fri May 03, 2019 10:43 am     Reply with quote

Ask on the MPLAB forum.

MPLAB is nothing to do with CCS, so you need to ask on the forum
for questions about this, not here.
sergioigel



Joined: 13 Aug 2010
Posts: 26
Location: RJ/Brazil

View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger

PostPosted: Fri May 03, 2019 11:42 am     Reply with quote

Ttelmah wrote:
Ask on the MPLAB forum.

MPLAB is nothing to do with CCS, so you need to ask on the forum
for questions about this, not here.


ok....sorry
sergioigel



Joined: 13 Aug 2010
Posts: 26
Location: RJ/Brazil

View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger

PostPosted: Wed May 08, 2019 11:32 am     Reply with quote

Ttelmah wrote:
Ask on the MPLAB forum.

MPLAB is nothing to do with CCS, so you need to ask on the forum
for questions about this, not here.


hi,
microchip response:
"Sometimes compilers optimize variables."
...
ccs optimizes this?
and that's why I can not change the values?
dluu13



Joined: 28 Sep 2018
Posts: 395
Location: Toronto, ON

View user's profile Send private message Visit poster's website

PostPosted: Wed May 08, 2019 12:35 pm     Reply with quote

If it's a optimization level that is causing your problem, then you can try this:

Project Properties -> CCS C Compiler -> Compiler Options

Then in the right side of the window, you should be a Optimization Level option that you can change.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed May 08, 2019 3:00 pm     Reply with quote

Here is his thread on the Microchip forum, so you can read more
information about his problem:
https://www.microchip.com/forums/m1096782.aspx
Ttelmah



Joined: 11 Mar 2010
Posts: 19504

View user's profile Send private message

PostPosted: Thu May 09, 2019 12:21 am     Reply with quote

OK. I just ran up MPLABX, and played with this.

What you do is there is a little grey square just right of the value.
Click this.
It's totally silly the value is sitting there and you would expect to be
able to change it but you can't. However click on this little square and
it pops up a window, where you can change it.
Brilliant design.....
sergioigel



Joined: 13 Aug 2010
Posts: 26
Location: RJ/Brazil

View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger

PostPosted: Thu May 09, 2019 11:00 am     Reply with quote

dluu13 wrote:
If it's a optimization level that is causing your problem, then you can try this:

Project Properties -> CCS C Compiler -> Compiler Options

Then in the right side of the window, you should be a Optimization Level option that you can change.


hi, I try to change the value in Optimization Level. it was at 9 and I changed it to 0 and then to 5 and it did not work. keeps blocking me from changing the value of the variable
sergioigel



Joined: 13 Aug 2010
Posts: 26
Location: RJ/Brazil

View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger

PostPosted: Thu May 09, 2019 11:01 am     Reply with quote

PCM programmer wrote:
Here is his thread on the Microchip forum, so you can read more
information about his problem:
https://www.microchip.com/forums/m1096782.aspx


this is my thread, I started it there.
sergioigel



Joined: 13 Aug 2010
Posts: 26
Location: RJ/Brazil

View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger

PostPosted: Thu May 09, 2019 11:02 am     Reply with quote

Ttelmah wrote:
OK. I just ran up MPLABX, and played with this.

What you do is there is a little grey square just right of the value.
Click this.
It's totally silly the value is sitting there and you would expect to be
able to change it but you can't. However click on this little square and
it pops up a window, where you can change it.
Brilliant design.....


for some reason I can not change the value of a variable
Ttelmah



Joined: 11 Mar 2010
Posts: 19504

View user's profile Send private message

PostPosted: Thu May 09, 2019 12:54 pm     Reply with quote

Seriously, take a step back.
Try a very simple program. One variable, and see if you can change this.

Understand that watch values are not 'live' when the code is outside
the routine in which they are declared. So if you call a function and
return, with a watch declared on a variable inside this function, the watch
will show the value it had when you left the function, but it cannot then be accessed at all. Only when the code is in the function that generates/controls
it. MPLAB will normally switch to saying 'out of scope' when you leave the
function, but some types of variable it does still show.

It is the little square right at the left of the window. Make sure you are seeing
this. It can go off the left edge of the screen and have to be scrolled back.
The one earlier, affects the address of the variable, and you can't change
this.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu May 09, 2019 12:56 pm     Reply with quote

Click on the "Halt" button to stop the simulator from running. Then you
can change the value. I tested this just now with the LATC register and
it worked.

Click on the little box to the right of the "Value" number.
The little box looks like this:
Code:

-----
|...|
-----

Then a window will pop up with the current value, such as 0x00.
Backspace over it. Then type in a new value, such as 0x55 and click on
the OK button. It should work.
Ttelmah



Joined: 11 Mar 2010
Posts: 19504

View user's profile Send private message

PostPosted: Thu May 09, 2019 1:39 pm     Reply with quote

Aaargh!....

Never considered the possibility somebody would try to change a value while
the processor was actually running....
sergioigel



Joined: 13 Aug 2010
Posts: 26
Location: RJ/Brazil

View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger

PostPosted: Fri May 10, 2019 11:17 am     Reply with quote

I tried all these alternatives and it did not work.
In the old MPLAB v8.92 it worked perfectly.
Even EEPROM values I could change,
but in MPLAB-X it does not change any value.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri May 10, 2019 11:31 am     Reply with quote

I don't think we can do anything more to help you.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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