# ## msp430 based MCU Jamrules file # echo "Building for board $(BOARD)." ; echo "Building for MCU $(MCU)." ; HDRS += $(TOP)/cpu/$(CPU)/include $(TOP)/board/$(BOARD)/drivers $(TOP)/board/$(BOARD)/include $(TOP)/include $(TOP)/core/include ; TOOLCHAIN = msp430- ; CC = msp430-gcc ; LINK = msp430-gcc ; OPTIM = -Os -gdwarf-2 ; #OPTIM = -O0 -g ; #OPTIM = -O2 ; CCFLAGS += -std=gnu99 -Wall -mmcu=$(MCU) ; LINKFLAGS = -mmcu=$(MCU) -lgcc $(TOP)/bin/$(BOARD)/$(PROJECT)/startup.o ; AS = msp430-as ; ASFLAGS += -mmcu=$(MCU) --defsym $(CPU)=1 --gdwarf-2 ; AR = msp430-ar ; ARFLAGS = -rc ; GDB = msp430-gdb ; GDBFLAGS = -x $(TOP)/board/$(BOARD)/tools/gdbscript ; OBJCOPY = msp430-objcopy ; FLASHER ?= echo ; FLASHFLAGS ?= "No flasher defined." ; RESET ?= $(FLASHER) $(FLASHFLAGS) reset ; # overwrite flash action in order to support mspdebug actions Flash { $(FLASHER) $(FLASHFLAGS) "prog $(>)" }