summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2021-04-28 15:10:31 +0700
committerhathach <[email protected]>2021-04-28 15:10:31 +0700
commitbbc6d4f9e857239a67b6418fe52f49f852ac58e4 (patch)
treede12ec372d430674c47250a9e8cc220e6b4e1065
parentcd535537f603a00ae8d69ec9a720843925ce6c9f (diff)
create new lpc15 family
-rw-r--r--hw/bsp/lpc15/boards/lpcxpresso1549/board.mk6
-rw-r--r--hw/bsp/lpc15/boards/lpcxpresso1549/lpc1549.ld (renamed from hw/bsp/lpcxpresso1549/lpc1549.ld)0
-rw-r--r--hw/bsp/lpc15/family.c (renamed from hw/bsp/lpcxpresso1549/lpcxpresso1549.c)2
-rw-r--r--hw/bsp/lpc15/family.mk (renamed from hw/bsp/lpcxpresso1549/board.mk)12
4 files changed, 10 insertions, 10 deletions
diff --git a/hw/bsp/lpc15/boards/lpcxpresso1549/board.mk b/hw/bsp/lpc15/boards/lpcxpresso1549/board.mk
new file mode 100644
index 000000000..a3e04cfa1
--- /dev/null
+++ b/hw/bsp/lpc15/boards/lpcxpresso1549/board.mk
@@ -0,0 +1,6 @@
+LD_FILE = $(BOARD_PATH)/lpc1549.ld
+
+JLINK_DEVICE = LPC1549
+
+# flash using pyocd
+flash: flash-jlink
diff --git a/hw/bsp/lpcxpresso1549/lpc1549.ld b/hw/bsp/lpc15/boards/lpcxpresso1549/lpc1549.ld
index 6dd12ade1..6dd12ade1 100644
--- a/hw/bsp/lpcxpresso1549/lpc1549.ld
+++ b/hw/bsp/lpc15/boards/lpcxpresso1549/lpc1549.ld
diff --git a/hw/bsp/lpcxpresso1549/lpcxpresso1549.c b/hw/bsp/lpc15/family.c
index a0d7c1eaf..cf873aa44 100644
--- a/hw/bsp/lpcxpresso1549/lpcxpresso1549.c
+++ b/hw/bsp/lpc15/family.c
@@ -25,7 +25,7 @@
*/
#include "chip.h"
-#include "../board.h"
+#include "bsp/board.h"
//--------------------------------------------------------------------+
// Forward USB interrupt events to TinyUSB IRQ Handler
diff --git a/hw/bsp/lpcxpresso1549/board.mk b/hw/bsp/lpc15/family.mk
index 2e69e8aa0..90e8ca504 100644
--- a/hw/bsp/lpcxpresso1549/board.mk
+++ b/hw/bsp/lpc15/family.mk
@@ -1,5 +1,7 @@
DEPS_SUBMODULES += hw/mcu/nxp
+include $(TOP)/$(BOARD_PATH)/board.mk
+
CFLAGS += \
-flto \
-mthumb \
@@ -17,9 +19,6 @@ CFLAGS += -Wno-error=strict-prototypes -Wno-error=unused-parameter -Wno-error=un
MCU_DIR = hw/mcu/nxp/lpcopen/lpc15xx/lpc_chip_15xx
-# All source paths should be relative to the top level.
-LD_FILE = hw/bsp/$(BOARD)/lpc1549.ld
-
SRC_C += \
src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c \
$(MCU_DIR)/../gcc/cr_startup_lpc15xx.c \
@@ -33,13 +32,8 @@ SRC_C += \
$(MCU_DIR)/src/sysinit_15xx.c
INC += \
+ $(TOP)/$(BOARD_PATH) \
$(TOP)/$(MCU_DIR)/inc
# For freeRTOS port source
FREERTOS_PORT = ARM_CM3
-
-# For flash-jlink target
-JLINK_DEVICE = LPC1549
-
-# flash using jlink
-flash: flash-jlink