SparkFun Forums 

Where electronics enthusiasts find answers.

Discussions on how to get your MSP JTAG programmer up and running.
By T-Rex
#35881
Hi,

I just received my LCD Development Board for the MSP430F169. I opened up the demo code that they provided for it on the website with the IAR embed Workbench IDE. However, when I try to link the code, I get an error saying:
Fatal Error[e106]: Syntax error or bad argument in lnk430F169.xcl 71
-Z(DATA)DATA16_I,DATA16_Z,DATA16_N,HEAP+_HEAP_SIZE=200-A00

I'm not familiar with linkers, so I have no idea what this means. Also, I'm not sure how you get the output of the linker onto the board. I have the MSP-JTAG Parallel Port Dongle Programmer, but I'm not sure how to d/l the machine code onto the chip. Any help would be appreciated.

Thanks.
By Encryptic
#35929
My quick suggestions are as follows:

1.) Do a clean (Project -> Clean) then rebuild it.

2.) Right click on the project file and select 'Options' go down to 'FET Debugger' and make sure that you have the proper debugger for the FET tool you have. it sounds like you have a parallel tool, so I would try TI's LTP one, and see what your results are.

The way that the code will make it to your target, is via IAR, it will download the latest code to the device when you debug.
User avatar
By leon_heller
#35931
I just tried building that project; it compiled and linked without any problems. I used the current version of the IAR tools: 3.42A.

Leon
By Encryptic
#35953
leon_heller wrote:I just tried building that project; it compiled and linked without any problems. I used the current version of the IAR tools: 3.42A.

Leon
I did not have problems either, however, I did notice that the project had to be converted to a newer version of the IAR. Which is why I suggested a clean, it is possible that the object file's format had changed (I'm unsure, which is why I suggested a clean first.)
By T-Rex
#35955
I cleaned it, and then linked again, but it still comes up with the same error. I tried to redownload and install everything, but it still comes up with the same thing. I'm also using the most recent version of the IAR tools. Any ideas?
User avatar
By leon_heller
#35956
What happens when you build other MSP430 projects?

Leon
By Encryptic
#35961
Try what Leon's suggesting, create a simple dummy project with nothing in it.

Something really simple that just shuts the watch dog off and loops or something.
By T-Rex
#35963
I made a simple project that displayed something on the LCD, and it compiled and linked fine.
User avatar
By leon_heller
#35970
Your linker command file for the 'F169 must have been changed, somehow.

Mine has:

-Z(DATA)DATA16_I,DATA16_Z,DATA16_N,HEAP+_HEAP_SIZE=0200-09FF

at line 71 and yours has:

-Z(DATA)DATA16_I,DATA16_Z,DATA16_N,HEAP+_HEAP_SIZE=200-A00

according to the error. It has the wrong Heap size allocation. Commenting out the line didn't cause an error, so the program isn't actually using the heap. There is nothing wrong with the syntax, either.

Try reinstalling the tools.

Leon
By T-Rex
#35995
I reinstalled the tools and redownloaded the demo code, but that didn't seem to help. It still generates the same error. So I decided to change the linker file hoping that that would help. I split the memory allocation up into seperate lines:

-Z(DATA)DATA16_I=0200-0A00
-Z(DATA)DATA16_Z=0200-0A00
-Z(DATA)DATA16_N=0200-0A00
//-Z(DATA)HEAP+_HEAP_SIZE=0200-0A00
-Z(DATA)CSTACK+_STACK_SIZE#

It links fine just as long as the Heap allocation is commented out. Will this cause any troubles down the road, especially if I decide to use malloc or free? Also, should I change the allocation size to the one yours was showing?

Thanks for all your help.
User avatar
By leon_heller
#35997
Yes, it will cause problems with malloc and free if there is no heap allocation.

I still can't see why the rest of us don't have any problems with it.

Leon
By Encryptic
#36001
My suggestion at this point would be to head over to the MSP430 Yahoo group and ask this question, over there. There's someone from IAR Systems who monitors the group, and could probably much better assist you with a solution.
By SteveC
#37654
Encryptic wrote:My suggestion at this point would be to head over to the MSP430 Yahoo group and ask this question, over there. There's someone from IAR Systems who monitors the group, and could probably much better assist you with a solution.
I guess you've solved it by now, but I had the same issue on an existing project with its own .xcl file and the new slac050q Workbench. The error is the heap size identifier. Use

-Z(DATA)DATA16_I,DATA16_Z,DATA16_N,DATA,DATA16_HEAP+_DATA16_HEAP_SIZE=0200-09FF

instead.
--
Steve
By pmlonline
#106758
SteveC wrote:
Encryptic wrote:My suggestion at this point would be to head over to the MSP430 Yahoo group and ask this question, over there. There's someone from IAR Systems who monitors the group, and could probably much better assist you with a solution.
I guess you've solved it by now, but I had the same issue on an existing project with its own .xcl file and the new slac050q Workbench. The error is the heap size identifier. Use

-Z(DATA)DATA16_I,DATA16_Z,DATA16_N,DATA,DATA16_HEAP+_DATA16_HEAP_SIZE=0200-09FF

instead.
--
Steve

I'm having the same problems with IAR Workbench. Then I tried your fix, and it work. Thanks for posting the fix.

Paul