Thank-you Mr.Rolf for your reply. The debugger is now working correctly.But we 
still have problems in getting the standard library functioning and declaring 
INFORMATION MEMORY.

 

1)LINKER PROBLEM: We are trying link an object file of math library, but we are 
not able to link it. The make file is below. When we link object files with 
msp430-ld we are getting link errors, it displays error message "undefined 
reference to ‘sqrt’". What’s up? what's wrong with the make file?

 

/************************MAKEFILE*************************************/

NAME            = er

OBJECTS         = 1secisr.o 9904mac.o Bin2msb.o Comput.o disp.o Eeprom.o 
Engpwm.o flash_mac.o Flashrw.o intimain.o key.o lcd_mac.o lib.o Main.o modbus.o 
opticomm.o Pccomm.o Tamper.o Time.o Tvminit.o 1msisr.o

 

CPU             = msp430x149

 

CFLAGS          = -mmcu=${CPU} -O2 -Wall -g

LDFLAGS         = -Lc:\mspgcc\msp430\lib -lm  

 

CC              = msp430-gcc

LD              = msp430-ld

 

all: ${NAME}.elf

 

download: download-jtag

 

${NAME}.elf: ${OBJECTS}

      ${CC} -mmcu=${CPU} $(LDFLAGS) -o $@ ${OBJECTS}

 

download-jtag: 

      msp430-jtag -e ${NAME}.elf

 

#project dependencies

1secisr.o : 1secisr.c define.h extconst.h extvar.h modbus_e.h

9904mac.o : 9904mac.c define.h extconst.h extvar.h

Bin2msb.o : Bin2msb.c define.h extconst.h extvar.h

Comput.o : Comput.c define.h extconst.h extvar.h math.h

disp.o : disp.c define.h extconst.h extvar.h lcd_d.h lcd_e.h

Eeprom.o : Eeprom.c define.h extconst.h extvar.h flash_d.h flash_e.h

Engpwm.o : Engpwm.c define.h extconst.h extvar.h

flash_mac.o : flash_mac.c define.h extconst.h extvar.h flash_d.h flash_g.h 
lcd_d.h lcd_e.h

Flashrw.o : Flashrw.c define.h extconst.h extvar.h

intimain.o : intimain.c define.h extvar.h lcd_d.h lcd_e.h

key.o : key.c define.h extconst.h extvar.h lcd_d.h lcd_e.h

lcd_mac.o : lcd_mac.c define.h extvar.h lcd_d.h lcd_g.h

lib.o : lib.c define.h extconst.h extvar.h

Main.o : Main.c define.h const.h gvar.h lcd_d.h protect.h lcd_e.h flash_d.h 
flash_e.h modbus_g.h

modbus.o : modbus.c define.h extvar.h modbus_e.h optical_e.h

opticomm.o : opticomm.c define.h extconst.h extvar.h optical_g.h flash_d.h 
flash_e.h modbus_e.h

Pccomm.o : Pccomm.c define.h extconst.h extvar.h flash_d.h flash_e.h 
optical_e.h modbus_e.h

Tamper.o : Tamper.c define.h extconst.h extvar.h

Time.o : Time.c define.h extconst.h extvar.h

Tvminit.o : Tvminit.c define.h extconst.h extvar.h flash_d.h

1msisr.o : 1msisr.c define.h extconst.h extvar.h modbus_e.h

 

/*********************************************************************************************/

 

2) INFORMATION MEMORY PROBLEM:

const __special_area__ int my_const = 0x1000;

#define __special_area__ __attribute__((section(".specialarea")))

const __special_area__ union

{

char force[256];

struct

{

int a;

int b;

char c[10];

float d;

};

} my_erasable_data_area;

 

 

Is this the correct way to declare information memory data? Can you send some 
example code read from and write to information memory?

 

Regards

Nimish

 

 

 


                
---------------------------------
How much free photo storage do you get? Store your friends n family photos for 
FREE with Yahoo! Photos. 
 http://in.photos.yahoo.com

Reply via email to