Deleting unused variables
Posted: Sun Sep 16, 2007 10:41 am
1) What is the simplest way to purge out variables that are not actually being called? Can delete one by one and see if it gives an error message saying it’s actually used, but still don't know which bit of code is actually using them. Is there a quicker way?
2) I have managed to generate some strange unused variables with names like β€variable.variable’ and β€variable.Return.’ when setting up interrupt macros, but when I list the variables and try to delete or rename them they are unselectable for change. Why? What to do? Interesting that they are only listed when calling a list of variables in the macro where they were first generated. Other lists of variables, apart from when running the simulation, do not list them
Don’t know if there is any connection with all this and error messages I get when compiling. Do I need to be worried about any of these? Software seems to work OK despite them, although there are occasional corrupt characters on the LCD because it sometime rewrites the display before the last macro has finished writing the LCD. I am not worried about that as long as it clears itself, which it does.
Warning: Recursion may cause call stack overflow in function:'FCM_Pump_on_or_off'
Caution: argument of 'delay_10us' calls must have a value of 1 or more
Caution: Delay inaccurrate: 'delay_10us', Delay overhead:0.352ms, Unit delay:0.016ms, Delay resolution:8 units
.
Warning unreferenced functions removed:
FCD_LCDDisplay0_GetDefines in: C:\Documents and Settings\Chase\My Documents\PIC programmes\886v6.c
FCD_LCDDisplay0_PrintASCII in: C:\Documents and Settings\Chase\My Documents\PIC programmes\886v6.c
FCD_LCDDisplay0_Command in: C:\Documents and Settings\Chase\My Documents\PIC programmes\886v6.c
FCD_LCDDisplay0_RawSend in: C:\Documents and Settings\Chase\My Documents\PIC programmes\886v6.c
FCD_ADC0_ReadAsInt in: C:\Documents and Settings\Chase\My Documents\PIC programmes\886v6.c
FCD_ADC1_ReadAsInt in: C:\Documents and Settings\Chase\My Documents\PIC programmes\886v6.c
FCD_ADC2_ReadAsInt in: C:\Documents and Settings\Chase\My Documents\PIC programmes\886v6.c
FCD_ADC3_ReadAsInt in: C:\Documents and Settings\Chase\My Documents\PIC programmes\886v6.c
FCD_ADC4_ReadAsInt in: C:\Documents and Settings\Chase\My Documents\PIC programmes\886v6.c
FCD_ADC5_ReadAsInt in: C:\Documents and Settings\Chase\My Documents\PIC programmes\886v6.c
LCD_591656_Dummy_Function in: C:\Documents and Settings\Chase\My Documents\PIC programmes\886v6.c
Building CASM file
Serious Warning: Call stack usage exceeds:8!
Call Stack Usage Report
=======================
main and Task(s): hw used:7, exceeded by:0
interrupt: hw used:6, exceeded by:0
Serious Warning: Possible sw stack corruption, function 'FCM_Turn_power_up' called by more than one asynchronous thread (main/Task, interrupt, interrupt low)
Serious Warning: Possible sw stack corruption, function 'FCD_LCDDisplay0_PrintNumber' called by more than one asynchronous thread (main/Task, interrupt, interrupt low)
2) I have managed to generate some strange unused variables with names like β€variable.variable’ and β€variable.Return.’ when setting up interrupt macros, but when I list the variables and try to delete or rename them they are unselectable for change. Why? What to do? Interesting that they are only listed when calling a list of variables in the macro where they were first generated. Other lists of variables, apart from when running the simulation, do not list them
Don’t know if there is any connection with all this and error messages I get when compiling. Do I need to be worried about any of these? Software seems to work OK despite them, although there are occasional corrupt characters on the LCD because it sometime rewrites the display before the last macro has finished writing the LCD. I am not worried about that as long as it clears itself, which it does.
Warning: Recursion may cause call stack overflow in function:'FCM_Pump_on_or_off'
Caution: argument of 'delay_10us' calls must have a value of 1 or more
Caution: Delay inaccurrate: 'delay_10us', Delay overhead:0.352ms, Unit delay:0.016ms, Delay resolution:8 units
.
Warning unreferenced functions removed:
FCD_LCDDisplay0_GetDefines in: C:\Documents and Settings\Chase\My Documents\PIC programmes\886v6.c
FCD_LCDDisplay0_PrintASCII in: C:\Documents and Settings\Chase\My Documents\PIC programmes\886v6.c
FCD_LCDDisplay0_Command in: C:\Documents and Settings\Chase\My Documents\PIC programmes\886v6.c
FCD_LCDDisplay0_RawSend in: C:\Documents and Settings\Chase\My Documents\PIC programmes\886v6.c
FCD_ADC0_ReadAsInt in: C:\Documents and Settings\Chase\My Documents\PIC programmes\886v6.c
FCD_ADC1_ReadAsInt in: C:\Documents and Settings\Chase\My Documents\PIC programmes\886v6.c
FCD_ADC2_ReadAsInt in: C:\Documents and Settings\Chase\My Documents\PIC programmes\886v6.c
FCD_ADC3_ReadAsInt in: C:\Documents and Settings\Chase\My Documents\PIC programmes\886v6.c
FCD_ADC4_ReadAsInt in: C:\Documents and Settings\Chase\My Documents\PIC programmes\886v6.c
FCD_ADC5_ReadAsInt in: C:\Documents and Settings\Chase\My Documents\PIC programmes\886v6.c
LCD_591656_Dummy_Function in: C:\Documents and Settings\Chase\My Documents\PIC programmes\886v6.c
Building CASM file
Serious Warning: Call stack usage exceeds:8!
Call Stack Usage Report
=======================
main and Task(s): hw used:7, exceeded by:0
interrupt: hw used:6, exceeded by:0
Serious Warning: Possible sw stack corruption, function 'FCM_Turn_power_up' called by more than one asynchronous thread (main/Task, interrupt, interrupt low)
Serious Warning: Possible sw stack corruption, function 'FCD_LCDDisplay0_PrintNumber' called by more than one asynchronous thread (main/Task, interrupt, interrupt low)