w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
gcc makefile error: make: *** No rule to make target

All these lines are wrong:

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

flash.jlink:    printf "loadbin
$(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).bin   $(FLASH_START_ADDR)
r
g
exit
" >flash.jlink

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

# Write to NVMC to enable erase, do erase all, wait for completion. reset
erase-all.jlink:    printf "w4 4001e504 2
w4 4001e50c 1
sleep 100
r
exit
" > erase-all.jlink

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

I don't know if you were just careless with your cut and paste, but there must be a newline and TAB on the next line, or a semicolon, before the command. Like this:

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

flash.jlink:
        printf "loadbin $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).bin  
$(FLASH_START_ADDR)
r
g
exit
" >flash.jlink

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

# Write to NVMC to enable erase, do erase all, wait for completion. reset
erase-all.jlink:
        printf "w4 4001e504 2
w4 4001e50c 1
sleep 100
r
exit
" > erase-all.jlink

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




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.