Skip to content

Commit b82b18b

Browse files
committed
Update serial driver
1 parent f3fa748 commit b82b18b

File tree

14 files changed

+214
-60
lines changed

14 files changed

+214
-60
lines changed

bsp/nxp/imx/imx91/.config

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ CONFIG_RT_USING_HEAP=y
187187
CONFIG_RT_USING_DEVICE=y
188188
# CONFIG_RT_USING_DEVICE_OPS is not set
189189
# CONFIG_RT_USING_INTERRUPT_INFO is not set
190-
# CONFIG_RT_USING_THREADSAFE_PRINTF is not set
190+
CONFIG_RT_USING_THREADSAFE_PRINTF=y
191191
CONFIG_RT_USING_CONSOLE=y
192192
CONFIG_RT_CONSOLEBUF_SIZE=128
193193
CONFIG_RT_CONSOLE_DEVICE_NAME="uart1"
@@ -220,7 +220,7 @@ CONFIG_ARCH_ARM_CORTEX_A=y
220220
CONFIG_RT_NO_USING_GIC=y
221221
CONFIG_ARCH_ARM_CORTEX_A55=y
222222
# CONFIG_ARCH_ARM_SECURE_MODE is not set
223-
# CONFIG_RT_BACKTRACE_FUNCTION_NAME is not set
223+
CONFIG_RT_BACKTRACE_FUNCTION_NAME=y
224224
CONFIG_ARCH_ARMV8=y
225225
CONFIG_ARCH_USING_ASID=y
226226
CONFIG_ARCH_USING_HW_THREAD_SELF=y
@@ -231,7 +231,7 @@ CONFIG_ARCH_USING_IRQ_CTX_LIST=y
231231
#
232232
CONFIG_RT_USING_COMPONENTS_INIT=y
233233
CONFIG_RT_USING_USER_MAIN=y
234-
CONFIG_RT_MAIN_THREAD_STACK_SIZE=6144
234+
CONFIG_RT_MAIN_THREAD_STACK_SIZE=8192
235235
CONFIG_RT_MAIN_THREAD_PRIORITY=10
236236
# CONFIG_RT_USING_LEGACY is not set
237237
CONFIG_RT_USING_MSH=y
@@ -1464,6 +1464,11 @@ CONFIG_RT_PAGE_MAX_ORDER=11
14641464

14651465
CONFIG_BOARD_IMX91=y
14661466
CONFIG_SOC_MIMX91X1D=y
1467+
1468+
#
1469+
# Hardware Drivers Config
1470+
#
1471+
CONFIG_BSP_USING_UART1=y
14671472
CONFIG_BSP_USING_GIC=y
14681473
CONFIG_BSP_USING_GICV3=y
1469-
CONFIG_RT_USING_UART1=y
1474+
# end of Hardware Drivers Config

bsp/nxp/imx/imx91/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ The i.MX 91 may be used in applications such as:
1111
• Industrial Monitoring and HMI
1212
• Portable or small form-factor Medical and Healthcare devices
1313
• Audio and Entertainment IoT
14+
15+

bsp/nxp/imx/imx91/drivers/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
menu "Hardware Drivers Config"
22

3-
config RT_USING_UART1
3+
config BSP_USING_UART1
44
bool "Enable UART1"
55
default y
66

bsp/nxp/imx/imx91/drivers/SConscript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ objs = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
1111
for item in os.listdir(cwd):
1212
sconsfile = os.path.join(cwd, item, 'SConscript')
1313
if os.path.isfile(sconsfile):
14-
objs = objs + SConscript(sconsfile)
14+
objs += SConscript(sconsfile)
1515

1616
Return('objs')

bsp/nxp/imx/imx91/drivers/board.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ void rt_hw_board_init(void)
7777
// enable_neon_fpu();
7878
// disable_strict_align_check();
7979

80+
extern void uart1_puts(const char *str);
81+
uart1_puts("RT-Thread on i.MX91\n");
82+
8083
rt_components_board_init();
8184
rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
8285
}

bsp/nxp/imx/imx91/drivers/sdk/CMSIS/Core_AArch64/SConscript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ CPPPATH = [cwd + '/Include']
99
CPPDEFINES = [
1010
{'CPU_MIMX9131DVVXJ': 1}
1111
]
12-
objs = DefineGroup('imx-sdk-MIMX9131', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES)
12+
objs = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES)
1313

1414
for item in os.listdir(cwd):
1515
sconsfile = os.path.join(cwd, item, 'SConscript')

bsp/nxp/imx/imx91/drivers/sdk/devices/MIMX9131/SConscript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ CPPPATH = [cwd, cwd + '/drivers']
99
CPPDEFINES = [
1010
{'CPU_MIMX9131DVVXJ': 1}
1111
]
12-
objs = DefineGroup('imx-sdk-MIMX9131', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES)
12+
objs = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES)
1313

1414
for item in os.listdir(cwd):
1515
sconsfile = os.path.join(cwd, item, 'SConscript')

bsp/nxp/imx/imx91/drivers/sdk/drivers/cache/armv8-a/SConscript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ cwd = GetCurrentDir()
77
src = Glob('*.c')
88

99
CPPPATH = [cwd]
10-
objs = DefineGroup('sdk-drivers-cache', src, depend = [''], CPPPATH = CPPPATH)
10+
objs = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
1111

1212
for item in os.listdir(cwd):
1313
sconsfile = os.path.join(cwd, item, 'SConscript')

bsp/nxp/imx/imx91/drivers/sdk/drivers/common/SConscript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ cwd = GetCurrentDir()
77
src = Glob('fsl_common.c')
88

99
CPPPATH = [cwd]
10-
objs = DefineGroup('sdk-drivers-common', src, depend = [''], CPPPATH = CPPPATH)
10+
objs = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
1111

1212
for item in os.listdir(cwd):
1313
sconsfile = os.path.join(cwd, item, 'SConscript')

bsp/nxp/imx/imx91/drivers/sdk/drivers/lpuart/SConscript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ cwd = GetCurrentDir()
77
src = Glob('fsl_lpuart.c')
88

99
CPPPATH = [cwd]
10-
objs = DefineGroup('sdk-drivers-lpuart', src, depend = [''], CPPPATH = CPPPATH)
10+
objs = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
1111

1212
for item in os.listdir(cwd):
1313
sconsfile = os.path.join(cwd, item, 'SConscript')

0 commit comments

Comments
 (0)