Olimex JTAG/Proto board and mspgcc question

Hi folks,

I am trying to use the MSP430-P1611 proto board with MSP430-JTAG (Using the olimex software) and I can’t seem to get it working together.

The code I am trying to run is just a simple LED blinker:

#include <io.h>

int main(void){
	WDTCTL = WDTPW + WDTHOLD; //disable WDT
	P6DIR |= 0x01; // P6.0 output
	P6SEL = 0x00;

	unsigned int i;

	for (;;){
		P6OUT ^= 0x01; // toggle LED
		i = 20000;
		while (i != 0){ i--; };
	}
}

And the compiled hex file looks like:

:10400000B240805A20013F4068403E4000113D4090
:1040100000110D9E0524FE4F00001E530E9DFB2B2C
:104020003F4000113D4000110D9F0524CF4300008B
:104030001F530F9DFB2B3040404030403E4000134B
:1040400031400039B240805A2001D2D33600C243F9
:104050003700D2E335003F40204E3F53FE23F93F67
:084060003040644002DFFE3F26
:10FFE0003A403A403A403A403A403A403A403A4041
:10FFF0003A403A403A403A403A403A403A4000406B
:0400000300004000B9
:00000001FF

The Olimex programmer software seems to identify the device when I do a blank-check but when I program the board (and reset it) nothing seems to happen.

One strange thing is when I load in the hex file the Program Memory are all FFFFs. Is that normal behaviour?

I am stuck and can’t find a solution so I’d appreciate any help/advice.

Thanks.

I programmed the code into one of my controllers using the Olimex programming software and the Olimex JTAG and it worked…I got a ~6 Hz output on P6.0. When you open the hex file, do you see data (other than FF) in the program memory window? Did you verify it after it was programmed?

gm

Hello gm,

Thanks for your reply. I think I understand why it didn’t work.

gm:
When you open the hex file, do you see data (other than FF) in the program memory window?

If I load the standard output hex file, blink.a43, I don’t see anything except FF but if I change the extension of the file to .hex I see the contents of the hex file in the program memory window.

The file content is exactly the same but if the extension is not .hex Olimex software fails.

I’ve changed my makefile to rename the output files to .hex and everything is working now :slight_smile:

Cheers!