Skip to content

Instantly share code, notes, and snippets.

@maknoll
Created January 27, 2017 12:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maknoll/0976ec4fd0bd54c19ec5660a5230b4e6 to your computer and use it in GitHub Desktop.
Save maknoll/0976ec4fd0bd54c19ec5660a5230b4e6 to your computer and use it in GitHub Desktop.
TARGET = hid.elf
CC = arm-none-eabi-gcc
AR = arm-none-eabi-ar
OBJCOPY = arm-none-eabi-objcopy
OBJDUMP = arm-none-eabi-objdump
SIZE = arm-none-eabi-size
CFLAGS += -DNDEBUG -DCORE_M4 -D__USE_CMSIS -D__LPC43XX__ -mcpu=cortex-m4 -mthumb -Os -Wall
LDFLAGS += -mcpu=cortex-m4 -mthumb -nostartfiles -Xlinker --gc-sections -Tlpc43xx.ld
CFLAGS += -Iinc -I../../lpc_chip_43xx/inc -I../../lpc_chip_43xx/inc/usbd -I../../lpc_board_nxp_lpclink2_4370/inc
SOURCES += $(wildcard src/*.c) $(wildcard ../../lpc_chip_43xx/src/*.c) $(wildcard ../../lpc_board_nxp_lpclink2_4370/src/*.c)
OBJECTS += $(SOURCES:.c=.o)
.PHONY: clean
$(TARGET): $(OBJECTS)
$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
clean:
rm -f $(TARGET) $(OBJECTS)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment