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----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Andrew Warren Sent: Friday, April 18, 2003 2:45 PM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC]: How do I get variable names to show up in 6.x watch Olin Lathrop 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 -- aiw@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 -- 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