Searching \ for '[PIC]: How do I get variable names to show up in 6' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/microchip/devices.htm?key=pic
Search entire site for: 'How do I get variable names to show up in 6'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: How do I get variable names to show up in 6'
2003\04\17@212649 by James Williams

picon face
Hello,

Can someone please tell me how I can get variable labels to show up in
MPLAb 6.x watch window.  None of my labels for the variables ram show up
in the drop down list.  The only thing that shows up is the labels for
routines.

I have try to declare my variables as follows:
FLAGS5            EQU 0X101

However they the label FLAGS5 does not show up in the watch window.
Now, I have to remember all of my hex addresses for the variables in
order to watch the contents of those registers.  I have some 200 bytes
of global variables declared.

Thanks,

James


--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2003\04\17@231347 by Jinx

face picon face
> However the label FLAGS5 does not show up in the watch window.
> Now, I have to remember all of my hex addresses for the variables in
> order to watch the contents of those registers.  I have some 200 bytes
> of global variables declared.

If you right-click on any of the Address, Symbol Name or Value field
headers you can tick/untick them for display

My gripe with Watch (probably my fault because there's a control
I haven't found), is that the Add Symbol pull-down shows just 4
variables at a time, and scrolling through is a pain. Not a big job
but still a pain

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2003\04\17@235344 by Quentin

flavicon
face
>
>
>My gripe with Watch (probably my fault because there's a control
>I haven't found), is that the Add Symbol pull-down shows just 4
>variables at a time, and scrolling through is a pain. Not a big job
>but still a pain
>
Tip: After you've opened the pull down, type in the first few letters
of  the register. That is with 6.20 AFIAK with 6.1x, you can only enter
the first letter.

Quentin

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2003\04\17@235352 by Ned Konz

flavicon
face
On Thursday 17 April 2003 06:25 pm, James Williams wrote:

> Can someone please tell me how I can get variable labels to show up
> in MPLAb 6.x watch window.  None of my labels for the variables ram
> show up in the drop down list.  The only thing that shows up is the
> labels for routines.
>
> I have try to declare my variables as follows:
> FLAGS5            EQU 0X101
>
> However they the label FLAGS5 does not show up in the watch window.
> Now, I have to remember all of my hex addresses for the variables
> in order to watch the contents of those registers.  I have some 200
> bytes of global variables declared.

You didn't declare a variable; you just defined a numeric constant.

Have you tried actually using RES and relocatable objects so your
names get into the map?

--
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2003\04\18@004607 by Jinx

face picon face
> Tip: After you've opened the pull down, type in the first few letters
> of  the register. That is with 6.20 AFIAK with 6.1x, you can only enter
> the first letter.

That does work with 6.0.20.0 and I've used it to jump to a position
in the list where there might be variables with similar names, eg
result1, result2, result3 etc. What I was hoping for was a bigger
window - "I'll have that one, and that one, those two.........", as you
can when selecting files in a folder with CTRL-click or boxing

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2003\04\18@050230 by Quentin

flavicon
face
>
>
>That does work with 6.0.20.0 and I've used it to jump to a position
>in the list where there might be variables with similar names, eg
>result1, result2, result3 etc. What I was hoping for was a bigger
>window - "I'll have that one, and that one, those two.........", as you
>can when selecting files in a folder with CTRL-click or boxing
>
Ah yes, I would like that as well. Maybe with MPlab V10.00 we'll have it.
;)
Quentin

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2003\04\18@073313 by Bob Ammerman

picon face
If you have Microsoft Visual Studio you can probably open the program 'as
resources', find the offending drop-down list, stretch its open state out
further, and then save it back.

You'll have to repeat the process with each new version.

Bob Ammerman
RAm Systems

{Original Message removed}

2003\04\18@084014 by Olin Lathrop

face picon face
> None of my labels for the variables ram show up
> in the drop down list.  The only thing that shows up is the labels for
> routines.
>
> I have try to declare my variables as follows:
> FLAGS5            EQU 0X101
>
> However they the label FLAGS5 does not show up in the watch window.

That's because it's not a label, just a symbolic constant.  As has been
said *many* times here before, "allocating" RAM with EQU statements is a
bad idea and very bad programming practise.  This is not a PIC issue, but
a general programming and common sense issue.

The proper way to allocate RAM is with the RES directive.  MPLAB will then
understand those symbols to be RAM addresses, and will allow you to use
them in watch windows, for example.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2003\04\18@093241 by Jinx

face picon face
> > I have try to declare my variables as follows:
> > FLAGS5            EQU 0X101
> >
> > However the label FLAGS5 does not show up in the watch window.
>
> That's because it's not a label, just a symbolic constant

flags5  equ 0x20  (first RAM in an F628)

does show Address, Name and Value in a Watch window

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2003\04\18@144542 by Andrew Warren

flavicon
face
Olin Lathrop <spam_OUTPICLISTTakeThisOuTspammitvma.mit.edu> wrote:

> > I have try to declare my variables as follows:
> > FLAGS5            EQU 0X101
> >
> > However they the label FLAGS5 does not show up in the watch window.
>
> That's because it's not a label, just a symbolic constant.

   No, Olin, that's not why.  30 seconds spent actually trying it
   would show you that the watch window WILL show registers whose
   names are assigned with EQU.

> As has been said *many* times here before,

   ... by you, anyway...

> "allocating" RAM with EQU statements is a bad idea and very bad
> programming practise. .... The proper way to allocate RAM is with
> the RES directive.

   RES is one way, EQU is another, CBLOCK is a third.  I see no
   compelling reason for anyone to switch from absolute mode to
   relocatable just for the RES directive.

   -Andy

=== Andrew Warren -- .....aiwKILLspamspam@spam@cypress.com
=== Principal Design Engineer
=== Cypress Semiconductor Corporation
===
=== Opinions expressed above do not
=== necessarily represent those of
=== Cypress Semiconductor Corporation

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2003\04\18@150422 by Ned Konz

flavicon
face
On Thursday 17 April 2003 08:51 pm, I wrote:
> On Thursday 17 April 2003 06:25 pm, James Williams wrote:
> > Can someone please tell me how I can get variable labels to show
> > up in MPLAb 6.x watch window.  None of my labels for the
> > variables ram show up in the drop down list.  The only thing that
> > shows up is the labels for routines.
> >
> > I have try to declare my variables as follows:
> > FLAGS5            EQU 0X101
> >
> > However they the label FLAGS5 does not show up in the watch
> > window. Now, I have to remember all of my hex addresses for the
> > variables in order to watch the contents of those registers.  I
> > have some 200 bytes of global variables declared.
>
> You didn't declare a variable; you just defined a numeric constant.
>
> Have you tried actually using RES and relocatable objects so your
> names get into the map?

It looks like EQUs also get into the map. I didn't notice this as I
almost always use RES and relocatable objects.

Have you tried typing the name into the "Add symbol" combo box in the
watch window? Once you see your label, just hit the adjacent button.

Or you can type the name into the "Symbol name" column in the first
empty slot in the display window.

Sorry to steer you wrong.
--
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2003\04\18@160441 by Olin Lathrop

face picon face
Andrew Warren wrote:
>     No, Olin, that's not why.  30 seconds spent actually trying it
>     would show you that the watch window WILL show registers whose
>     names are assigned with EQU.

Maybe that's a version 6 thing.  I just verified that symbols defined with
EQU that have valid values for RAM addresses are definitely not available
in the list of symbols to display in a watch window in version 5.

>     RES is one way, EQU is another, CBLOCK is a third.  I see no
>     compelling reason for anyone to switch from absolute mode to
>     relocatable just for the RES directive.

There are lots of compelling reasons for relocatable mode.  I can see how
some of the old timers may want to keep writing absolute code because
that's all that was available when they started and want to keep their
system in place.  If you've got lots of PIC experience and know what you
are doing, do whatever is comfortable for you.  However, recommending
absolute mode to newbies is just plain irresponsible.

Beyond that there are clear advantages of CBLOCK over EQU and RES over
CBLOCK for defining RAM address symbols.  EQU merely sets a symbol to a
value.  The assembler has absolutely no idea that you think of that value
as being a RAM location.  There is no mechanism to prevent multiple RAM
variables from being "allocated" at the same address by accident.  CBLOCK
is a little better in that it causes symbolic contants to be created with
sequential values.  However, these are still just arbitrary constants, and
CBLOCK only keeps one "last assigned" value.  This makes it difficult to
use with different RAM regions (access bank, global 16 family ram from
70h - 7F, etc) or fragmented banks.

RES is the only means in MPASM to actually *allocate* RAM.  One RAM
location can not be allocated more than once, no matter how many RES
directives there are scattered between modules.  Since the allocation is
actually done in the linker, RAM is allocated separately from each
section, like access bank, global RAM, etc.

Now c'mon Andy, you know all this.  This is right out of Introduction to
Software 101.  You clearly like to find faults with my posts whenever you
can, but let's not let that get in the way of good advice to newbies who
don't have the familiarity and long history with PICs that you have.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2003\04\18@173100 by James Williams

picon face
Yes, I have also tried the following:
USHARE
FLAGS5 RES 1

But it still does not show in the drop down in the watch window.  In
MPLAB, the defined constants always showed up in the watch window.



{Original Message removed}

2003\04\18@174643 by James Williams

picon face
What is really annoying is that all my jump labels show up in the watch
window.  This to me seems pointless.

Ok, I am using relocatable objects in my project.  In fact, my project
has some 50 relocatable object files.  I have my variables declared in a
single include file.  The file is listed below.  I include this file in
each asm file which makes up my application.  Also as can be seen, I use
CBLOCK to define my variable registers.  However, the watch window
simple does not show these labels in the symbol drop down box.

Sorry for the long message.
;==========================================================
;File Name:     MotionData.inc
;Author:        James Williams
;Created:       02/01/2002
;Description:
;       This file contains all the data variable allocations.
;       Plus any bit definitions.
;Modified:
;==========================================================

IFNDEF GLOBVAR
#DEFINE GLOBVAR
#DEFINE __DEBUG
       LIST P=18F452 ERRORLEVEL -302
       ;All global variables are contained in bank 2 0x100 of ram.
       CBLOCK 0x100
       MOTION_STATE                    ;Holds signal state information
       FLAGS1
       FLAGS2
       ACCELFLAGS
       NUM_PACKETS_L,NUM_PACKETS_H,NUM_PACKETS_U
       PACKET_CNTR
       HOME_POSX_L,HOME_POSX_H,HOME_POSX_U
       HOME_POSY_L,HOME_POSY_H,HOME_POSY_U
       HOME_POSZ_L,HOME_POSZ_H
       PARK_POSX_L,PARK_POSX_H,PARK_POSX_U
       PARK_POSY_L,PARK_POSY_H,PARK_POSY_U
       PARK_POSZ_L,PARK_POSZ_H
       CUR_POSX_L,CUR_POSX_H,CUR_POSX_U
       CUR_POSY_L,CUR_POSY_H,CUR_POSY_U
       CUR_POSZ_L,CUR_POSZ_H
       DESTX_L,DESTX_H,DESTX_U
       DESTY_L,DESTY_H,DESTY_U
       DESTZ_L,DESTZ_H
       MAG_MIDPOINT_L,MAG_MIDPOINT_H,MAG_MIDPOINT_U
       ACCEL_DIST_L,ACCEL_DIST_H,ACCEL_DIST_U
       DECEL_DIST_L,DECEL_DIST_H,DECEL_DIST_U
       FXLIMIT_L,FXLIMIT_H,FXLIMIT_U
       BXLIMIT_L,BXLIMIT_H,BXLIMIT_U
       FYLIMIT_L,FYLIMIT_H,FYLIMIT_U
       BYLIMIT_L,BYLIMIT_H,BYLIMIT_U
       FZLIMIT_L,FZLIMIT_H
       BZLIMIT_L,BZLIMIT_H
       XOFFSET_L,XOFFSET_H
       YOFFSET_L,YOFFSET_H
       ZOFFSET_L,ZOFFSET_H
       HOMERATE_L,HOMERATE_H
       FEEDRATE_L,FEEDRATE_H
       RAPIDRATE_L,RAPIDRATE_H
       JOGRATE_L,JOGRATE_H
       JOGSLOW_L,JOGSLOW_H
       JOG_INTERVAL
       XMICRO_ERR
       AXIS_REG
       AUXILARY_REG
       TRICKEL_FREQ_PERIOD,TRICKEL_PRESCALE
       WORK_FREQ_PERIOD,WORK_PRESCALE
       TRICKEL_DUTY_L,TRICKEL_DUTY_H
       WORK_DUTY_L,WORK_DUTY_H
       XPIX_UNIT,XPIX_CNTR,XPIX_EXTRA
       YPIX_UNIT,YPIX_CNTR,YPIX_EXTRA
       MOTIONRATE_L,MOTIONRATE_H
       PREVIOUSRATE_L,PREVIOUSRATE_H
       ACCELMOTION_L,ACCELMOTION_H
       ACCELRATE_L,ACCELRATE_H
       DECCELRATE_L,DECCELRATE_H
       EPS_ERR1_L,EPS_ERR1_H,EPS_ERR1_U
       EPS_ERR2_L,EPS_ERR2_H,EPS_ERR2_U
       A_ARG_L,A_ARG_H,A_ARG_U
       B_ARG_L,B_ARG_H,B_ARG_U
       TXDATAPTR_L,TXDATAPRT_H
       TXSIZE
       AUTO_CONTROLS
       TIMEOUT_L,TIMEOUT_H
       DELTA1_L,DELTA1_H,DELTA1_U
       DELTA2_L,DELTA2_H,DELTA2_U
       DELTA3_L,DELTA3_H,DELTA3_U
       DELTA_CHECK_L,DELTA_CHECK_H,DELTA_CHECK_U
       DELTA_ADJ_L,DELTA_ADJ_H,DELTA_ADJ_U
       DELTA2_ADJ_L,DELTA2_ADJ_H,DELTA2_ADJ_U
       MAJOR_AXIS,MINOR1_AXIS,MINOR2_AXIS
       INCDEC_REG
       ;Raster varibles
       RASTER_FLAGS
       RASTER_BEGIN_X,RASTER_BEGIN_X_H,RASTER_BEGIN_X_U
       RASTER_BEGIN_Y,RASTER_BEGIN_Y_H,RASTER_BEGIN_Y_U
       RASTER_END_X,RASTER_END_X_H,RASTER_END_X_U
       RASTER_NUM_PIXELS,RASTER_NUM_PIXELS_H,RASTER_NUM_PIXELS_U
       RASTER_NEXTX,RASTER_NEXTX_H,RASTER_NEXTX_U
       RST_BEGIN_ACC_POS,RST_BEGIN_ACC_POSH,RST_BEGIN_ACC_POSU
       RST_BEGIN_DECC_POS,RST_BEGIN_DECC_POSH,RST_BEGIN_DECC_POSU
       STATE_REG,ACCELCLK_L,ACCELCLK_H
       ENDC
       CBLOCK  0x0000
       COMMAND_ID
       CMDDATA1,CMDDATA2,CMDDATA3
       CMDDATA4,CMDDATA5,CMDDATA6
       CMDDATA7,CMDDATA8,CMDDATA9
       CMDDATA10,CMDDATA11,CMDDATA12
       CMDDATA13,CMDDATA14,CMDDATA15,CMDDATA16
       CMDDATA17,CMDDATA18,CMDDATA19,CMDDATA20
       SWSTACK         ;Beginning of software stack.
       ENDC

;Below is associationed definitions for the first byte of each 2 or more
byte variable
XHOME                   EQU HOME_POSX_L
YHOME                   EQU HOME_POSY_L
ZHOME                   EQU HOME_POSZ_L
XPARK                   EQU PARK_POSX_L
YPARK                   EQU PARK_POSY_L
ZPARK                   EQU PARK_POSZ_L
NUM_PACKETS             EQU NUM_PACKETS_L
CUR_POSITION_X  EQU CUR_POSX_L
CUR_POSITION_Y  EQU CUR_POSY_L
CUR_POSITION_Z  EQU CUR_POSZ_L
DELTA_X                 EQU DELTA1_L
DELTA_Y         EQU DELTA2_L
DELTA_Z         EQU DELTA3_L
MAG_MIDPOINT    EQU MAG_MIDPOINT_L
ACCEL_DISTANCE  EQU ACCEL_DIST_L
DECEL_DISTANCE  EQU DECEL_DIST_L
FORWARD_LIMITX  EQU FXLIMIT_L
BACK_LIMITX             EQU BXLIMIT_L
FOWARD_LIMITY   EQU FYLIMIT_L
BACK_LIMITY             EQU BYLIMIT_L
FORWARD_LIMITZ  EQU FZLIMIT_L
BACK_LIMITZ             EQU BZLIMIT_L
X_OFFSET                EQU XOFFSET_L
Y_OFFSET                EQU YOFFSET_L
Z_OFFSET                EQU ZOFFSET_L
HOMERATE                EQU HOMERATE_L
FEEDRATE                EQU FEEDRATE_L
RAPIDRATE               EQU RAPIDRATE_L
JOGRATE                 EQU     JOGRATE_L
JOGSLOW                 EQU     JOGSLOW_L
X_PIXEL_INTERV  EQU     XPIX_UNIT
Y_PIXEL_INTERV  EQU YPIX_UNIT
MOTIONRATE              EQU MOTIONRATE_L
ACCELMOTION             EQU ACCELMOTION_L
A_ARG                   EQU A_ARG_L
B_ARG                   EQU B_ARG_L
DELTA1                  EQU DELTA1_L
DELTA2                  EQU DELTA2_L
EPS_ERR1                EQU     EPS_ERR1_L
EPS_ERR2                EQU EPS_ERR2_L
DELTA_ADJ               EQU     DELTA_ADJ_L
A_Arg                   EQU A_ARG_L
B_Arg                   EQU B_ARG_L
;Register flag bits
;MOTION STATE
#DEFINE XCW_DIR                 0       ;Signal to cause a left to right
motion
#DEFINE XDIR_STATE              1       ;Current x direction state
#DEFINE YCW_DIR                 2       ;Signal to cause a right to left
motion
#DEFINE YDIR_STATE              3       ;Current y direction state
#DEFINE ZCW_DIR                 4       ;Signal to cause a down motion
#DEFINE ZDIR_STATE              5       ;Current z direction state
#DEFINE TEST_LIMITS             6       ;Indicates where to test the
limits on each move.
#DEFINE USE_SOFT_LIMITS 7       ;Indicates to check soft limits on each
unit move.

;Acceleration flags
#DEFINE ACCEL_RAPID             0       ;Should we accelerate through
rapid move
#DEFINE ACCELERATE              1       ;Should we accelerate for feed
move
#DEFINE ACCELACTIVE             2       ;Is acceleration in progress
#DEFINE DECEL_RAPID             3       ;Should we decelerate through
rapid move
#DEFINE DECELERATE              4       ;Should we decelerate through
feed move
#DEFINE DECEL_ACTIVE    5       ;Is deceleration in progress
#DEFINE ACCEL_SKIP              6       ;Skip adjust every other clock
cycle.
;Flags1 register
#DEFINE DATA_AVAILABLE  7       ;Lets main application loop know that
data is available
#DEFINE FLG_MT_MAJOR    6       ;Indicates that the major axis is to
make a step on timer.
#DEFINE FLG_MT_MINOR1   5       ;Indicates that first minor axis is to
make a step on timer.
#DEFINE FLG_MT_MINOR2   4       ;Indicates that second minor axes is to
make a step on timer.
#DEFINE FLG_RUNNING             3       ;A job is currently running:
either from the host pc or handheld
#DEFINE FLG_SERIAL              2       ;Indicates a serial request
command.
#DEFINE FLG_SERIAL_EN   1       ;Serial device is enabled.
#DEFINE FLG_MODE                0       ;Device mode. 0=Vector,
1=Raster.

;Flags2 Register
#DEFINE FLG2_RSTR_DIR   0       ;Indicates during of current raster
operation 0=reverse, 1=forward
#DEFINE FLG2_RSTR_MT    1       ;Indicates that current motion is part
of raster operation
#DEFINE FLG2_RSTR_NEXT  2       ;Set this flag to indicate that raster
loop routine can read next line.
#DEFINE FLG2_TST_MID    3       ;Test for midpoint. Used to initial
decceleration.
#DEFINE FLG2_RST_RELOC  4       ;Indicates that the raster operation
must relocate for acceleration.
#DEFINE FLG2_RST_BILEV  5       ;Indicates that the raster data is
bi-level and byte packed.
#DEFINE FLG2_X                  6
#DEFINE FLG2_RECORD_LMT 7       ;This is used to indicate that the find
routine record position
                                                       ;insted of
loading positions.
;State_Reg flags
#DEFINE SREG_XSENSOR    0       ;0 = left 1 = right
#DEFINE SREG_YSENSOR    1       ;0 = front (y=0) 1 = back (y=table
depth)
#DEFINE SREG_ZSENSOR    2       ;0 = up 1 = down
#DEFINE SREG_1                  3
#DEFINE SREG_2                  4
#DEFINE SREG_3                  5
#DEFINE SREG_4                  6
#DEFINE SREG_5                  7
;Motion profile flags from command
#DEFINE FLG_XDIR                0       ;Indicates x direction request.
#DEFINE FLG_YDIR                2       ;Indicates y direction request.
#DEFINE FLG_ZDIR                4       ;Indicates z direction request.
#DEFINE FLG_XZERO               1       ;Indicates that x is not moved.
#DEFINE FLG_YZERO               3       ;Indicates that y is not moved.
#DEFINE FLG_ZZERO               5       ;Indicates that z is not moved.
#DEFINE FLG_MAJOR1              6       ;LSB Major axis.
#DEFINE FLG_MAJOR2              7       ;MSB Major axis.  01=X;10=Y;11=Z
#DEFINE FLG_CUT                 0       ;Laser is turned on for path.
#DEFINE FLG_ACCEL               1       ;Begin accelerate in this move.
#DEFINE FLG_DECCL               2       ;Begin deceleration in this
move.


;Register alias
#DEFINE IOPORT PORTD
#DEFINE CNTRL_PORT LATC
#DEFINE MOTION_PORT LATA
#DEFINE LIMIT_PORT  PORTB
;Individual bits
#DEFINE X_STEP  0
#DEFINE X_DIR   1
#DEFINE Y_STEP  2
#DEFINE Y_DIR   3
#DEFINE Z_STEP  4
#DEFINE Z_DIR   5
#DEFINE RD_WR   6
#DEFINE EMSTOP  0
#DEFINE LIMIT_ERR       1
#DEFINE DATA_AVAIL      2
#DEFINE X_BK_LMT        3
#DEFINE X_FW_LMT        4
#DEFINE Y_FW_LMT        5
#DEFINE Y_BK_LMT        6
#DEFINE Z_LMT           7
#DEFINE ADDR_INCR       0
#DEFINE LATCH_ALE       3
#DEFINE GOE                     4
#DEFINE DATA_ACK        5
#DEFINE ADDR_SEL1       0
#DEFINE ADDR_SEL2       1
#DEFINE ADDR_SEL3       2
;Output signals
#DEFINE OUT_AIR         0
#DEFINE OUT_CHILLER     1
#DEFINE OUT_VACCUM      2
#DEFINE OUT_MOTOREN     3
#DEFINE OUT_AUX1        4
#DEFINE OUT_AUX2        5
#DEFINE OUT_AUX3        6
#DEFINE OUT_AUX4        7
;Constants used for indicating the INC/DEC axis states.
#DEFINE MJ_DIR          0       ;Major axis
#DEFINE MN1_DIR         1       ;First minor axis
#DEFINE MN2_DIR         2       ;Second minor axis
;Constants for acceleration timer
#DEFINE TMR_ACCEL_30    .63035          ;Constant for a 500 usec timer
interval. Based on 30"/sec^2
#DEFINE TMR_ACCEL_RATE  .48                     ;Constant value to
addjust acceleration timer. 96
;EEProm data address.
#DEFINE EE_HOMEOFFSET 0x00
#DEFINE EE_PARKOFFSET 0x08
#DEFINE EE_CURPOSITION 0x10
#DEFINE EE_RAPIDSPEED  0x18
#DEFINE EE_HOMESPEED   0x1A
#DEFINE EE_MOTFLAGS        0X1C
#DEFINE EE_PULSEFRQ        0X1D
#DEFINE EE_TRICKELFRQ  0X1F
#DEFINE EE_MOTION_STATE 0X21    ;Here, we are only storing the XOR
values to determine true direction.
#DEFINE EE_ORIGIN_FROMHOME 0x22 ;Stores x and y poistion at home limits
from origin.
#DEFINE EE_STATE_REG    0X28
;Raster flags.
#DEFINE RASTER_NEXTBYTE 7
#DEFINE RASTER_STEP             6
ENDIF

{Original Message removed}

2003\04\18@182717 by Olin Lathrop

face picon face
> Yes, I have also tried the following:
> USHARE
> FLAGS5 RES 1
>
> But it still does not show in the drop down in the watch window.  In
> MPLAB, the defined constants always showed up in the watch window.

In your code USHARE is just a label, but FLAGS5 represents a RAM location
and should definitely available in a watch window.  I'm using MPLAB
version 5.  Select any watch window and hit the INSERT key.  That brings
up a little window where you can enter a RAM location name or address.
FLAGS5 should be in there.  MPLAB has some bugs in how character case is
handled, so you have to enter FLAGS5 upper case, whether the code has case
sensitivity enabled or not.

If you continue to have problems, explain exactly what you are doing.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2003\04\18@183118 by Olin Lathrop

face picon face
> Ok, I am using relocatable objects in my project.  In fact, my project
> has some 50 relocatable object files.  I have my variables declared in a
> single include file.

If you want global variables, it is better to define them with RES then
define them GLOBAL.

> The file is listed below.  I include this file in
> each asm file which makes up my application.  Also as can be seen, I use
> CBLOCK to define my variable registers.  However, the watch window
> simple does not show these labels in the symbol drop down box.

Right.  CBLOCK defines numeric constants.  It does not allocate RAM.  In
MPLAB version 5 at least, these won't show up in the watch window dialog.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2003\04\18@184750 by Andrew Warren

flavicon
face
Olin Lathrop <PICLISTspamKILLspammitvma.mit.edu> wrote:

> > the watch window WILL show registers whose names are assigned
> > with EQU.
>
> Maybe that's a version 6 thing.  I just verified that symbols
> defined with EQU that have valid values for RAM addresses are
> definitely not available in the list of symbols to display in a
> watch window in version 5.

   Hmm... I'm using version 5.30.00, and it works fine there (and
   with every version prior to 5.30).

> > I see no compelling reason for anyone to switch from absolute
> > mode to relocatable just for the RES directive.
>
> There are lots of compelling reasons for relocatable mode.  I can
> see how some of the old timers may want to keep writing absolute
> code .... However, recommending absolute mode to newbies is just
> plain irresponsible.

   Note the careful phrasing: "SWITCH from absolute to relocatable
   JUST for res".  I wasn't suggesting that there's no reason to
   use relocatable mode, nor that I'd necessarily recommend absolute
   mode to a newbie.

   I don't know if I'd go as far as to call it irresponsible, but I
   do agree that it'd be a disservice to that person not to explain
   the advantages of relocatable over absolute mode.  Where we
   disagree, I think, is in our opinion of whether it's a good idea
   to also explain the advantages of absolute mode.

   And, now that I think about it, we also disagree on the
   IMPORTANCE of the difference; you think it's a huge deal, and I
   don't think it makes all that much difference.  That's just a
   philosophical thing, of course, and I feel as strongly about some
   other aspects of programming style as you do about this one.

> Now c'mon Andy, you know all this.  This is right out of
> Introduction to Software 101.

   Actually, I'd like relocatable mode more if its "typing" were
   MORE strictly enforced.  If there were an assembler warning on
   every register-based instruction whose operand hadn't been
   defined by RES, I'd feel that RES was actually doing something
   SIGNIFICANTLY better than CBLOCK.

   Does MPASM already do that?

> You clearly like to find faults with my posts whenever you can

   Given your own penchant for public fault-finding, I'm certain
   you're not complaining... But just in case you ARE a little
   sensitive about it, consider this:  It wouldn't be any fun if it
   were easy.

   -Andy

=== Andrew Warren -- .....aiwKILLspamspam.....cypress.com
=== Principal Design Engineer
=== Cypress Semiconductor Corporation
===
=== Opinions expressed above do not
=== necessarily represent those of
=== Cypress Semiconductor Corporation

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2003\04\18@194457 by Igor Pokorny

flavicon
face
Guys, I read your discussion with a sad amusement... I have had an
oportunity to do some big projects with 20 more programmers for past 30
years. I do know every programmer has his/her own style and there is no way
how to change this. Olin, you told me lately the Microchip's assembler is
the worst you have seen. What the heck you are talking about? If I weren't
been lazy and old, I would write a assembler by the modern way....
{something in a style of PHP)... There wouldn't be any definition of
variables and you loose the reason to discuss if it's better to use RES or
CBLOCK

BTW ... I use assembler parts when there is a problem with timing only. The
C is a solution.

Regards

Igor




{Original Message removed}

2003\04\19@050158 by Peter L. Peres

picon face
>That does work with 6.0.20.0 and I've used it to jump to a position
>in the list where there might be variables with similar names, eg
>result1, result2, result3 etc. What I was hoping for was a bigger

You can name all your variables with a prefix (Fresult1 Fresult2, ... is
what I use). Then they appear grouped in a listing. Same for bits (Bthis,
Bthat).

Peter

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2003\04\19@080042 by Olin Lathrop

face picon face
>> Maybe that's a version 6 thing.  I just verified that symbols
>> defined with EQU that have valid values for RAM addresses are
>> definitely not available in the list of symbols to display in a
>> watch window in version 5.
>
>     Hmm... I'm using version 5.30.00, and it works fine there (and
>     with every version prior to 5.30).

Now I'm really confused what you are seeing.  I've seen the same symptom
in MPLAB ever since I started programming PICs over 3 years ago.  Here's
exactly what I do:  Click on an existing watch window.  Hit INSERT.  That
pops up a small window called "Add Watch Symbol".  At the top it has a
line for typing in the new symbol name.  Below that is the list of
available symbols in a scroll window, and 5 buttons to the right.  I see
only symbols defined with RES, not with EQU.  Even if I try to type the
name of an EQU symbol, I get an error message about the symbol not being
found.  By the way, the symbol name needs to be typed in upper case, even
if it is shown in lower case in the scroll window.

Maybe this is an absolute versus relative mode thing.  The RES directive
is not available in absolute mode, so perhaps MPLAB gives up there and
shows all symbols.  In relocatable mode is knows which one represent RAM
locations, and only shows those?


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2003\04\19@080700 by Olin Lathrop

face picon face
> Olin, you told me lately the Microchip's
> assembler is the worst you have seen.

I wasn't referring to MPASM as a whole.  I have definitely seen worse.  If
I remember right, the comment pertained to MPASM's macro capabilities.
These are indeed quite primitive.

> What the heck you are talking
> about? If I weren't been lazy and old, I would write a assembler by the
> modern way.... {something in a style of PHP)... There wouldn't be any
> definition of variables and you loose the reason to discuss if it's
> better to use RES or CBLOCK

And your point is...?

> BTW ... I use assembler parts when there is a problem with timing only.
> The C is a solution.

Let's not start that jihad *again*.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2003\04\22@003108 by Charles Craft

picon face
I'm late to the party but no one else mentioned it. :-)

I don't have the original post so not sure if the "include everything in the post and nothing on the subject line" rule was followed but how did these two get off on a 5.x tangent when the OP was talking about version 6.x ??????   ;-)

bubba


--{Original Message removed}

More... (looser matching)
- Last day of these posts
- In 2003 , 2004 only
- Today
- New search...