4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-19 06:53:29 +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:
supperthomas 2022-09-23 21:38:42 +08:00 committed by GitHub
parent 714b93cc3d
commit fc55785e70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 32 additions and 22 deletions

View File

@ -15,8 +15,7 @@ config PKGS_DIR
option env="PKGS_ROOT"
default "packages"
source "board/Kconfig"
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
source "board/Kconfig"

View File

@ -50,18 +50,18 @@ PCA10056-nrf52840 开发板常用 **板载资源** 如下:
本 BSP 目前对外设的支持情况如下:
| **片上外设** | **支持情况** | **备注** |
| :----------- | :----------: | :--------------------: |
| GPIO | 支持 | GPION |
| UART | 支持 | UART0 |
| PWM | 支持 | 支持 |
| SPI | 支持 | 支持 |
| QSPI | 支持 | 支持开发板上QSPI FLASH |
| RTC | 支持 | |
| ADC | 支持 | |
| | | |
| | | |
| | | |
| **片上外设** | **支持情况** | **备注** |
| :----------- | :----------: | :-------------------------: |
| GPIO | 支持 | GPION |
| UART | 支持 | UART0 |
| PWM | 支持 | 支持 |
| SPI | 支持 | 支持 |
| QSPI | 支持 | 支持开发板上QSPI FLASH |
| RTC | 支持 | |
| ADC | 支持 | |
| SEGGER_RTT | 支持 | 打开默认segger_rtt为console |
| | | |
| | | |

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

View File

@ -11,12 +11,12 @@
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>5060422::V5.06 update 4 (build 422)::ARMCC</pCCUsed>
<uAC6>0</uAC6>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
<Device>nRF52840_xxAA</Device>
<Vendor>Nordic Semiconductor</Vendor>
<PackID>NordicSemiconductor.nRF_DeviceFamilyPack.8.38.0</PackID>
<PackID>NordicSemiconductor.nRF_DeviceFamilyPack.8.35.0</PackID>
<PackURL>http://developer.nordicsemi.com/nRF5_SDK/pieces/nRF_DeviceFamilyPack/</PackURL>
<Cpu>IRAM(0x20000000,0x40000) IROM(0x00000000,0x100000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>
@ -316,27 +316,27 @@
<Optim>1</Optim>
<oTime>0</oTime>
<SplitLS>0</SplitLS>
<OneElfS>1</OneElfS>
<OneElfS>0</OneElfS>
<Strict>0</Strict>
<EnumInt>0</EnumInt>
<PlainCh>0</PlainCh>
<Ropi>0</Ropi>
<Rwpi>0</Rwpi>
<wLevel>2</wLevel>
<wLevel>3</wLevel>
<uThumb>0</uThumb>
<uSurpInc>0</uSurpInc>
<uC99>1</uC99>
<uGnu>0</uGnu>
<useXO>0</useXO>
<v6Lang>1</v6Lang>
<v6LangP>1</v6LangP>
<v6Lang>3</v6Lang>
<v6LangP>3</v6LangP>
<vShortEn>1</vShortEn>
<vShortWch>1</vShortWch>
<v6Lto>0</v6Lto>
<v6WtE>0</v6WtE>
<v6Rtti>0</v6Rtti>
<VariousControls>
<MiscControls>--reduce_paths</MiscControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>