Add USBSERIAL=YES to avoid the need for editing projectconfig.h
also make "make APP=<foo>" build <foo>.bin so you don't overwrite your firmware.bin :)
This commit is contained in:
parent
f242c667ab
commit
36fa18875f
|
@ -33,6 +33,10 @@ INCLUDE_PATHS = -I$(ROOT_PATH) -I$(ROOT_PATH)/core
|
|||
|
||||
include $(ROOT_PATH)/Makefile.inc
|
||||
|
||||
ifdef APP
|
||||
OUTFILE=$(APP)
|
||||
endif
|
||||
|
||||
LDFLAGS+= -Wl,--gc-sections
|
||||
OBJS += lpc1xxx/$(TARGET)_handlers.o lpc1xxx/LPC1xxx_startup.o
|
||||
|
||||
|
|
|
@ -45,6 +45,9 @@ CPU_TYPE = cortex-$(CORTEX_TYPE)
|
|||
CFLAGS = -std=c99 -c -g -Os $(INCLUDE_PATHS) -Wall -mthumb -ffunction-sections -fdata-sections -fmessage-length=0 -mcpu=$(CPU_TYPE) -DTARGET=$(TARGET) -DRAMCODE=$(RAMCODE) -fno-builtin -Wno-unused-function
|
||||
LDFLAGS = -nostartfiles
|
||||
|
||||
ifeq "$(USBSERIAL)" "YES"
|
||||
CFLAGS += -DUSBSERIAL
|
||||
endif
|
||||
|
||||
CONFIG_MAKE_PRINTDIRECTORY = --no-print-directory
|
||||
CONFIG_GCC_SHOWCOLUMN =
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
#ifndef __PROJECTCONFIG_H_
|
||||
#define __PROJECTCONFIG_H_
|
||||
|
||||
#include "lpc134x.h"
|
||||
#include "sysdefs.h"
|
||||
|
||||
|
@ -88,3 +91,12 @@
|
|||
#define CFG_UART_BAUDRATE (115200)
|
||||
#define CFG_UART_BUFSIZE (512)
|
||||
#endif
|
||||
|
||||
#ifdef USBSERIAL
|
||||
#undef CFG_USBCDC
|
||||
#undef CFG_USBMSC
|
||||
#define CFG_USBCDC (1)
|
||||
#define CFG_USBMSC (0)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue