Signed-off-by: HiFiPhile <admin@hifiphile.com>
This commit is contained in:
HiFiPhile
2026-03-06 15:47:19 +01:00
parent 860f0e01f2
commit e658e23435
17 changed files with 39 additions and 24 deletions

View File

@ -0,0 +1 @@
board:lpcxpresso54114

View File

@ -384,12 +384,12 @@ static int _count_utf8_bytes(const uint16_t *buf, size_t len) {
return (int) total_bytes;
}
static void print_utf16(uint16_t *temp_buf, size_t buf_len) {
if ((temp_buf[0] & 0xff) == 0) return;// empty
size_t utf16_len = ((temp_buf[0] & 0xff) - 2) / sizeof(uint16_t);
size_t utf8_len = (size_t) _count_utf8_bytes(temp_buf + 1, utf16_len);
_convert_utf16le_to_utf8(temp_buf + 1, utf16_len, (uint8_t *) temp_buf, sizeof(uint16_t) * buf_len);
((uint8_t *) temp_buf)[utf8_len] = '\0';
static void print_utf16(uint16_t *buf, size_t buf_len) {
if ((buf[0] & 0xff) == 0) return;// empty
size_t utf16_len = ((buf[0] & 0xff) - 2) / sizeof(uint16_t);
size_t utf8_len = (size_t) _count_utf8_bytes(buf + 1, utf16_len);
_convert_utf16le_to_utf8(buf + 1, utf16_len, (uint8_t *) buf, sizeof(uint16_t) * buf_len);
((uint8_t *) buf)[utf8_len] = '\0';
printf("%s", (char *) temp_buf);
printf("%s", (char *) buf);
}

View File

@ -0,0 +1 @@
board:lpcxpresso54114

View File

@ -1 +1,2 @@
mcu:RP2040
board:lpcxpresso54114

View File

@ -0,0 +1 @@
board:lpcxpresso54114

View File

@ -0,0 +1 @@
board:lpcxpresso54114

View File

@ -0,0 +1 @@
board:lpcxpresso54114

View File

@ -0,0 +1 @@
board:lpcxpresso54114

View File

@ -6,10 +6,8 @@ set(PYOCD_TARGET LPC54114)
set(LD_FILE_GNU ${SDK_DIR}/devices/${MCU_VARIANT}/gcc/LPC54114J256_cm4_flash.ld)
# Device port default to PORT1 Highspeed
if (NOT DEFINED PORT)
set(PORT 1)
endif()
# Only Port 0 Full-Speed
set(RHPORT_DEVICE 0)
function(update_board TARGET)
target_compile_definitions(${TARGET} PUBLIC

View File

@ -8,8 +8,11 @@ set(NXPLINK_DEVICE LPC54608:LPCXpresso54608)
set(LD_FILE_GNU ${SDK_DIR}/devices/${MCU_VARIANT}/gcc/LPC54608J512_flash.ld)
# Device port default to PORT1 Highspeed
if (NOT DEFINED PORT)
set(PORT 1)
if (NOT DEFINED RHPORT_DEVICE)
set(RHPORT_DEVICE 1)
endif()
if (NOT DEFINED RHPORT_HOST)
set(RHPORT_HOST 0)
endif()
function(update_board TARGET)

View File

@ -8,8 +8,11 @@ set(NXPLINK_DEVICE LPC54628:LPCXpresso54628)
set(LD_FILE_GNU ${SDK_DIR}/devices/${MCU_VARIANT}/gcc/LPC54628J512_flash.ld)
# Device port default to PORT1 Highspeed
if (NOT DEFINED PORT)
set(PORT 1)
if (NOT DEFINED RHPORT_DEVICE)
set(RHPORT_DEVICE 1)
endif()
if (NOT DEFINED RHPORT_HOST)
set(RHPORT_HOST 0)
endif()
function(update_board TARGET)

View File

@ -82,4 +82,3 @@ place in DATA_region { block RW };
place in DATA_region { block ZI };
place in DATA_region { last block HEAP };
place in CSTACK_region { block CSTACK };

View File

@ -80,4 +80,3 @@ place in DATA_region { block RW };
place in DATA_region { block ZI };
place in DATA_region { last block HEAP };
place in CSTACK_region { block CSTACK };

View File

@ -2,8 +2,8 @@ UF2_FAMILY_ID = 0x2abc77ec
include $(TOP)/$(BOARD_PATH)/board.mk
CPU_CORE ?= cortex-m33
MCUX_DIR = /hw/mcu/nxp/mcuxsdk-core
SDK_DIR = /hw/mcu/nxp/mcux-devices-lpc
MCUX_DIR = hw/mcu/nxp/mcuxsdk-core
SDK_DIR = hw/mcu/nxp/mcux-devices-lpc
# Default to Highspeed PORT1
PORT ?= 1

View File

@ -71,12 +71,17 @@
#define TUP_DCD_ENDPOINT_MAX 5
#elif TU_CHECK_MCU(OPT_MCU_LPC54)
#include "fsl_device_registers.h"
// TODO USB0 has 5, USB1 has 6
#define TUP_USBIP_IP3511
#define TUP_USBIP_IP3516
#define TUP_USBIP_OHCI
#define TUP_USBIP_OHCI_NXP
#define TUP_OHCI_RHPORTS 1 // 1 downstream port
#if !defined(LPC54114_cm4_SERIES) && !defined(LPC54114_cm0plus_SERIES)
#define TUP_USBIP_IP3516
#define TUP_USBIP_OHCI
#define TUP_USBIP_OHCI_NXP
#define TUP_OHCI_RHPORTS 1 // 1 downstream port
#endif
#define TUP_DCD_ENDPOINT_MAX 6

View File

@ -7,6 +7,7 @@ hsi
inout
mot
pris
ptd
ser
sie
synopsys

View File

@ -66,7 +66,7 @@ deps_optional = {
'lpc51 lpc55 mcx'],
'hw/mcu/nxp/mcux-sdk': ['https://github.com/nxp-mcuxpresso/mcux-sdk',
'a1bdae309a14ec95a4f64a96d3315a4f89c397c6',
'kinetis_k kinetis_k32l2 kinetis_kl rw61x imxrt'],
'kinetis_k kinetis_k32l2 kinetis_kl lpc54 rw61x imxrt'],
'hw/mcu/nxp/mcux-devices-lpc': ['https://github.com/nxp-mcuxpresso/mcux-devices-lpc',
'8096b783ec09d0d1c8629025a5f9d8e7df26e520',
'lpc51 lpc55'],