Skip to content

Commit 80be1aa

Browse files
committed
bsp lpc11
1 parent 1867ba0 commit 80be1aa

File tree

10 files changed

+88
-91
lines changed

10 files changed

+88
-91
lines changed

.github/workflows/build_arm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- 'broadcom_32bit'
3636
- 'imxrt'
3737
- 'kinetis_k32 kinetis_kl'
38-
- 'lpc15 lpc18'
38+
- 'lpc11 lpc15 lpc18'
3939
- 'lpc54 lpc55'
4040
- 'mm32 msp432e4'
4141
- 'nrf'
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
MCU = 11uxx
2+
MCU_DRV = 11xx
3+
4+
CFLAGS += \
5+
-DCORE_M0 \
6+
-DCFG_EXAMPLE_MSC_READONLY \
7+
-DCFG_EXAMPLE_VIDEO_READONLY \
8+
-DCFG_TUSB_MEM_SECTION='__attribute__((section(".data.$$RAM2")))'
9+
10+
# mcu driver cause following warnings
11+
CFLAGS += \
12+
-Wno-error=strict-prototypes \
13+
-Wno-error=unused-parameter \
14+
-Wno-error=redundant-decls
15+
16+
# All source paths should be relative to the top level.
17+
LD_FILE = $(BOARD_PATH)/lpc11u37.ld
18+
19+
# For flash-jlink target
20+
JLINK_DEVICE = LPC11U37/401
21+
PYOCD_TARGET = lpc11u37
22+
23+
# flash using pyocd
24+
flash: flash-pyocd

hw/bsp/lpcxpresso11u37/lpcxpresso11u37.c renamed to hw/bsp/lpc11/boards/lpcxpresso11u37/lpcxpresso11u37.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*/
2626

2727
#include "chip.h"
28-
#include "../board.h"
28+
#include "bsp/board.h"
2929

3030
//--------------------------------------------------------------------+
3131
// Forward USB interrupt events to TinyUSB IRQ Handler
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
MCU = 11u6x
2+
MCU_DRV = 11u6x
3+
4+
CFLAGS += \
5+
-DCORE_M0PLUS \
6+
-D__VTOR_PRESENT=0 \
7+
-DCFG_TUSB_MEM_SECTION='__attribute__((section(".data.$$RAM3")))' \
8+
-DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))'
9+
10+
# All source paths should be relative to the top level.
11+
LD_FILE = $(BOARD_PATH)/lpc11u68.ld
12+
13+
# For flash-jlink target
14+
JLINK_DEVICE = LPC11U68
15+
PYOCD_TARGET = lpc11u68
16+
17+
# flash using pyocd
18+
flash: flash-pyocd

hw/bsp/lpcxpresso11u68/lpcxpresso11u68.c renamed to hw/bsp/lpc11/boards/lpcxpresso11u68/lpcxpresso11u68.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*/
2626

2727
#include "chip.h"
28-
#include "../board.h"
28+
#include "bsp/board.h"
2929

3030
//--------------------------------------------------------------------+
3131
// Forward USB interrupt events to TinyUSB IRQ Handler

hw/bsp/lpc11/family.mk

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
DEPS_SUBMODULES += hw/mcu/nxp/lpcopen
2+
3+
MCU_DIR = hw/mcu/nxp/lpcopen/lpc$(MCU)/lpc_chip_$(MCU)
4+
include $(TOP)/$(BOARD_PATH)/board.mk
5+
6+
CFLAGS += \
7+
-flto \
8+
-mthumb \
9+
-mabi=aapcs \
10+
-mcpu=cortex-m0plus \
11+
-nostdlib \
12+
-D__USE_LPCOPEN \
13+
-DCFG_TUSB_MCU=OPT_MCU_LPC11UXX \
14+
-DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))'
15+
16+
SRC_C += \
17+
src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c \
18+
$(MCU_DIR)/../gcc/cr_startup_lpc$(MCU_DRV).c \
19+
$(MCU_DIR)/src/chip_$(MCU_DRV).c \
20+
$(MCU_DIR)/src/clock_$(MCU_DRV).c \
21+
$(MCU_DIR)/src/iocon_$(MCU_DRV).c \
22+
$(MCU_DIR)/src/sysinit_$(MCU_DRV).c
23+
24+
ifeq ($(MCU),11u6x)
25+
SRC_C += \
26+
$(MCU_DIR)/src/gpio_$(MCU_DRV).c \
27+
$(MCU_DIR)/src/syscon_$(MCU_DRV).c \
28+
29+
else
30+
31+
SRC_C += \
32+
$(MCU_DIR)/src/gpio_$(MCU_DRV)_1.c \
33+
$(MCU_DIR)/src/sysctl_$(MCU_DRV).c
34+
endif
35+
36+
INC += \
37+
$(TOP)/$(MCU_DIR)/inc
38+
39+
# For freeRTOS port source
40+
FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH)/ARM_CM0
41+
42+
# For flash-jlink target
43+
JLINK_DEVICE = LPC11U68

hw/bsp/lpcxpresso11u37/board.mk

Lines changed: 0 additions & 46 deletions
This file was deleted.

hw/bsp/lpcxpresso11u68/board.mk

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)