Ram variable

I am a rank newbie. Can anybody help me. I simply want to add a couple of ram variables to the LED flasher program. Say two 16bit variables. The device - 2013 - has 128byte ram.

Simple, maybe but I keep getting error messages. I am using the IAR kickstart.

George Powell

Hi,

To start I’d suggest posting the code you used, and the error messages you got.

Otherwise we don’t know what you’re talking about.

Cheers,

–David Carne

Hi David, my code is below. It is just one line + stack inits. The error message is below. I have checked the Assembler notes on how to define a segment are but it does not mention _Z, -b or -P. Thanks George

;------------------------------------------------------------------------------------

Fatal Error[e72]: Segment DATA must be defined in a segment definition option (-Z, -b or -P) [/size]

;-----------------------------------------------------------------------------

#include “msp430.h”

ORG 0FC00h ; Progam Start (1K Flash device)

RSEG DATA

MYVAR DS 1

RSEG CODE

RESET mov.w #0280h,SP

Mainloop jmp Mainloop

ORG 0FFFEh ; MSP430 RESET Vector

DW RESET ;

END