mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-03-27 01:10:20 +08:00
[bsp][nrf52840]Add segger rtt function (#6460)
* fix project to AC6 * add the segger_rtt function * move Kconfig
This commit is contained in:
@@ -28,6 +28,11 @@ menu "Onboard Peripheral Drivers"
|
||||
bool "Enable JLINK TO USART (uart0|RX_PIN:8|TX_PIN:6)"
|
||||
default y
|
||||
depends on BSP_BOARD_PCA_10056
|
||||
|
||||
config BSP_USING_SEGGER_RTT_CONSOLE
|
||||
bool "Enable SEGGER_RTT to console"
|
||||
select PKG_USING_SEGGER_RTT
|
||||
default n
|
||||
|
||||
config RT_BSP_LED_PIN
|
||||
int
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2021, RT-Thread Development Team
|
||||
* Copyright (c) 2006-2022, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
@@ -65,9 +65,15 @@ void rt_hw_board_init(void)
|
||||
rt_hw_uart_init();
|
||||
#endif
|
||||
|
||||
#if defined(SEGGER_RTT_ENABLE)
|
||||
extern int rt_hw_jlink_rtt_init(void);
|
||||
rt_hw_jlink_rtt_init();
|
||||
rt_console_set_device("jlinkRtt");
|
||||
#else
|
||||
#if defined(RT_USING_CONSOLE) && defined(RT_USING_DEVICE)
|
||||
rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_COMPONENTS_INIT
|
||||
rt_components_board_init();
|
||||
|
||||
Reference in New Issue
Block a user