Part Number: MSP430FR2433
How to declare a variable in RAM in IAR ASEMBLER?
The code that worked before, now does not work!
I specify the address 0x2000h, but nothing is written there!
The disassembler indicates that the address is 0xE400.
But nothing is recorded there either !!!
#include "msp430.h" ; #define controlled include file
;*--------------------------- Variable in RAM --------------------------------*/
#define MODE (02000h)
NAME main ; module name
PUBLIC main ; make the main label vissible
; outside this module
ORG 0FFFEh
DC16 init ; set reset vector to 'init' label
RSEG CSTACK ; pre-declaration of segment
RSEG CODE ; place program in 'CODE' segment
init: MOV #SFE(CSTACK), SP ; set up stack
main: NOP ; main program
MOV.W #WDTPW+WDTHOLD,&WDTCTL ; Stop watchdog timer
mov.w #0000h,MODE
mov.w #0001h,MODE
mov.w MODE,R7
JMP $ ; jump to current location '$' (endless loop)
END

