我有一个makefile,它给出了OSX中的以下错误,如果有人知道为什么会出现此错误,我将非常感激:
../../../../../Source//templates/gcc/Makefile.posix:15:**缺少分隔符。停下来。
以下是生成文件:

GNU_INSTALL_ROOT := /usr/local/gcc-arm-none-eabi-4_8-2014q3
GNU_VERSION := 4.8.3
GNU_PREFIX := arm-none-eabi
GDB_PORT_NUMBER := 9992

FLASH_START_ADDR = $(shell $(OBJDUMP) -h    $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out -j .text | grep .text | awk '{print $$4}')

JLINK_OPTS = -device nrf51822 -if swd -speed 4000
JLINK_GDB_OPTS = -noir
JLINK = JLinkExe $(JLINK_OPTS)
JLINKD_GDB = JLinkGDBServer $(JLINK_GDB_OPTS)


flash-jlink: flash.jlink
    $(JLINK) flash.jlink

flash.jlink:
    printf "loadbin $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).bin $(FLASH_START_ADDR)\nr\ng\nexit\n" > flash.jlink

erase-all: erase-all.jlink
    $(JLINK) erase-all.jlink

erase-all.jlink:
    # Write to NVMC to enable erase, do erase all, wait for completion. reset
    printf "w4 4001e504 2\nw4 4001e50c 1\nsleep 100\nr\nexit\n" > erase-all.jlink

run-debug:
    $(JLINKD_GDB) $(JLINK_OPTS) $(JLINK_GDB_OPTS) -port $(GDB_PORT_NUMBER)

.PHONY:  flash-jlink flash.jlink erase-all erase-all.jlink run-debug

最佳答案

括号编辑器中的制表符替换为4个空格(sp sp sp sp)。切换到其他编辑器(TextMate)解决了问题

09-25 16:59