From da0a5082dd75e429f78593e7bdec0fb87ae9e2a5 Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Sat, 1 Oct 2011 14:31:17 +0200 Subject: [PATCH] Configuration to build USBCAN converter on LMC1 board added. Signed-off-by: Pavel Pisa --- .../arm/lpc17xx-common/config/config.usbcan | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 embedded/board/arm/lpc17xx-common/config/config.usbcan diff --git a/embedded/board/arm/lpc17xx-common/config/config.usbcan b/embedded/board/arm/lpc17xx-common/config/config.usbcan new file mode 100644 index 0000000..ec976db --- /dev/null +++ b/embedded/board/arm/lpc17xx-common/config/config.usbcan @@ -0,0 +1,71 @@ +# -*- makefile -*- + +LN_HEADERS=y + +ARCH=arm +MACH=lpc17xx +BOARD=lpc17xx-common +LD_SCRIPT=lpc1768 + +CONFIG_BOARD_VARIANT=lmc1 + +link_VARIANTS ?= app + +CONFIG_KEYVAL=y +CONFIG_USB_BASE=y +CONFIG_USB_MORE=y +CONFIG_USB_LPCUSB=y + +CONFIG_APP_USBCAN=y +#CONFIG_APP_USBLED=y + +CONFIG_OC_UL_DRV_SYSLESS=n +CONFIG_ULAN_DY=n +CONFIG_ULOI_LT=n +#CONFIG_APP_USBBOOT=y +#CONFIG_ULBOOT=y + +CONFIG_STDIO_COM_PORT=0 + +CROSS_COMPILE = arm-elf- +TARGET_ARCH = -mthumb -mcpu=cortex-m3 + +# Set default C flags. If theese are set elsewhere (e.g. on a command +# line), these default flags are not used. +DEBUG ?= -ggdb +#OPTIMIZE ?= -O2 + +# Set default C flags. If theese are set elsewhere (e.g. on a command +# line), these default flags are not used. +#DEBUG ?= -g +OPTIMIZE ?= -Os -ffunction-sections -fdata-sections -Wl,--gc-section +LDFLAGS += -Wl,--cref +LDFLAGS += -Wl,--gc-section + +LPC21ISP=lpc21isp-179 +LPC_BAUD = 38400 +LPC_TTY = /dev/ttyUSB0 +CPU_SYS_KHZ=12000 + +LOAD_CMD-boot = load() { $(LPC21ISP) -bin $$1 $(LPC_TTY) $(LPC_BAUD) $(CPU_SYS_KHZ); }; load + +PROG_BASE=0x09000 +PROG_SIZE=0x37000 + +OUTPUT_FORMATS = bin + +LOAD_EXTENSION-app = .bin + +USB_SENDHEX ?= usb_sendhex +USB_APP_VID ?= 0x1669 +USB_APP_PID ?= 0x1001 +USB_BOOT_VID ?= 0xdead +USB_BOOT_PID ?= 0x2263 + +LOAD_CMD-app = \ + $(USB_SENDHEX) -d $(USB_APP_VID):$(USB_APP_PID) -r ; \ + $(USB_SENDHEX) -w -d $(USB_BOOT_VID):$(USB_BOOT_PID) -s $(PROG_BASE) -l $(PROG_SIZE) -e; sleep 2 ; \ + $(USB_SENDHEX) -d $(USB_BOOT_VID):$(USB_BOOT_PID) -s $(PROG_BASE) -f binary + +RUN_CMD-app = \ + $(USB_SENDHEX) -d $(USB_BOOT_VID):$(USB_BOOT_PID) -r -- 2.39.2