Hi I'm Trying to generate the a43 hex file with the msp430-elf toolchain but got with some problems.
Under Linux (without CCS) using as base the examples in "ti/gcc/examples" I barely modified the makefile adding the -T option to specify a linker script and added the command to copy the object file as an hex file
I get the hex file, but it defines the first section of flash memory starting with a bunch of zeros, and doesn't run, the debugger says that PC(0) is less than 0x10 because the first instruction 00 00 is to branch to address 0, this is the first part of the hex file I'm getting
:108000000000000000000000FFFF0000FFFF000074 :1080100031400006B240805A5C013C4006020D43EC :108020003E401000B0123A81B0126E810C43B01283 :1080300016813440048035400480264330405E8001 :108040003440048035400480264330405E80344014 :108050000480354004803640FEFF30405E80059449
What am I doing wrong, or is something wrong with the toolchain?
Can please someone provide a set of commands to achieve this
The makefile looks like this:
OBJECTS=blink.o GCC_DIR = ../../../bin SUPPORT_FILE_DIRECTORY = ../../../include DEVICE = msp430f157 CC = $(GCC_DIR)/msp430-elf-gcc GDB = $(GCC_DIR)/msp430-elf-gdb OBJCOPY = $(GCC_DIR)/msp430-elf-objcopy CFLAGS = -I $(SUPPORT_FILE_DIRECTORY) -mmcu=$(DEVICE) -O2 -g LFLAGS = -L $(SUPPORT_FILE_DIRECTORY) all: ${OBJECTS} $(CC) -T msp430f157.ld $(CFLAGS) $(LFLAGS) $? -o $(DEVICE).out ${OBJCOPY} -O ihex $(DEVICE).out blink.a43 debug: all $(GDB) $(DEVICE).out
and the commands that are being output are these:
msp430-elf-gcc -I ../../../include -mmcu=msp430f157 -O2 -g -c -o blink.o blink.c msp430-elf-gcc -T msp430f157.ld -I ../../../include -mmcu=msp430f157 -O2 -g -L ../../../include blink.o -o msp430f157.out msp430-elf-objcopy -O ihex msp430f157.out blink.a43