Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
luozhenger
rt-thread
提交
b254563a
R
rt-thread
项目概览
luozhenger
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b254563a
编写于
8月 07, 2020
作者:
Thomas_Fly
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[bsp/nrfx5]: fix the board of nrf52832(pca10040)
上级
dd687ff0
变更
23
展开全部
隐藏空白更改
内联
并排
Showing
23 changed file
with
13228 addition
and
5455 deletion
+13228
-5455
bsp/nrf5x/libraries/drivers/drv_gpio.c
bsp/nrf5x/libraries/drivers/drv_gpio.c
+0
-16
bsp/nrf5x/libraries/drivers/drv_gpio.h
bsp/nrf5x/libraries/drivers/drv_gpio.h
+0
-1
bsp/nrf5x/nrf52832/.config
bsp/nrf5x/nrf52832/.config
+57
-6
bsp/nrf5x/nrf52832/SConstruct
bsp/nrf5x/nrf52832/SConstruct
+3
-0
bsp/nrf5x/nrf52832/applications/application.c
bsp/nrf5x/nrf52832/applications/application.c
+20
-36
bsp/nrf5x/nrf52832/applications/ble_nus_app.c
bsp/nrf5x/nrf52832/applications/ble_nus_app.c
+0
-670
bsp/nrf5x/nrf52832/applications/sdk_config.h
bsp/nrf5x/nrf52832/applications/sdk_config.h
+0
-3991
bsp/nrf5x/nrf52832/applications/startup.c
bsp/nrf5x/nrf52832/applications/startup.c
+0
-98
bsp/nrf5x/nrf52832/board/Kconfig
bsp/nrf5x/nrf52832/board/Kconfig
+275
-3
bsp/nrf5x/nrf52832/board/SConscript
bsp/nrf5x/nrf52832/board/SConscript
+2
-1
bsp/nrf5x/nrf52832/board/app_config.h
bsp/nrf5x/nrf52832/board/app_config.h
+4
-0
bsp/nrf5x/nrf52832/board/board.c
bsp/nrf5x/nrf52832/board/board.c
+89
-184
bsp/nrf5x/nrf52832/board/board.h
bsp/nrf5x/nrf52832/board/board.h
+18
-2
bsp/nrf5x/nrf52832/board/linker_scripts/link.sct
bsp/nrf5x/nrf52832/board/linker_scripts/link.sct
+3
-3
bsp/nrf5x/nrf52832/board/nrfx_config.h
bsp/nrf5x/nrf52832/board/nrfx_config.h
+47
-0
bsp/nrf5x/nrf52832/board/nrfx_glue.h
bsp/nrf5x/nrf52832/board/nrfx_glue.h
+269
-0
bsp/nrf5x/nrf52832/board/nrfx_log.h
bsp/nrf5x/nrf52832/board/nrfx_log.h
+135
-0
bsp/nrf5x/nrf52832/board/sdk_config.h
bsp/nrf5x/nrf52832/board/sdk_config.h
+11704
-0
bsp/nrf5x/nrf52832/project.uvoptx
bsp/nrf5x/nrf52832/project.uvoptx
+364
-264
bsp/nrf5x/nrf52832/project.uvprojx
bsp/nrf5x/nrf52832/project.uvprojx
+208
-168
bsp/nrf5x/nrf52832/rtconfig.h
bsp/nrf5x/nrf52832/rtconfig.h
+19
-1
bsp/nrf5x/nrf52832/template.uvoptx
bsp/nrf5x/nrf52832/template.uvoptx
+2
-2
bsp/nrf5x/nrf52832/template.uvprojx
bsp/nrf5x/nrf52832/template.uvprojx
+9
-9
未找到文件。
bsp/nrf5x/libraries/drivers/drv_gpio.c
浏览文件 @
b254563a
...
...
@@ -46,22 +46,6 @@ static const struct pin_index pins[] =
__NRF5X_PIN
(
29
,
0
,
29
),
__NRF5X_PIN
(
30
,
0
,
30
),
__NRF5X_PIN
(
31
,
0
,
31
),
__NRF5X_PIN
(
32
,
1
,
0
),
__NRF5X_PIN
(
33
,
1
,
1
),
__NRF5X_PIN
(
34
,
1
,
2
),
__NRF5X_PIN
(
35
,
1
,
3
),
__NRF5X_PIN
(
36
,
1
,
4
),
__NRF5X_PIN
(
37
,
1
,
5
),
__NRF5X_PIN
(
38
,
1
,
6
),
__NRF5X_PIN
(
39
,
1
,
7
),
__NRF5X_PIN
(
40
,
1
,
8
),
__NRF5X_PIN
(
41
,
1
,
9
),
__NRF5X_PIN
(
42
,
1
,
10
),
__NRF5X_PIN
(
43
,
1
,
11
),
__NRF5X_PIN
(
44
,
1
,
12
),
__NRF5X_PIN
(
45
,
1
,
13
),
__NRF5X_PIN
(
46
,
1
,
14
),
__NRF5X_PIN
(
47
,
1
,
15
),
};
/* EVENTS_IN[n](n=0..7) and EVENTS_PORT */
...
...
bsp/nrf5x/libraries/drivers/drv_gpio.h
浏览文件 @
b254563a
...
...
@@ -13,7 +13,6 @@
#include <board.h>
#include <rtdevice.h>
#include <nrf52840.h>
#include <hal/nrf_gpio.h>
#include <drivers/include/nrfx_gpiote.h>
...
...
bsp/nrf5x/nrf52832/.config
浏览文件 @
b254563a
...
...
@@ -74,7 +74,9 @@ CONFIG_RT_VER_NUM=0x40003
# RT-Thread Components
#
CONFIG_RT_USING_COMPONENTS_INIT
=
y
# CONFIG_RT_USING_USER_MAIN is not set
CONFIG_RT_USING_USER_MAIN
=
y
CONFIG_RT_MAIN_THREAD_STACK_SIZE
=
2048
CONFIG_RT_MAIN_THREAD_PRIORITY
=
10
#
# C++ features
...
...
@@ -112,7 +114,7 @@ CONFIG_RT_USING_DEVICE_IPC=y
CONFIG_RT_PIPE_BUFSZ
=
512
# CONFIG_RT_USING_SYSTEM_WORKQUEUE is not set
CONFIG_RT_USING_SERIAL
=
y
CONFIG_RT_SERIAL_USING_DMA
=
y
# CONFIG_RT_SERIAL_USING_DMA is not set
CONFIG_RT_SERIAL_RB_BUFSZ
=
64
# CONFIG_RT_USING_CAN is not set
# CONFIG_RT_USING_HWTIMER is not set
...
...
@@ -120,6 +122,7 @@ CONFIG_RT_SERIAL_RB_BUFSZ=64
# CONFIG_RT_USING_I2C is not set
CONFIG_RT_USING_PIN
=
y
# CONFIG_RT_USING_ADC is not set
# CONFIG_RT_USING_DAC is not set
# CONFIG_RT_USING_PWM is not set
# CONFIG_RT_USING_MTD_NOR is not set
# CONFIG_RT_USING_MTD_NAND is not set
...
...
@@ -192,12 +195,15 @@ CONFIG_RT_USING_LIBC=y
#
# IoT - internet of things
#
# CONFIG_PKG_USING_LORAWAN_DRIVER is not set
# CONFIG_PKG_USING_PAHOMQTT is not set
# CONFIG_PKG_USING_UMQTT is not set
# CONFIG_PKG_USING_WEBCLIENT is not set
# CONFIG_PKG_USING_WEBNET is not set
# CONFIG_PKG_USING_MONGOOSE is not set
# CONFIG_PKG_USING_MYMQTT is not set
# CONFIG_PKG_USING_KAWAII_MQTT is not set
# CONFIG_PKG_USING_BC28_MQTT is not set
# CONFIG_PKG_USING_WEBTERMINAL is not set
# CONFIG_PKG_USING_CJSON is not set
# CONFIG_PKG_USING_JSMN is not set
...
...
@@ -224,6 +230,7 @@ CONFIG_RT_USING_LIBC=y
# CONFIG_PKG_USING_COAP is not set
# CONFIG_PKG_USING_NOPOLL is not set
# CONFIG_PKG_USING_NETUTILS is not set
# CONFIG_PKG_USING_CMUX is not set
# CONFIG_PKG_USING_PPP_DEVICE is not set
# CONFIG_PKG_USING_AT_DEVICE is not set
# CONFIG_PKG_USING_ATSRV_SOCKET is not set
...
...
@@ -236,9 +243,10 @@ CONFIG_RT_USING_LIBC=y
# CONFIG_PKG_USING_GAGENT_CLOUD is not set
# CONFIG_PKG_USING_ALI_IOTKIT is not set
# CONFIG_PKG_USING_AZURE is not set
# CONFIG_PKG_USING_TENCENT_IOT
HUB
is not set
# CONFIG_PKG_USING_TENCENT_IOT
_EXPLORER
is not set
# CONFIG_PKG_USING_JIOT-C-SDK is not set
# CONFIG_PKG_USING_UCLOUD_IOT_SDK is not set
# CONFIG_PKG_USING_JOYLINK is not set
# CONFIG_PKG_USING_NIMBLE is not set
# CONFIG_PKG_USING_OTA_DOWNLOADER is not set
# CONFIG_PKG_USING_IPMSG is not set
...
...
@@ -257,6 +265,7 @@ CONFIG_RT_USING_LIBC=y
# CONFIG_PKG_USING_CAPNP is not set
# CONFIG_PKG_USING_RT_CJSON_TOOLS is not set
# CONFIG_PKG_USING_AGILE_TELNET is not set
# CONFIG_PKG_USING_NMEALIB is not set
#
# security packages
...
...
@@ -265,6 +274,7 @@ CONFIG_RT_USING_LIBC=y
# CONFIG_PKG_USING_libsodium is not set
# CONFIG_PKG_USING_TINYCRYPT is not set
# CONFIG_PKG_USING_TFM is not set
# CONFIG_PKG_USING_YD_CRYPTO is not set
#
# language packages
...
...
@@ -299,6 +309,8 @@ CONFIG_RT_USING_LIBC=y
# CONFIG_PKG_USING_CHINESE_FONT_LIBRARY is not set
# CONFIG_PKG_USING_LUNAR_CALENDAR is not set
# CONFIG_PKG_USING_BS8116A is not set
# CONFIG_PKG_USING_GPS_RMC is not set
# CONFIG_PKG_USING_URLENCODE is not set
#
# system packages
...
...
@@ -309,6 +321,7 @@ CONFIG_RT_USING_LIBC=y
# CONFIG_PKG_USING_LWEXT4 is not set
# CONFIG_PKG_USING_PARTITION is not set
# CONFIG_PKG_USING_FAL is not set
# CONFIG_PKG_USING_FLASHDB is not set
# CONFIG_PKG_USING_SQLITE is not set
# CONFIG_PKG_USING_RTI is not set
# CONFIG_PKG_USING_LITTLEVGL2RTT is not set
...
...
@@ -321,6 +334,9 @@ CONFIG_RT_USING_LIBC=y
# CONFIG_PKG_USING_SYSWATCH is not set
# CONFIG_PKG_USING_SYS_LOAD_MONITOR is not set
# CONFIG_PKG_USING_PLCCORE is not set
# CONFIG_PKG_USING_RAMDISK is not set
# CONFIG_PKG_USING_MININI is not set
# CONFIG_PKG_USING_QBOOT is not set
#
# peripheral libraries and drivers
...
...
@@ -338,6 +354,13 @@ CONFIG_RT_USING_LIBC=y
# CONFIG_PKG_USING_SIGNAL_LED is not set
# 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
=
y
CONFIG_PKG_NRFX_PATH
=
"/packages/peripherals/nrfx"
CONFIG_PKG_USING_NRFX_V210
=
y
# CONFIG_PKG_USING_NRFX_LATEST_VERSION is not set
CONFIG_PKG_NRFX_VER
=
"v2.1.0"
# CONFIG_PKG_USING_WM_LIBRARIES is not set
# CONFIG_PKG_USING_KENDRYTE_SDK is not set
# CONFIG_PKG_USING_INFRARED is not set
...
...
@@ -355,13 +378,19 @@ CONFIG_RT_USING_LIBC=y
# CONFIG_PKG_USING_RPLIDAR is not set
# 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
# CONFIG_PKG_USING_BEEP is not set
# CONFIG_PKG_USING_NORDIC_SDK is not set
# CONFIG_PKG_USING_NORDIC_SDK_V100 is not set
# CONFIG_PKG_USING_NORDIC_SDK_LATEST_VERSION is not set
# CONFIG_PKG_USING_EASYBLINK is not set
# CONFIG_PKG_USING_PMS_SERIES is not set
# CONFIG_PKG_USING_CAN_YMODEM is not set
# CONFIG_PKG_USING_LORA_RADIO_DRIVER is not set
# CONFIG_PKG_USING_QLED is not set
# CONFIG_PKG_USING_PAJ7620 is not set
# CONFIG_PKG_USING_AGILE_CONSOLE is not set
#
# miscellaneous packages
...
...
@@ -398,17 +427,39 @@ CONFIG_RT_USING_LIBC=y
# CONFIG_PKG_USING_VT100 is not set
# CONFIG_PKG_USING_ULAPACK is not set
# CONFIG_PKG_USING_UKAL is not set
# CONFIG_PKG_USING_CRCLIB is not set
#
# Hardware Drivers Config
#
CONFIG_SOC_NRF52832
=
y
CONFIG_SOC_NORDIC
=
y
#
# Onboard Peripheral Drivers
#
# CONFIG_BSP_USING_JLINK_TO_USART is not set
# CONFIG_BSP_USING_QSPI_FLASH is not set
#
# On-chip Peripheral Drivers
#
CONFIG_BSP_USING_GPIO
=
y
# CONFIG_BSP_USING_PWM is not set
# CONFIG_BSP_USING_SOFTDEVICE is not set
CONFIG_BSP_USING_UART
=
y
CONFIG_BSP_USING_UART0
=
y
CONFIG_BSP_UART0_RX_PIN
=
8
CONFIG_BSP_UART0_TX_PIN
=
6
# CONFIG_BSP_USING_UART1 is not set
# CONFIG_BSP_USING_SPI is not set
# CONFIG_BSP_USING_ON_CHIP_FLASH is not set
#
# On-chip flash config
#
CONFIG_MCU_FLASH_START_ADDRESS
=
0
x00000000
CONFIG_MCU_FLASH_SIZE_KB
=
1024
CONFIG_MCU_SRAM_START_ADDRESS
=
0
x20000000
CONFIG_MCU_SRAM_SIZE_KB
=
256
CONFIG_MCU_FLASH_PAGE_SIZE
=
0
x1000
bsp/nrf5x/nrf52832/SConstruct
浏览文件 @
b254563a
...
...
@@ -50,5 +50,8 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
# include drivers
objs
.
extend
(
SConscript
(
os
.
path
.
join
(
libraries_path_prefix
,
'drivers'
,
'SConscript'
)))
# include cmsis
objs
.
extend
(
SConscript
(
os
.
path
.
join
(
libraries_path_prefix
,
'cmsis'
,
'SConscript'
)))
# make a building
DoBuilding
(
TARGET
,
objs
)
bsp/nrf5x/nrf52832/applications/application.c
浏览文件 @
b254563a
/*
* File : application.c
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2015, RT-Thread Development Team
* Copyright (c) 2006-2020, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2015-03-01 Yangfs the first version
* 2015-03-27 Bernard code cleanup.
*/
/**
* @addtogroup NRF52832
* 2020-04-29 supperthomas first version
*
*/
/*@{*/
#include <rtthread.h>
#include <rtdevice.h>
#define DK_BOARD_LED_1 17
#define DK_BOARD_LED_2 18
#ifdef RT_USING_FINSH
#include <finsh.h>
#include <shell.h>
#endif
void
rt_init_thread_entry
(
void
*
parameter
)
int
main
(
void
)
{
extern
rt_err_t
ble_init
(
void
);
ble_init
();
int
count
=
1
;
rt_pin_mode
(
DK_BOARD_LED_1
,
PIN_MODE_OUTPUT
);
while
(
count
++
)
{
rt_pin_write
(
DK_BOARD_LED_1
,
PIN_HIGH
);
rt_thread_mdelay
(
500
);
rt_pin_write
(
DK_BOARD_LED_1
,
PIN_LOW
);
rt_thread_mdelay
(
500
);
}
return
RT_EOK
;
}
int
rt_application_init
(
void
)
{
rt_thread_t
tid
;
tid
=
rt_thread_create
(
"init"
,
rt_init_thread_entry
,
RT_NULL
,
1024
,
RT_THREAD_PRIORITY_MAX
/
3
,
20
);
if
(
tid
!=
RT_NULL
)
rt_thread_startup
(
tid
);
return
0
;
}
/*@}*/
bsp/nrf5x/nrf52832/applications/ble_nus_app.c
已删除
100644 → 0
浏览文件 @
dd687ff0
此差异已折叠。
点击以展开。
bsp/nrf5x/nrf52832/applications/sdk_config.h
已删除
100644 → 0
浏览文件 @
dd687ff0
此差异已折叠。
点击以展开。
bsp/nrf5x/nrf52832/applications/startup.c
已删除
100644 → 0
浏览文件 @
dd687ff0
此差异已折叠。
点击以展开。
bsp/nrf5x/nrf52832/board/Kconfig
浏览文件 @
b254563a
此差异已折叠。
点击以展开。
bsp/nrf5x/nrf52832/board/SConscript
浏览文件 @
b254563a
...
...
@@ -5,6 +5,7 @@ from building import *
cwd
=
GetCurrentDir
()
src
=
Glob
(
'*.c'
)
CPPPATH
=
[
cwd
]
define
=
[
'USE_APP_CONFIG'
]
group
=
DefineGroup
(
'Drivers'
,
src
,
depend
=
[
''
],
CPPPATH
=
CPPPATH
,)
group
=
DefineGroup
(
'Drivers'
,
src
,
depend
=
[
''
],
CPPPATH
=
CPPPATH
,
CPPDEFINES
=
define
)
Return
(
'group'
)
bsp/nrf5x/nrf52832/board/app_config.h
0 → 100644
浏览文件 @
b254563a
#ifndef APP_CONFIG_H
#define APP_CONFIG_H
#endif //APP_CONFIG_H
bsp/nrf5x/nrf52832/board/board.c
浏览文件 @
b254563a
此差异已折叠。
点击以展开。
bsp/nrf5x/nrf52832/board/board.h
浏览文件 @
b254563a
...
...
@@ -2,10 +2,26 @@
#define _BOARD_H_
#include <rtthread.h>
#include <rthw.h>
#include "nrf.h"
#define CHIP_SRAM_END (0x20000000 + 64*1024)
#define MCU_FLASH_SIZE MCU_FLASH_SIZE_KB*1024
#define MCU_FLASH_END_ADDRESS ((uint32_t)(MCU_FLASH_START_ADDRESS + MCU_FLASH_SIZE))
#define MCU_SRAM_SIZE MCU_SRAM_SIZE_KB*1024
#define MCU_SRAM_END_ADDRESS (MCU_SRAM_START_ADDRESS + MCU_SRAM_SIZE)
#if defined(__CC_ARM) || defined(__CLANG_ARM)
extern
int
Image
$$
RW_IRAM1
$$
ZI
$$
Limit
;
#define HEAP_BEGIN ((void *)&Image$$RW_IRAM1$$ZI$$Limit)
#elif __ICCARM__
#pragma section="CSTACK"
#define HEAP_BEGIN (__segment_end("CSTACK"))
#else
extern
int
__bss_end
;
#define HEAP_BEGIN ((void *)&__bss_end)
#endif
#define HEAP_END (0x20000000 + 64*1024)
void
rt_hw_board_init
(
void
);
...
...
bsp/nrf5x/nrf52832/board/linker_scripts/link.sct
浏览文件 @
b254563a
...
...
@@ -2,13 +2,13 @@
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
LR_IROM1 0x000
1F000 0x00061
000 { ; load region size_region
ER_IROM1 0x000
1F000 0x00061
000 { ; load address = execution address
LR_IROM1 0x000
00000 0x100
000 { ; load region size_region
ER_IROM1 0x000
00000 0x100
000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
}
RW_IRAM1 0x2000
25F8 0x0000DA08
{ ; RW data
RW_IRAM1 0x2000
0000 0x40000
{ ; RW data
.ANY (+RW +ZI)
}
}
...
...
bsp/nrf5x/nrf52832/board/nrfx_config.h
0 → 100644
浏览文件 @
b254563a
此差异已折叠。
点击以展开。
bsp/nrf5x/nrf52832/board/nrfx_glue.h
0 → 100644
浏览文件 @
b254563a
此差异已折叠。
点击以展开。
bsp/nrf5x/nrf52832/board/nrfx_log.h
0 → 100644
浏览文件 @
b254563a
此差异已折叠。
点击以展开。
bsp/nrf5x/nrf52832/board/sdk_config.h
0 → 100644
浏览文件 @
b254563a
此差异已折叠。
点击以展开。
bsp/nrf5x/nrf52832/project.uvoptx
浏览文件 @
b254563a
此差异已折叠。
点击以展开。
bsp/nrf5x/nrf52832/project.uvprojx
浏览文件 @
b254563a
此差异已折叠。
点击以展开。
bsp/nrf5x/nrf52832/rtconfig.h
浏览文件 @
b254563a
此差异已折叠。
点击以展开。
bsp/nrf5x/nrf52832/template.uvoptx
浏览文件 @
b254563a
此差异已折叠。
点击以展开。
bsp/nrf5x/nrf52832/template.uvprojx
浏览文件 @
b254563a
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录