This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Part Number: MSP-EXP430G2
Tool/software: Code Composer Studio
I'm trying to watch variables in an assembly project. When I add a variable to the expressions window, I get the error "Identifier not found."
For example, watching testVar in the following code.
.cdecls C,LIST,"msp430.h" ; Include device header file .def RESET ; Export program entry-point to ; make it known to linker. .text ; Assemble into program memory. .retain ; Override ELF conditional linking ; and retain current section. .retainrefs ; And retain any sections that have ; references to current section. .data .bss testVar, 1 ; test data .text ;------------------------------------------------------------------------------- RESET mov.w #__STACK_END,SP ; Initialize stackpointer StopWDT mov.w #WDTPW|WDTHOLD,&WDTCTL ; Stop watchdog timer clr &P1OUT SetupP1 bis.b #01000001B, &P1DIR ; P1.0, .6 output ;------------------------------------------------------------------------------- ; Main loop here ;------------------------------------------------------------------------------- Main mov.b #01h, testVar xor.b testVar, &P1OUT ; Toggle P1.0 call #Delay jmp Main Delay mov.w #01, R14 L1 dec.w R14 jnz L1 ; Delay over? ret ;------------------------------------------------------------------------------- ; Stack Pointer definition ;------------------------------------------------------------------------------- .global __STACK_END .sect .stack ;------------------------------------------------------------------------------- ; Interrupt Vectors ;------------------------------------------------------------------------------- .sect ".reset" ; MSP430 RESET Vector .short RESET
Joe Hamiilton said:
.data
.bss testVar, 1 ; test data
Try adding a define for testVar using .global or .def.