diff --git a/bsp/nxp/mcx/mcxn/Libraries/drivers/drv_uart.c b/bsp/nxp/mcx/mcxn/Libraries/drivers/drv_uart.c index 7f890ed2ba..fd1ac971e7 100644 --- a/bsp/nxp/mcx/mcxn/Libraries/drivers/drv_uart.c +++ b/bsp/nxp/mcx/mcxn/Libraries/drivers/drv_uart.c @@ -23,29 +23,46 @@ /* lpc uart driver */ struct mcx_uart { - struct rt_serial_device *serial; - LPUART_Type *uart_base; - IRQn_Type irqn; - clock_name_t clock_src; - clock_attach_id_t clock_attach_id; - clock_ip_name_t clock_ip_name; - clock_div_name_t clock_div_name; - char *device_name; + struct rt_serial_device *serial; /* Select serial device */ + LPUART_Type *uart_base; /* serial base */ + IRQn_Type irqn; /* serial interrupt */ + clock_name_t clock_src; /* serial RTC */ + clock_attach_id_t clock_attach_id; /* RTC ID */ + clock_ip_name_t clock_ip_name; /* serial clock name */ + clock_div_name_t clock_div_name; /* serial clock div */ + char *device_name; /* serial device name */ }; static void uart_isr(struct rt_serial_device *serial); +#if defined(BSP_USING_UART2) +struct rt_serial_device serial2; + +void LP_FLEXCOMM2_IRQHandler(void) +{ + uart_isr(&serial2); /* Serial interrupt handling function */ +} +#endif /* BSP_USING_UART2 */ #if defined(BSP_USING_UART4) struct rt_serial_device serial4; void LP_FLEXCOMM4_IRQHandler(void) { - uart_isr(&serial4); + uart_isr(&serial4); /* Serial interrupt handling function */ } #endif /* BSP_USING_UART4 */ -#if defined(BSP_USING_UART6) +#if defined(BSP_USING_UART5) +struct rt_serial_device serial5; + +void LP_FLEXCOMM5_IRQHandler(void) +{ + uart_isr(&serial5); /* Serial interrupt handling function */ +} +#endif /* BSP_USING_UART5 */ + +#if defined(BSP_USING_UART6) /* same UART4 */ struct rt_serial_device serial6; void LP_FLEXCOMM6_IRQHandler(void) @@ -54,8 +71,20 @@ void LP_FLEXCOMM6_IRQHandler(void) } #endif /* BSP_USING_UART6 */ -static const struct mcx_uart uarts[] = +static const struct mcx_uart uarts[] = /* Initializes the above structure */ { +#ifdef BSP_USING_UART2 + { + &serial2, + LPUART2, + LP_FLEXCOMM2_IRQn, + kCLOCK_Fro12M, + kFRO12M_to_FLEXCOMM2, + kCLOCK_LPFlexComm2, + kCLOCK_DivFlexcom2Clk, + "uart2", + }, +#endif #ifdef BSP_USING_UART4 { &serial4, @@ -68,6 +97,18 @@ static const struct mcx_uart uarts[] = "uart4", }, #endif +#ifdef BSP_USING_UART5 + { + &serial5, + LPUART5, + LP_FLEXCOMM5_IRQn, + kCLOCK_Fro12M, + kFRO12M_to_FLEXCOMM5, + kCLOCK_LPFlexComm5, + kCLOCK_DivFlexcom5Clk, + "uart5", + }, +#endif #ifdef BSP_USING_UART6 { &serial6, @@ -82,13 +123,18 @@ static const struct mcx_uart uarts[] = #endif }; - -static rt_err_t mcx_configure(struct rt_serial_device *serial, struct serial_configure *cfg) +/** + * Configuring the serial port Module. + * + * @param serial device + * @param Configure the serial port configuration structure to set the TX RX features + */ +static rt_err_t mcx_configure(struct rt_serial_device *serial, struct serial_configure *cfg) /* Configuring the serial port Module */ { - struct mcx_uart *uart; - lpuart_config_t config; + struct mcx_uart *uart; /* Serial port hardware structure, calling the structure initialized above */ + lpuart_config_t config;/* It contains basic configuration parameters of the serial port, such as baud rate, data bit, stop bit, and parity check */ - RT_ASSERT(serial != RT_NULL); + RT_ASSERT(serial != RT_NULL); /* assert */ RT_ASSERT(cfg != RT_NULL); uart = (struct mcx_uart *)serial->parent.user_data; @@ -119,11 +165,18 @@ static rt_err_t mcx_configure(struct rt_serial_device *serial, struct serial_con return RT_EOK; } -static rt_err_t mcx_control(struct rt_serial_device *serial, int cmd, void *arg) +/** + * Serial Control Function. + * + * @param serial device struct + * @param control Cmd + * @param Parameters passed to the control command + */ +static rt_err_t mcx_control(struct rt_serial_device *serial, int cmd, void *arg)/* serial control */ { - struct mcx_uart *uart = (struct mcx_uart *)serial->parent.user_data; + struct mcx_uart *uart = (struct mcx_uart *)serial->parent.user_data; /* Convert the type to struct mcx_uart */ - RT_ASSERT(uart != RT_NULL); + RT_ASSERT(uart != RT_NULL); /* Assert */ switch (cmd) { @@ -143,6 +196,12 @@ static rt_err_t mcx_control(struct rt_serial_device *serial, int cmd, void *arg) return RT_EOK; } +/** + * Sends a single character function to a serial device. + * + * @param serial device struct + * @param The serial port character you want to send + */ static int mcx_putc(struct rt_serial_device *serial, char ch) { struct mcx_uart *uart = (struct mcx_uart *)serial->parent.user_data; @@ -158,6 +217,8 @@ static int mcx_getc(struct rt_serial_device *serial) struct mcx_uart *uart = (struct mcx_uart *)serial->parent.user_data; if (kLPUART_RxDataRegFullInterruptEnable & LPUART_GetStatusFlags(uart->uart_base)) +/* Check whether the receive cache is full and read the status flag bit of the status register + This flag is read, indicating that there is data in the cache and can be read */ { return LPUART_ReadByte(uart->uart_base); } @@ -174,7 +235,7 @@ static int mcx_getc(struct rt_serial_device *serial) */ static void uart_isr(struct rt_serial_device *serial) { - struct mcx_uart *uart; + struct mcx_uart *uart; /* Create a serial port hardware structure variable */ RT_ASSERT(serial != RT_NULL); @@ -201,21 +262,28 @@ static const struct rt_uart_ops mcx_uart_ops = int rt_hw_uart_init(void) { - struct serial_configure config = RT_SERIAL_CONFIG_DEFAULT; + struct serial_configure config = RT_SERIAL_CONFIG_DEFAULT; /* initial struct [115200,8,1,NONE] */ int i; - - for (i = 0; i < sizeof(uarts) / sizeof(uarts[0]); i++) +/* Registers loops for multiple serial devices */ + for (i = 0; i < sizeof(uarts) / sizeof(uarts[0]); i++) /* sizeof(uarts) / sizeof(uarts[0] : Calculate the number of struct mcx_uart serial ports */ { uarts[i].serial->ops = &mcx_uart_ops; uarts[i].serial->config = config; - /* register UART device */ +/** + * register UART device. + * + * @param Indicates the structure of the serial port device to be registered + * @param device name + * @param Flag bit mask + * @param A pointer to the current device that is used as user private data at registration + */ rt_hw_serial_register(uarts[i].serial, uarts[i].device_name, RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_INT_RX, (void *)&uarts[i]); } return 0; } -INIT_BOARD_EXPORT(rt_hw_uart_init); +INIT_BOARD_EXPORT(rt_hw_uart_init); /* RT-Thread Automatic initialization mechanism */ #endif /*BSP_USING_SERIAL */ diff --git a/bsp/nxp/mcx/mcxn/frdm-mcxn947/.config b/bsp/nxp/mcx/mcxn/frdm-mcxn947/.config index 3854df61ca..644d2302e2 100644 --- a/bsp/nxp/mcx/mcxn/frdm-mcxn947/.config +++ b/bsp/nxp/mcx/mcxn/frdm-mcxn947/.config @@ -608,6 +608,28 @@ CONFIG_PKG_RT_VSNPRINTF_FULL_VER="latest" # peripheral libraries and drivers # +# +# HAL & SDK Drivers +# + +# +# STM32 HAL & SDK Drivers +# +# CONFIG_PKG_USING_STM32WB55_SDK is not set +# CONFIG_PKG_USING_STM32_SDIO is not set +# CONFIG_PKG_USING_BLUETRUM_SDK is not set +# CONFIG_PKG_USING_EMBARC_BSP is not set +# CONFIG_PKG_USING_ESP_IDF is not set + +# +# Kendryte SDK +# +# CONFIG_PKG_USING_K210_SDK is not set +# CONFIG_PKG_USING_KENDRYTE_SDK is not set +# CONFIG_PKG_USING_NRF5X_SDK is not set +# CONFIG_PKG_USING_NRFX is not set +# CONFIG_PKG_USING_RASPBERRYPI_PICO_SDK is not set + # # sensors drivers # @@ -689,9 +711,8 @@ CONFIG_PKG_RT_VSNPRINTF_FULL_VER="latest" # CONFIG_PKG_USING_FT6236 is not set # CONFIG_PKG_USING_XPT2046_TOUCH is not set # CONFIG_PKG_USING_CST816X is not set +# CONFIG_PKG_USING_CST812T is not set # CONFIG_PKG_USING_REALTEK_AMEBA is not set -# CONFIG_PKG_USING_STM32_SDIO is not set -# CONFIG_PKG_USING_ESP_IDF is not set # CONFIG_PKG_USING_BUTTON is not set # CONFIG_PKG_USING_PCF8574 is not set # CONFIG_PKG_USING_SX12XX is not set @@ -699,14 +720,6 @@ CONFIG_PKG_RT_VSNPRINTF_FULL_VER="latest" # CONFIG_PKG_USING_LEDBLINK is not set # CONFIG_PKG_USING_LITTLED is not set # CONFIG_PKG_USING_LKDGUI is not set -# CONFIG_PKG_USING_NRF5X_SDK is not set -# CONFIG_PKG_USING_NRFX is not set - -# -# Kendryte SDK -# -# CONFIG_PKG_USING_K210_SDK is not set -# CONFIG_PKG_USING_KENDRYTE_SDK is not set # CONFIG_PKG_USING_INFRARED is not set # CONFIG_PKG_USING_MULTI_INFRARED is not set # CONFIG_PKG_USING_AGILE_BUTTON is not set @@ -721,7 +734,6 @@ CONFIG_PKG_RT_VSNPRINTF_FULL_VER="latest" # CONFIG_PKG_USING_AS608 is not set # CONFIG_PKG_USING_RC522 is not set # CONFIG_PKG_USING_WS2812B is not set -# CONFIG_PKG_USING_EMBARC_BSP is not set # CONFIG_PKG_USING_EXTERN_RTC_DRIVERS is not set # CONFIG_PKG_USING_MULTI_RTIMER is not set # CONFIG_PKG_USING_MAX7219 is not set @@ -744,7 +756,6 @@ CONFIG_PKG_RT_VSNPRINTF_FULL_VER="latest" # CONFIG_PKG_USING_VIRTUAL_SENSOR is not set # CONFIG_PKG_USING_VDEVICE is not set # CONFIG_PKG_USING_SGM706 is not set -# CONFIG_PKG_USING_STM32WB55_SDK is not set # CONFIG_PKG_USING_RDA58XX is not set # CONFIG_PKG_USING_LIBNFC is not set # CONFIG_PKG_USING_MFOC is not set @@ -754,7 +765,6 @@ CONFIG_PKG_RT_VSNPRINTF_FULL_VER="latest" # CONFIG_PKG_USING_ROSSERIAL is not set # CONFIG_PKG_USING_MICRO_ROS is not set # CONFIG_PKG_USING_MCP23008 is not set -# CONFIG_PKG_USING_BLUETRUM_SDK is not set # CONFIG_PKG_USING_MISAKA_AT24CXX is not set # CONFIG_PKG_USING_MISAKA_RGB_BLING is not set # CONFIG_PKG_USING_LORA_MODEM_DRIVER is not set @@ -762,7 +772,6 @@ CONFIG_PKG_RT_VSNPRINTF_FULL_VER="latest" # CONFIG_PKG_USING_MB85RS16 is not set # CONFIG_PKG_USING_RFM300 is not set # CONFIG_PKG_USING_IO_INPUT_FILTER is not set -# CONFIG_PKG_USING_RASPBERRYPI_PICO_SDK is not set # CONFIG_PKG_USING_LRF_NV7LIDAR is not set # CONFIG_PKG_USING_AIP650 is not set # CONFIG_PKG_USING_FINGERPRINT is not set @@ -1099,6 +1108,8 @@ CONFIG_SOC_MCXN947=y CONFIG_BSP_USING_PIN=y CONFIG_BSP_USING_UART=y CONFIG_BSP_USING_UART4=y +CONFIG_BSP_USING_UART5=y +CONFIG_BSP_USING_UART2=y # CONFIG_BSP_USING_I2C is not set # CONFIG_BSP_USING_SPI is not set # CONFIG_BSP_USING_ADC is not set diff --git a/bsp/nxp/mcx/mcxn/frdm-mcxn947/board/Kconfig b/bsp/nxp/mcx/mcxn/frdm-mcxn947/board/Kconfig index e246de745e..673c8da05f 100644 --- a/bsp/nxp/mcx/mcxn/frdm-mcxn947/board/Kconfig +++ b/bsp/nxp/mcx/mcxn/frdm-mcxn947/board/Kconfig @@ -20,18 +20,23 @@ menu "On-chip Peripheral Drivers" default y menuconfig BSP_USING_UART - config BSP_USING_UART - bool "Enable UART" - select RT_USING_UART - default y + bool "Enable UART" + default y + select RT_USING_SERIAL + if BSP_USING_UART + config BSP_USING_UART4 + bool "Enable UART4" + default y + + config BSP_USING_UART5 + bool "Enable UART5" + default n - if BSP_USING_UART - config BSP_USING_UART4 - bool "Enable Flexcomm4 as UART" - default y - - endif + config BSP_USING_UART2 + bool "Enable UART2" + default n + endif menuconfig BSP_USING_I2C config BSP_USING_I2C diff --git a/bsp/nxp/mcx/mcxn/frdm-mcxn947/board/MCUX_Config/board/pin_mux.c b/bsp/nxp/mcx/mcxn/frdm-mcxn947/board/MCUX_Config/board/pin_mux.c index e59cde7b66..e5ff7dd082 100644 --- a/bsp/nxp/mcx/mcxn/frdm-mcxn947/board/MCUX_Config/board/pin_mux.c +++ b/bsp/nxp/mcx/mcxn/frdm-mcxn947/board/MCUX_Config/board/pin_mux.c @@ -25,6 +25,17 @@ void BOARD_InitBootPins(void) PORT1->PCR[8] = PORT_PCR_MUX(2) | PORT_PCR_PS(0) | PORT_PCR_IBE(1); /* FC4_P0 */ PORT1->PCR[9] = PORT_PCR_MUX(2) | PORT_PCR_PS(0) | PORT_PCR_IBE(1); /* FC4_P1 */ + /* Mikro Bus UART */ +// PORT1->PCR[16] = PORT_PCR_MUX(2) | PORT_PCR_PS(0) | PORT_PCR_IBE(1); /* FC5_P0 */ +// PORT1->PCR[17] = PORT_PCR_MUX(2) | PORT_PCR_PS(0) | PORT_PCR_IBE(1); /* FC5_P1 */ + + PORT1->PCR[16] = PORT_PCR_MUX(2) | PORT_PCR_PS(0) | PORT_PCR_PE(1) | PORT_PCR_IBE(1); /* FC5_UART */ + PORT1->PCR[17] = PORT_PCR_MUX(2) | PORT_PCR_PS(0) | PORT_PCR_PE(1) | PORT_PCR_IBE(1); /* FC5_UART */ + + /* MCX_RST UART */ + PORT4->PCR[2] = PORT_PCR_MUX(2) | PORT_PCR_PS(0) | PORT_PCR_PE(1) | PORT_PCR_IBE(1); /* FC2_UART */ + PORT4->PCR[3] = PORT_PCR_MUX(2) | PORT_PCR_PS(0) | PORT_PCR_PE(1) | PORT_PCR_IBE(1); /* FC2_UART */ + PORT0->PCR[6] = PORT_PCR_MUX(12) | PORT_PCR_PS(1) | PORT_PCR_PE(1) | PORT_PCR_IBE(1) | PORT_PCR_SRE(0) | PORT_PCR_ODE(0); /* CLKOUT */ @@ -61,8 +72,8 @@ void BOARD_InitBootPins(void) PORT1->PCR[13] = PORT_PCR_MUX(3) | PORT_PCR_PS(0) | PORT_PCR_PE(1) | PORT_PCR_IBE(1); /* FC3_1 SCK */ PORT1->PCR[14] = PORT_PCR_MUX(3) | PORT_PCR_PS(0) | PORT_PCR_PE(1) | PORT_PCR_IBE(1); /* FC3_2 SDI/D[1] */ PORT1->PCR[15] = PORT_PCR_MUX(3) | PORT_PCR_PS(0) | PORT_PCR_PE(1) | PORT_PCR_IBE(1); /* FC3_3 CS0 */ - PORT1->PCR[16] = PORT_PCR_MUX(3) | PORT_PCR_PS(0) | PORT_PCR_PE(1) | PORT_PCR_IBE(1); /* FC3_4 D[3] */ - PORT1->PCR[17] = PORT_PCR_MUX(3) | PORT_PCR_PS(0) | PORT_PCR_PE(1) | PORT_PCR_IBE(1); /* FC3_5 D[2] */ +// PORT1->PCR[16] = PORT_PCR_MUX(3) | PORT_PCR_PS(0) | PORT_PCR_PE(1) | PORT_PCR_IBE(1); /* FC3_4 D[3] */ +// PORT1->PCR[17] = PORT_PCR_MUX(3) | PORT_PCR_PS(0) | PORT_PCR_PE(1) | PORT_PCR_IBE(1); /* FC3_5 D[2] */ // PORT1->PCR[8] = PORT_PCR_MUX(3) | PORT_PCR_PS(0) | PORT_PCR_PE(1) | PORT_PCR_IBE(1); /* FC5_4 D[3] */ // PORT1->PCR[9] = PORT_PCR_MUX(3) | PORT_PCR_PS(0) | PORT_PCR_PE(1) | PORT_PCR_IBE(1); /* FC5_5 D[2] */ diff --git a/bsp/nxp/mcx/mcxn/frdm-mcxn947/project.uvoptx b/bsp/nxp/mcx/mcxn/frdm-mcxn947/project.uvoptx index f94474bf88..6adddf0a96 100644 --- a/bsp/nxp/mcx/mcxn/frdm-mcxn947/project.uvoptx +++ b/bsp/nxp/mcx/mcxn/frdm-mcxn947/project.uvoptx @@ -73,7 +73,7 @@ 0 - 0 + 1 0 1 @@ -183,7 +183,7 @@ Applications - 0 + 1 0 0 0 @@ -214,7 +214,7 @@ 0 0 0 - ..\..\..\..\components\libc\compilers\armlibc\syscall_mem.c + ..\..\..\..\..\components\libc\compilers\armlibc\syscall_mem.c syscall_mem.c 0 0 @@ -226,7 +226,7 @@ 0 0 0 - ..\..\..\..\components\libc\compilers\armlibc\syscalls.c + ..\..\..\..\..\components\libc\compilers\armlibc\syscalls.c syscalls.c 0 0 @@ -238,7 +238,7 @@ 0 0 0 - ..\..\..\..\components\libc\compilers\common\cctype.c + ..\..\..\..\..\components\libc\compilers\common\cctype.c cctype.c 0 0 @@ -250,7 +250,7 @@ 0 0 0 - ..\..\..\..\components\libc\compilers\common\cstdlib.c + ..\..\..\..\..\components\libc\compilers\common\cstdlib.c cstdlib.c 0 0 @@ -262,7 +262,7 @@ 0 0 0 - ..\..\..\..\components\libc\compilers\common\cstring.c + ..\..\..\..\..\components\libc\compilers\common\cstring.c cstring.c 0 0 @@ -274,7 +274,7 @@ 0 0 0 - ..\..\..\..\components\libc\compilers\common\ctime.c + ..\..\..\..\..\components\libc\compilers\common\ctime.c ctime.c 0 0 @@ -286,7 +286,7 @@ 0 0 0 - ..\..\..\..\components\libc\compilers\common\cunistd.c + ..\..\..\..\..\components\libc\compilers\common\cunistd.c cunistd.c 0 0 @@ -298,7 +298,7 @@ 0 0 0 - ..\..\..\..\components\libc\compilers\common\cwchar.c + ..\..\..\..\..\components\libc\compilers\common\cwchar.c cwchar.c 0 0 @@ -318,7 +318,7 @@ 0 0 0 - ..\..\..\..\components\drivers\core\device.c + ..\..\..\..\..\components\drivers\core\device.c device.c 0 0 @@ -330,7 +330,7 @@ 0 0 0 - ..\..\..\..\components\drivers\hwtimer\hwtimer.c + ..\..\..\..\..\components\drivers\hwtimer\hwtimer.c hwtimer.c 0 0 @@ -342,7 +342,7 @@ 0 0 0 - ..\..\..\..\components\drivers\ipc\completion.c + ..\..\..\..\..\components\drivers\ipc\completion.c completion.c 0 0 @@ -354,7 +354,7 @@ 0 0 0 - ..\..\..\..\components\drivers\ipc\dataqueue.c + ..\..\..\..\..\components\drivers\ipc\dataqueue.c dataqueue.c 0 0 @@ -366,7 +366,7 @@ 0 0 0 - ..\..\..\..\components\drivers\ipc\pipe.c + ..\..\..\..\..\components\drivers\ipc\pipe.c pipe.c 0 0 @@ -378,7 +378,7 @@ 0 0 0 - ..\..\..\..\components\drivers\ipc\ringblk_buf.c + ..\..\..\..\..\components\drivers\ipc\ringblk_buf.c ringblk_buf.c 0 0 @@ -390,7 +390,7 @@ 0 0 0 - ..\..\..\..\components\drivers\ipc\ringbuffer.c + ..\..\..\..\..\components\drivers\ipc\ringbuffer.c ringbuffer.c 0 0 @@ -402,7 +402,7 @@ 0 0 0 - ..\..\..\..\components\drivers\ipc\waitqueue.c + ..\..\..\..\..\components\drivers\ipc\waitqueue.c waitqueue.c 0 0 @@ -414,7 +414,7 @@ 0 0 0 - ..\..\..\..\components\drivers\ipc\workqueue.c + ..\..\..\..\..\components\drivers\ipc\workqueue.c workqueue.c 0 0 @@ -426,7 +426,7 @@ 0 0 0 - ..\..\..\..\components\drivers\pin\pin.c + ..\..\..\..\..\components\drivers\pin\pin.c pin.c 0 0 @@ -438,7 +438,7 @@ 0 0 0 - ..\..\..\..\components\drivers\serial\serial.c + ..\..\..\..\..\components\drivers\serial\serial.c serial.c 0 0 @@ -526,7 +526,7 @@ 0 0 0 - ..\..\..\..\components\finsh\shell.c + ..\..\..\..\..\components\finsh\shell.c shell.c 0 0 @@ -538,7 +538,7 @@ 0 0 0 - ..\..\..\..\components\finsh\msh.c + ..\..\..\..\..\components\finsh\msh.c msh.c 0 0 @@ -550,7 +550,7 @@ 0 0 0 - ..\..\..\..\components\finsh\msh_parse.c + ..\..\..\..\..\components\finsh\msh_parse.c msh_parse.c 0 0 @@ -562,7 +562,7 @@ 0 0 0 - ..\..\..\..\components\finsh\cmd.c + ..\..\..\..\..\components\finsh\cmd.c cmd.c 0 0 @@ -582,7 +582,7 @@ 0 0 0 - ..\..\..\..\src\clock.c + ..\..\..\..\..\src\clock.c clock.c 0 0 @@ -594,7 +594,7 @@ 0 0 0 - ..\..\..\..\src\components.c + ..\..\..\..\..\src\components.c components.c 0 0 @@ -606,7 +606,7 @@ 0 0 0 - ..\..\..\..\src\idle.c + ..\..\..\..\..\src\idle.c idle.c 0 0 @@ -618,7 +618,7 @@ 0 0 0 - ..\..\..\..\src\ipc.c + ..\..\..\..\..\src\ipc.c ipc.c 0 0 @@ -630,7 +630,7 @@ 0 0 0 - ..\..\..\..\src\irq.c + ..\..\..\..\..\src\irq.c irq.c 0 0 @@ -642,7 +642,7 @@ 0 0 0 - ..\..\..\..\src\kservice.c + ..\..\..\..\..\src\kservice.c kservice.c 0 0 @@ -654,7 +654,7 @@ 0 0 0 - ..\..\..\..\src\mem.c + ..\..\..\..\..\src\mem.c mem.c 0 0 @@ -666,7 +666,7 @@ 0 0 0 - ..\..\..\..\src\mempool.c + ..\..\..\..\..\src\mempool.c mempool.c 0 0 @@ -678,7 +678,7 @@ 0 0 0 - ..\..\..\..\src\object.c + ..\..\..\..\..\src\object.c object.c 0 0 @@ -690,7 +690,7 @@ 0 0 0 - ..\..\..\..\src\scheduler_comm.c + ..\..\..\..\..\src\scheduler_comm.c scheduler_comm.c 0 0 @@ -702,7 +702,7 @@ 0 0 0 - ..\..\..\..\src\scheduler_up.c + ..\..\..\..\..\src\scheduler_up.c scheduler_up.c 0 0 @@ -714,7 +714,7 @@ 0 0 0 - ..\..\..\..\src\thread.c + ..\..\..\..\..\src\thread.c thread.c 0 0 @@ -726,7 +726,7 @@ 0 0 0 - ..\..\..\..\src\timer.c + ..\..\..\..\..\src\timer.c timer.c 0 0 @@ -746,7 +746,7 @@ 0 0 0 - ..\..\..\..\libcpu\arm\common\atomic_arm.c + ..\..\..\..\..\libcpu\arm\common\atomic_arm.c atomic_arm.c 0 0 @@ -758,7 +758,7 @@ 0 0 0 - ..\..\..\..\libcpu\arm\common\div0.c + ..\..\..\..\..\libcpu\arm\common\div0.c div0.c 0 0 @@ -770,7 +770,7 @@ 0 0 0 - ..\..\..\..\libcpu\arm\common\showmem.c + ..\..\..\..\..\libcpu\arm\common\showmem.c showmem.c 0 0 @@ -782,7 +782,7 @@ 0 0 0 - ..\..\..\..\libcpu\arm\cortex-m33\context_rvds.S + ..\..\..\..\..\libcpu\arm\cortex-m33\context_rvds.S context_rvds.S 0 0 @@ -794,7 +794,7 @@ 0 0 0 - ..\..\..\..\libcpu\arm\cortex-m33\cpuport.c + ..\..\..\..\..\libcpu\arm\cortex-m33\cpuport.c cpuport.c 0 0 @@ -806,7 +806,7 @@ 0 0 0 - ..\..\..\..\libcpu\arm\cortex-m33\syscall_rvds.S + ..\..\..\..\..\libcpu\arm\cortex-m33\syscall_rvds.S syscall_rvds.S 0 0 @@ -818,7 +818,7 @@ 0 0 0 - ..\..\..\..\libcpu\arm\cortex-m33\trustzone.c + ..\..\..\..\..\libcpu\arm\cortex-m33\trustzone.c trustzone.c 0 0 @@ -1398,8 +1398,8 @@ 0 0 0 - ..\..\..\..\components\utilities\ulog\backend\console_be.c - console_be.c + ..\..\..\..\..\components\utilities\ulog\ulog.c + ulog.c 0 0 @@ -1410,8 +1410,8 @@ 0 0 0 - ..\..\..\..\components\utilities\ulog\ulog.c - ulog.c + ..\..\..\..\..\components\utilities\ulog\backend\console_be.c + console_be.c 0 0 diff --git a/bsp/nxp/mcx/mcxn/frdm-mcxn947/project.uvprojx b/bsp/nxp/mcx/mcxn/frdm-mcxn947/project.uvprojx index 9a05f214f6..0ff48dbef6 100644 --- a/bsp/nxp/mcx/mcxn/frdm-mcxn947/project.uvprojx +++ b/bsp/nxp/mcx/mcxn/frdm-mcxn947/project.uvprojx @@ -340,7 +340,7 @@ --target=arm-arm-none-eabi __STDC_LIMIT_MACROS, RT_USING_ARMLIBC, CPU_MCXN947VDF_cm33_core0, RT_USING_LIBC, __CLK_TCK=RT_TICK_PER_SECOND, __RTTHREAD__, DEBUG - applications;..\..\..\..\libcpu\arm\common;.;..\Libraries\MCXN947\MCXN947\drivers;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\compilers\common\extension\fcntl\octal;board;..\..\..\..\components\libc\posix\io\poll;..\..\..\..\components\libc\compilers\common\extension;..\..\..\..\components\drivers\include;..\Libraries\MCXN947\MCXN947;..\..\..\..\components\drivers\include;..\Libraries\CMSIS\Core\Include;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\compilers\common\include;..\..\..\..\components\drivers\include;..\..\..\..\components\finsh;..\Libraries\drivers\config;..\..\..\..\components\libc\posix\ipc;..\..\..\..\components\libc\posix\io\epoll;..\..\..\..\include;..\..\..\..\components\libc\posix\io\eventfd;..\Libraries\MCXN947\middleware\sdmmc\inc;..\..\..\..\components\utilities\ulog;board\MCUX_Config\board;..\Libraries\MCXN947\middleware\sdmmc\port;..\Libraries\MCXN947\components\codec;..\Libraries\drivers;..\..\..\..\libcpu\arm\cortex-m33 + ..\..\..\..\..\include;..\..\..\..\..\libcpu\arm\common;..\Libraries\drivers;..\..\..\..\..\libcpu\arm\cortex-m33;..\..\..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\..\..\components\libc\posix\ipc;..\Libraries\MCXN947\middleware\sdmmc\inc;..\..\..\..\..\components\libc\posix\io\poll;.;..\..\..\..\..\components\libc\compilers\common\extension;..\..\..\..\..\components\drivers\include;..\Libraries\MCXN947\MCXN947\drivers;board\MCUX_Config\board;..\..\..\..\..\components\drivers\include;..\Libraries\MCXN947\middleware\sdmmc\port;..\..\..\..\..\components\libc\compilers\common\include;..\..\..\..\..\components\drivers\include;..\..\..\..\..\components\finsh;..\..\..\..\..\components\utilities\ulog;..\Libraries\MCXN947\MCXN947;board;..\Libraries\CMSIS\Core\Include;..\..\..\..\..\components\libc\posix\io\eventfd;applications;..\..\..\..\..\components\drivers\include;..\Libraries\MCXN947\components\codec;..\Libraries\drivers\config;..\..\..\..\..\components\libc\posix\io\epoll;..\..\..\..\..\components\drivers\include @@ -397,42 +397,42 @@ syscall_mem.c 1 - ..\..\..\..\components\libc\compilers\armlibc\syscall_mem.c + ..\..\..\..\..\components\libc\compilers\armlibc\syscall_mem.c syscalls.c 1 - ..\..\..\..\components\libc\compilers\armlibc\syscalls.c + ..\..\..\..\..\components\libc\compilers\armlibc\syscalls.c cctype.c 1 - ..\..\..\..\components\libc\compilers\common\cctype.c + ..\..\..\..\..\components\libc\compilers\common\cctype.c cstdlib.c 1 - ..\..\..\..\components\libc\compilers\common\cstdlib.c + ..\..\..\..\..\components\libc\compilers\common\cstdlib.c cstring.c 1 - ..\..\..\..\components\libc\compilers\common\cstring.c + ..\..\..\..\..\components\libc\compilers\common\cstring.c ctime.c 1 - ..\..\..\..\components\libc\compilers\common\ctime.c + ..\..\..\..\..\components\libc\compilers\common\ctime.c cunistd.c 1 - ..\..\..\..\components\libc\compilers\common\cunistd.c + ..\..\..\..\..\components\libc\compilers\common\cunistd.c cwchar.c 1 - ..\..\..\..\components\libc\compilers\common\cwchar.c + ..\..\..\..\..\components\libc\compilers\common\cwchar.c @@ -442,7 +442,7 @@ device.c 1 - ..\..\..\..\components\drivers\core\device.c + ..\..\..\..\..\components\drivers\core\device.c 2 @@ -498,7 +498,7 @@ hwtimer.c 1 - ..\..\..\..\components\drivers\hwtimer\hwtimer.c + ..\..\..\..\..\components\drivers\hwtimer\hwtimer.c 2 @@ -554,7 +554,7 @@ completion.c 1 - ..\..\..\..\components\drivers\ipc\completion.c + ..\..\..\..\..\components\drivers\ipc\completion.c 2 @@ -610,7 +610,7 @@ dataqueue.c 1 - ..\..\..\..\components\drivers\ipc\dataqueue.c + ..\..\..\..\..\components\drivers\ipc\dataqueue.c 2 @@ -666,7 +666,7 @@ pipe.c 1 - ..\..\..\..\components\drivers\ipc\pipe.c + ..\..\..\..\..\components\drivers\ipc\pipe.c 2 @@ -722,7 +722,7 @@ ringblk_buf.c 1 - ..\..\..\..\components\drivers\ipc\ringblk_buf.c + ..\..\..\..\..\components\drivers\ipc\ringblk_buf.c 2 @@ -778,7 +778,7 @@ ringbuffer.c 1 - ..\..\..\..\components\drivers\ipc\ringbuffer.c + ..\..\..\..\..\components\drivers\ipc\ringbuffer.c 2 @@ -834,7 +834,7 @@ waitqueue.c 1 - ..\..\..\..\components\drivers\ipc\waitqueue.c + ..\..\..\..\..\components\drivers\ipc\waitqueue.c 2 @@ -890,7 +890,7 @@ workqueue.c 1 - ..\..\..\..\components\drivers\ipc\workqueue.c + ..\..\..\..\..\components\drivers\ipc\workqueue.c 2 @@ -946,7 +946,7 @@ pin.c 1 - ..\..\..\..\components\drivers\pin\pin.c + ..\..\..\..\..\components\drivers\pin\pin.c 2 @@ -1002,7 +1002,7 @@ serial.c 1 - ..\..\..\..\components\drivers\serial\serial.c + ..\..\..\..\..\components\drivers\serial\serial.c 2 @@ -1093,7 +1093,7 @@ shell.c 1 - ..\..\..\..\components\finsh\shell.c + ..\..\..\..\..\components\finsh\shell.c 2 @@ -1149,7 +1149,7 @@ msh.c 1 - ..\..\..\..\components\finsh\msh.c + ..\..\..\..\..\components\finsh\msh.c 2 @@ -1205,7 +1205,7 @@ msh_parse.c 1 - ..\..\..\..\components\finsh\msh_parse.c + ..\..\..\..\..\components\finsh\msh_parse.c 2 @@ -1261,7 +1261,7 @@ cmd.c 1 - ..\..\..\..\components\finsh\cmd.c + ..\..\..\..\..\components\finsh\cmd.c 2 @@ -1322,7 +1322,7 @@ clock.c 1 - ..\..\..\..\src\clock.c + ..\..\..\..\..\src\clock.c 2 @@ -1378,7 +1378,7 @@ components.c 1 - ..\..\..\..\src\components.c + ..\..\..\..\..\src\components.c 2 @@ -1434,7 +1434,7 @@ idle.c 1 - ..\..\..\..\src\idle.c + ..\..\..\..\..\src\idle.c 2 @@ -1490,7 +1490,7 @@ ipc.c 1 - ..\..\..\..\src\ipc.c + ..\..\..\..\..\src\ipc.c 2 @@ -1546,7 +1546,7 @@ irq.c 1 - ..\..\..\..\src\irq.c + ..\..\..\..\..\src\irq.c 2 @@ -1602,7 +1602,7 @@ kservice.c 1 - ..\..\..\..\src\kservice.c + ..\..\..\..\..\src\kservice.c 2 @@ -1658,7 +1658,7 @@ mem.c 1 - ..\..\..\..\src\mem.c + ..\..\..\..\..\src\mem.c 2 @@ -1714,7 +1714,7 @@ mempool.c 1 - ..\..\..\..\src\mempool.c + ..\..\..\..\..\src\mempool.c 2 @@ -1770,7 +1770,7 @@ object.c 1 - ..\..\..\..\src\object.c + ..\..\..\..\..\src\object.c 2 @@ -1826,7 +1826,7 @@ scheduler_comm.c 1 - ..\..\..\..\src\scheduler_comm.c + ..\..\..\..\..\src\scheduler_comm.c 2 @@ -1882,7 +1882,7 @@ scheduler_up.c 1 - ..\..\..\..\src\scheduler_up.c + ..\..\..\..\..\src\scheduler_up.c 2 @@ -1938,7 +1938,7 @@ thread.c 1 - ..\..\..\..\src\thread.c + ..\..\..\..\..\src\thread.c 2 @@ -1994,7 +1994,7 @@ timer.c 1 - ..\..\..\..\src\timer.c + ..\..\..\..\..\src\timer.c 2 @@ -2055,37 +2055,37 @@ atomic_arm.c 1 - ..\..\..\..\libcpu\arm\common\atomic_arm.c + ..\..\..\..\..\libcpu\arm\common\atomic_arm.c div0.c 1 - ..\..\..\..\libcpu\arm\common\div0.c + ..\..\..\..\..\libcpu\arm\common\div0.c showmem.c 1 - ..\..\..\..\libcpu\arm\common\showmem.c + ..\..\..\..\..\libcpu\arm\common\showmem.c context_rvds.S 2 - ..\..\..\..\libcpu\arm\cortex-m33\context_rvds.S + ..\..\..\..\..\libcpu\arm\cortex-m33\context_rvds.S cpuport.c 1 - ..\..\..\..\libcpu\arm\cortex-m33\cpuport.c + ..\..\..\..\..\libcpu\arm\cortex-m33\cpuport.c syscall_rvds.S 2 - ..\..\..\..\libcpu\arm\cortex-m33\syscall_rvds.S + ..\..\..\..\..\libcpu\arm\cortex-m33\syscall_rvds.S trustzone.c 1 - ..\..\..\..\libcpu\arm\cortex-m33\trustzone.c + ..\..\..\..\..\libcpu\arm\cortex-m33\trustzone.c @@ -2327,15 +2327,15 @@ Utilities - - console_be.c - 1 - ..\..\..\..\components\utilities\ulog\backend\console_be.c - ulog.c 1 - ..\..\..\..\components\utilities\ulog\ulog.c + ..\..\..\..\..\components\utilities\ulog\ulog.c + + + console_be.c + 1 + ..\..\..\..\..\components\utilities\ulog\backend\console_be.c diff --git a/bsp/nxp/mcx/mcxn/frdm-mcxn947/rtconfig.h b/bsp/nxp/mcx/mcxn/frdm-mcxn947/rtconfig.h index df8c172651..6f1e514b4b 100644 --- a/bsp/nxp/mcx/mcxn/frdm-mcxn947/rtconfig.h +++ b/bsp/nxp/mcx/mcxn/frdm-mcxn947/rtconfig.h @@ -211,15 +211,20 @@ /* peripheral libraries and drivers */ +/* HAL & SDK Drivers */ + +/* STM32 HAL & SDK Drivers */ + + +/* Kendryte SDK */ + + /* sensors drivers */ /* touch drivers */ -/* Kendryte SDK */ - - /* AI packages */ @@ -279,6 +284,8 @@ #define BSP_USING_PIN #define BSP_USING_UART #define BSP_USING_UART4 +#define BSP_USING_UART5 +#define BSP_USING_UART2 /* Board extended module Drivers */ diff --git a/bsp/nxp/mcxn/frdm-mcxn947/board/Kconfig b/bsp/nxp/mcxn/frdm-mcxn947/board/Kconfig new file mode 100644 index 0000000000..e69de29bb2