Advanced Minds

  • Decrease font size
  • Default font size
  • Increase font size
  • default color
  • red color
  • green color
FireBoard
Welcome, Guest
Please Login or Register.    Lost Password?
adding in c programing MPLAB IDE: C Programming: Using watch function for symbols (1 viewing) (1) Guests
Go to bottom Post Reply Favoured: 0
TOPIC: adding in c programing MPLAB IDE: C Programming: Using watch function for symbols
#8617
adding in c programing MPLAB IDE: C Programming: Using watch function for symbols  
- Hide quoted text -- Show quoted text -
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#8618
Zachary Noyes (Visitor)
Click here to see the profile of this user
Birthdate:
adding in c programing MPLAB IDE: C Programming: Using watch function for symbols  
I am using PICC Lite software with MPLAB IDE. I write some code and try to get a watch for the variables that I create. I can add watches for built in registers (using 16F877 setup), but cannot click the Add Symbol button because it is gray (does nothing when clicked). I read from the website http://www.microchipc.com/ That I need to add the switch '-fakelocal' to the _link_er options. I click project, build, project and it opens a dialog. There is a text box with _link_er options label at the bottom. I add the text, but the project build fails and says that it doesn't recognize that command. What is going on with my innability to add symbol names from the program (I set the variables up as unsigned chars)? Thanks.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#8619
Marcel Duchamp (Visitor)
Click here to see the profile of this user
Birthdate:
adding in c programing MPLAB IDE: C Programming: Using watch function for symbols  
I am using PICC Lite software with MPLAB IDE. I write some code and try to get a watch for the variables that I create. I can add watches for built in registers (using 16F877 setup), but cannot click the Add Symbol button because it is gray (does nothing when clicked). I read from the website http://www.microchipc.com/ That I need to add the switch '-fakelocal' to the _link_er options. I click project, build, project and it opens a dialog. There is a text box with _link_er options label at the bottom. I add the text, but the project build fails and says that it doesn't recognize that command. What is going on with my innability to add symbol names from the program (I set the variables up as unsigned chars)? Thanks. I saw this in the past and for me, the issue was related to how variables were being declared.  I was working with assembly code in absolute mode.  Depending on whether variables were declared with CBLOCK  or RES keywords, they either would or wouldn't show up in the Add Symbol drop-down dialog box.  I can't remember which way worked but if you knock up a quick sample project, you can test and see which way works.  It *was* baffling at first.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#8620
adding in c programing MPLAB IDE: C Programming: Using watch function for symbols  
I have not used PICC Lite, but have instead used Microchip's C18 and C30. Someone pointed out that optimization may cause variables to disappear. I have not seen that, but have seen wild program line execution order when single stepping if I have full optimization on. For debug, I either turn off optimization or set it to debug. I am also not familiar with the fakelocal flag, but I expect that it makes local variables static instead of automatic so they have a permanent location in RAM instead of a location on the stack. You do not indicate whether the problem is with global or local variables (apparently it's with both since you have the button grayed out). I have not ever seen that happen. With C18 and C30, local variables are visible in the watch window when you are in the function they are defined in. If you step outside the function, the watch window says they are out of scope. Global variables are always visible. So... Since I have not use PICC Lite, I am not really answering your question. There are some general comments on the watch window, though. Good luck! Harold
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#8621
John Temples (Visitor)
Click here to see the profile of this user
Birthdate:
adding in c programing MPLAB IDE: C Programming: Using watch function for symbols  
I am using PICC Lite software with MPLAB IDE. I write some code and try to get a watch for the variables that I create. I can add watches for built in registers (using 16F877 setup), but cannot click the Add Symbol button because it is gray (does nothing when clicked). I read from the website http://www.microchipc.com/ That I need to add the switch '-fakelocal' to the _link_er options. I click project, build, project and it opens a dialog. There is a text box with _link_er options label at the bottom. I add the text, but the project build fails and says that it doesn't recognize that command. The fakelocal flag was deprecated several years ago.  microchipc.com generally has lots of obsolete and incorrect information.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#8622
Herbert Graf (Visitor)
Click here to see the profile of this user
Birthdate:
adding in c programing MPLAB IDE: C Programming: Using watch function for symbols  
I am using PICC Lite software with MPLAB IDE. I write some code and try to get a watch for the variables that I create. I can add watches for built in registers (using 16F877 setup), but cannot click the Add Symbol button because it is gray (does nothing when clicked). I read from the website http://www.microchipc.com/ That I need to add the switch '-fakelocal' to the _link_er options. I click project, build, project and it opens a dialog. There is a text box with _link_er options label at the bottom. I add the text, but the project build fails and says that it doesn't recognize that command. What is going on with my innability to add symbol names from the program (I set the variables up as unsigned chars)? Thanks. Welcome to C! A problem I've had is you have to remember that in C variables have a scope , meaning they exist only when the code they are in scope with is running (unless you modify the scope, i.e. declaring a variable outside of all code blocks, that effectively makes them global variables). In your case, you have to stop your execution in the section of code where that variable exists, add it, and then continue or reset. This might not be your problem, but it is a common thing that people forget. TTYL
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop
905 authorization failed nieautoryzowano no auth sprawdz autoryzacje
dive in tours laos to dive tours of laos free web analytics job board