[bsp][nrf52840]Add segger rtt function (#6460)

* fix project to AC6

* add the segger_rtt function

* move Kconfig
This commit is contained in:
supperthomas
2022-09-23 21:38:42 +08:00
committed by GitHub
parent 714b93cc3d
commit fc55785e70
5 changed files with 32 additions and 22 deletions

View File

@@ -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

View File

@@ -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();