Skip to content

Commit e09cf36

Browse files
authored
Merge pull request #2728 from hathach/hil-add-lpc11u377
[HIL] add lpc11u37 for hil test
2 parents e9f9d43 + 66193cb commit e09cf36

File tree

6 files changed

+24
-3
lines changed

6 files changed

+24
-3
lines changed

.idea/cmake.xml

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hw/bsp/lpc11/family.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,13 @@ void board_led_write(bool state) {
9090
Chip_GPIO_SetPinState(LPC_GPIO, LED_PORT, LED_PIN, state ? LED_STATE_ON : (1 - LED_STATE_ON));
9191
}
9292

93+
size_t board_get_unique_id(uint8_t id[], size_t max_len) {
94+
if ( max_len < 16 ) return 0;
95+
uint32_t* id32 = (uint32_t*) (uintptr_t) id;
96+
id32[0] = Chip_IAP_ReadUID();
97+
return 4;
98+
}
99+
93100
uint32_t board_button_read(void) {
94101
return BUTTON_STATE_ACTIVE == Chip_GPIO_GetPinState(LPC_GPIO, BUTTON_PORT, BUTTON_PIN);
95102
}

hw/bsp/lpc11/family.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ function(add_board_target BOARD_TARGET)
3030
${SDK_DIR}/../gcc/cr_startup_lpc${LPC_FAMILY}.c
3131
${SDK_DIR}/src/chip_${LPC_FAMILY}.c
3232
${SDK_DIR}/src/clock_${LPC_FAMILY}.c
33+
${SDK_DIR}/src/iap.c
3334
${SDK_DIR}/src/iocon_${LPC_FAMILY}.c
3435
${SDK_DIR}/src/sysinit_${LPC_FAMILY}.c
3536
)

hw/bsp/lpc11/family.mk

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,18 @@ CFLAGS += \
99
-DCFG_TUSB_MCU=OPT_MCU_LPC11UXX \
1010
-DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))'
1111

12-
LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs
12+
# mcu driver cause following warnings
13+
CFLAGS += \
14+
-Wno-error=incompatible-pointer-types \
15+
16+
LDFLAGS_GCC += --specs=nosys.specs --specs=nano.specs
1317

1418
SRC_C += \
1519
src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c \
1620
$(MCU_DIR)/../gcc/cr_startup_lpc$(MCU_DRV).c \
1721
$(MCU_DIR)/src/chip_$(MCU_DRV).c \
1822
$(MCU_DIR)/src/clock_$(MCU_DRV).c \
23+
$(MCU_DIR)/src/iap.c \
1924
$(MCU_DIR)/src/iocon_$(MCU_DRV).c \
2025
$(MCU_DIR)/src/sysinit_$(MCU_DRV).c
2126

test/hil/rpi.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@
4646
"flasher": "jlink",
4747
"flasher_sn": "000831174392",
4848
"flasher_args": "-device R7FA4M1AB"
49+
},
50+
{
51+
"name": "lpcxpresso11u37",
52+
"uid": "17121919",
53+
"flasher": "jlink",
54+
"flasher_sn": "000724441579",
55+
"flasher_args": "-device LPC11U37/401"
4956
}
5057
]
5158
}

tools/get_deps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
'2204191ec76283371419fbcec207da02e1bc22fa',
5050
'nuc'],
5151
'hw/mcu/nxp/lpcopen': ['https://github.com/hathach/nxp_lpcopen.git',
52-
'04bfe7a5f6ee74a89a28ad618d3367dcfcfb7d83',
52+
'b41cf930e65c734d8ec6de04f1d57d46787c76ae',
5353
'lpc11 lpc13 lpc15 lpc17 lpc18 lpc40 lpc43'],
5454
'hw/mcu/nxp/mcux-sdk': ['https://github.com/hathach/mcux-sdk.git',
5555
'144f1eb7ea8c06512e12f12b27383601c0272410',

0 commit comments

Comments
 (0)