add more nimble example

1. make heart rate sensor example really work
using nRF Toolbox HRM
2. add master device scan example
3. add gatt server example(seems not working)
This commit is contained in:
daishengdong
2019-11-12 19:56:52 +08:00
parent 044d1c7246
commit 0700d27b70
80 changed files with 145868 additions and 33754 deletions

View File

@@ -0,0 +1,56 @@
<html>
<body>
<pre>
<h1><EFBFBD>Vision Build Log</h1>
<h2>Tool Versions:</h2>
IDE-Version: <20><>Vision V5.26.2.0
Copyright (C) 2018 ARM Ltd and ARM Germany GmbH. All rights reserved.
License Information: sheldon dai, tencent, LIC=AK1CX-H5HPV-SGF7K-ZGDWF-QC6LB-GRJE8
Tool Versions:
Toolchain: MDK-ARM Professional Version: 5.26.2.0
Toolchain Path: C:\Keil_v5\ARM\ARMCC\Bin
C Compiler: Armcc.exe V5.06 update 6 (build 750)
Assembler: Armasm.exe V5.06 update 6 (build 750)
Linker/Locator: ArmLink.exe V5.06 update 6 (build 750)
Library Manager: ArmAr.exe V5.06 update 6 (build 750)
Hex Converter: FromElf.exe V5.06 update 6 (build 750)
CPU DLL: SARMCM3.DLL V5.26.2.0
Dialog DLL: DARMCM1.DLL V1.19.1.0
Target DLL: STLink\ST-LINKIII-KEIL_SWO.dll V3.0.5.0
Dialog DLL: TARMCM1.DLL V1.14.0.0
<h2>Project:</h2>
D:\github\ble_dev\TencentOS-tiny\board\Nordic_NRF51822\KEIL\nimble_heart_rate_sensor\TencentOS_tiny.uvprojx
Project File Date: 11/11/2019
<h2>Output:</h2>
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'TencentOS_tiny'
".\Objects\TencentOS_tiny.axf" - 0 Error(s), 0 Warning(s).
<h2>Software Packages used:</h2>
Package Vendor: ARM
http://www.keil.com/pack/ARM.CMSIS.5.6.0.pack
ARM.CMSIS.5.6.0
CMSIS (Cortex Microcontroller Software Interface Standard)
* Component: CORE Version: 5.3.0
Package Vendor: NordicSemiconductor
http://developer.nordicsemi.com/nRF5_SDK/pieces/nRF_DeviceFamilyPack/NordicSemiconductor.nRF_DeviceFamilyPack.8.24.1.pack
NordicSemiconductor.nRF_DeviceFamilyPack.8.24.1
Nordic Semiconductor nRF ARM devices Device Family Pack.
<h2>Collection of Component include folders:</h2>
.\RTE\_TencentOS_tiny
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\Core\Include
C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_DeviceFamilyPack\8.24.1\Device\Include
<h2>Collection of Component Files used:</h2>
* Component: ARM::CMSIS:CORE:5.3.0
Build Time Elapsed: 00:00:02
</pre>
</body>
</html>

View File

@@ -687,7 +687,7 @@
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\examples\blehr\gatt_svr.c</PathWithFileName>
<PathWithFileName>..\..\..\..\examples\nimble_heart_rate_sensor\gatt_svr.c</PathWithFileName>
<FilenameWithoutPath>gatt_svr.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
@@ -699,7 +699,7 @@
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\examples\blehr\main.c</PathWithFileName>
<PathWithFileName>..\..\..\..\examples\nimble_heart_rate_sensor\main.c</PathWithFileName>
<FilenameWithoutPath>main.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>

View File

@@ -338,7 +338,7 @@
<MiscControls>--reduce_paths --gnu</MiscControls>
<Define>NRF51,NIMBLE_CFG_CONTROLLER=1,</Define>
<Undefine></Undefine>
<IncludePath>..\..\BSP\Inc;..\..\..\..\arch\arm\arm-v7m\common\include;..\..\..\..\arch\arm\arm-v7m\cortex-m0+\armcc;..\..\..\..\kernel\core\include;..\..\..\..\kernel\pm\include;..\..\..\..\osal\cmsis_os;..\..\TOS_CONFIG;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\npl\TencentOS tiny\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\ext\tinycrypt\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\controller\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\drivers\nrf51\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\transport\ram\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\lls\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\ans\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\bas\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\bleuart\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\gap\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\ias\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\lls\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\tps\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\gatt\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\store\ram\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\util\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\npl\TencentOS tiny\include;..\..\..\..\components\connectivity\Bluetooth_5.0\porting\TencentOS_tiny\include;..\..\..\..\components\connectivity\Bluetooth_5.0\porting\TencentOS_tiny\include\nrf51832;..\..\..\..\platform\vendor_bsp\nordic\nRF5_SDK_15.3.0\modules\nrfx</IncludePath>
<IncludePath>..\..\BSP\Inc;..\..\..\..\arch\arm\arm-v7m\common\include;..\..\..\..\arch\arm\arm-v7m\cortex-m0+\armcc;..\..\..\..\kernel\core\include;..\..\..\..\kernel\pm\include;..\..\..\..\osal\cmsis_os;..\..\TOS_CONFIG;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\npl\TencentOS tiny\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\ext\tinycrypt\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\controller\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\drivers\nrf51\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\transport\ram\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\lls\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\ans\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\bas\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\bleuart\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\gap\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\ias\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\lls\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\tps\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\gatt\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\store\ram\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\util\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\npl\TencentOS tiny\include;..\..\..\..\components\connectivity\Bluetooth_5.0\porting\TencentOS_tiny\include;..\..\..\..\components\connectivity\Bluetooth_5.0\porting\TencentOS_tiny\include\nrf51832;..\..\..\..\platform\vendor_bsp\nordic\nRF5_SDK_15.3.0\modules\nrfx;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\dis\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\bas\include</IncludePath>
</VariousControls>
</Cads>
<Aads>
@@ -580,12 +580,12 @@
<File>
<FileName>gatt_svr.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\examples\blehr\gatt_svr.c</FilePath>
<FilePath>..\..\..\..\examples\nimble_heart_rate_sensor\gatt_svr.c</FilePath>
</File>
<File>
<FileName>main.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\examples\blehr\main.c</FilePath>
<FilePath>..\..\..\..\examples\nimble_heart_rate_sensor\main.c</FilePath>
</File>
</Files>
</Group>

View File

@@ -1,293 +0,0 @@
<html>
<body>
<pre>
<h1><EFBFBD>Vision Build Log</h1>
<h2>Tool Versions:</h2>
IDE-Version: <20><>Vision V5.26.2.0
Copyright (C) 2018 ARM Ltd and ARM Germany GmbH. All rights reserved.
License Information: sheldon dai, tencent, LIC=AK1CX-H5HPV-SGF7K-ZGDWF-QC6LB-GRJE8
Tool Versions:
Toolchain: MDK-ARM Professional Version: 5.26.2.0
Toolchain Path: C:\Keil_v5\ARM\ARMCC\Bin
C Compiler: Armcc.exe V5.06 update 6 (build 750)
Assembler: Armasm.exe V5.06 update 6 (build 750)
Linker/Locator: ArmLink.exe V5.06 update 6 (build 750)
Library Manager: ArmAr.exe V5.06 update 6 (build 750)
Hex Converter: FromElf.exe V5.06 update 6 (build 750)
CPU DLL: SARMCM3.DLL V5.26.2.0
Dialog DLL: DCM.DLL V1.17.2.0
Target DLL: STLink\ST-LINKIII-KEIL_SWO.dll V3.0.5.0
Dialog DLL: TCM.DLL V1.36.1.0
<h2>Project:</h2>
D:\github\master\TencentOS-tiny\board\Nordic_NRF52832\KEIL\blehr\TencentOS_tiny.uvprojx
Project File Date: 10/28/2019
<h2>Output:</h2>
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'TencentOS_tiny'
assembling arm_startup_nrf52.s...
compiling simple_uart.c...
compiling nrfx_rtc.c...
compiling mcu_init.c...
compiling nrfx_glue.c...
compiling nrfx_prs.c...
compiling system_nrf52.c...
compiling nrfx_uart.c...
assembling port_s.S...
compiling rtc.c...
..\..\BSP\Src\rtc.c(57): warning: #177-D: function "rtc_config" was declared but never referenced
static void rtc_config(void)
..\..\BSP\Src\rtc.c: 1 warning, 0 errors
compiling tos_cpu.c...
compiling port_c.c...
compiling tos_event.c...
compiling tos_global.c...
compiling tos_mmblk.c...
compiling tos_mutex.c...
compiling tos_pend.c...
compiling tos_robin.c...
compiling tos_mmheap.c...
compiling tos_sched.c...
compiling tos_sem.c...
compiling tos_sys.c...
compiling tos_task.c...
compiling tos_tick.c...
compiling tos_time.c...
compiling tos_timer.c...
compiling tos_binary_heap.c...
compiling tos_char_fifo.c...
compiling tos_completion.c...
compiling tos_countdownlatch.c...
compiling tos_mail_queue.c...
compiling tos_message_queue.c...
compiling tos_priority_mail_queue.c...
compiling tos_priority_queue.c...
compiling tos_ring_queue.c...
compiling tos_priority_message_queue.c...
compiling cmsis_os.c...
compiling gatt_svr.c...
compiling main.c...
..\..\..\..\examples\blehr\main.c(135): warning: #231-D: declaration is not visible outside of function
blehr_tx_hrate(struct os_event *ev)
..\..\..\..\examples\blehr\main.c(308): warning: #223-D: function "nimble_port_get_dflt_eventq" declared implicitly
ble_npl_callout_init(&blehr_tx_timer, nimble_port_get_dflt_eventq(),
..\..\..\..\examples\blehr\main.c(308): warning: #167-D: argument of type "int" is incompatible with parameter of type "struct ble_npl_eventq *"
ble_npl_callout_init(&blehr_tx_timer, nimble_port_get_dflt_eventq(),
..\..\..\..\examples\blehr\main.c(309): warning: #167-D: argument of type "void (*)(struct os_event *)" is incompatible with parameter of type "ble_npl_event_fn *"
blehr_tx_hrate, NULL);
..\..\..\..\examples\blehr\main.c(326): warning: #167-D: argument of type "void (*)(void)" is incompatible with parameter of type "k_task_entry_t"
nimble_port_tencentos_tiny_init(nimble_port_run);
..\..\..\..\examples\blehr\main.c(338): warning: #223-D: function "board_init" declared implicitly
board_init();
..\..\..\..\examples\blehr\main.c(343): warning: #223-D: function "nimble_port_init" declared implicitly
nimble_port_init();
..\..\..\..\examples\blehr\main.c(345): warning: #167-D: argument of type "int (*)(void)" is incompatible with parameter of type "k_task_entry_t"
tos_task_create(&blehr_task, "blehr_boot", blehr_boot, NULL,
..\..\..\..\examples\blehr\main.c: 8 warnings, 0 errors
compiling nimble_port_tencentos_tiny.c...
compiling npl_os_tencenos_tiny.c...
compiling nrf5x_isr.c...
compiling tencent_os_tiny_libc.c...
compiling ble_att.c...
compiling ble_att_clt.c...
compiling ble_eddystone.c...
compiling ble_att_cmd.c...
compiling ble_att_svr.c...
compiling ble_gatts.c...
compiling ble_gap.c...
compiling ble_gatts_lcl.c...
compiling ble_gattc.c...
compiling ble_hs.c...
compiling ble_hs_adv.c...
compiling ble_hs_atomic.c...
compiling ble_hs_cfg.c...
compiling ble_hs_conn.c...
compiling ble_hs_dbg.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_dbg.c(653): warning: #111-D: statement is unreachable
evcode = evbuf[0];
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_dbg.c: 1 warning, 0 errors
compiling ble_hs_flow.c...
compiling ble_hs_hci.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci.c(88): warning: #69-D: integer conversion resulted in truncation
rc = ble_npl_mutex_pend(&ble_hs_hci_mutex, BLE_NPL_TIME_FOREVER);
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci.c(38): warning: #550-D: variable "ble_hs_hci_max_pkts" was set but never used
static uint8_t ble_hs_hci_max_pkts;
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci.c: 2 warnings, 0 errors
compiling ble_hs_hci_evt.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci_evt.c(750): warning: #186-D: pointless comparison of unsigned integer with zero
if (evt.conn_latency < BLE_HCI_CONN_LATENCY_MIN ||
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci_evt.c(808): warning: #186-D: pointless comparison of unsigned integer with zero
if (evt.latency < BLE_HCI_CONN_LATENCY_MIN ||
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci_evt.c: 2 warnings, 0 errors
compiling ble_hs_hci_cmd.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci_cmd.c(478): warning: #186-D: pointless comparison of unsigned integer with zero
if ((hcc->conn_latency < BLE_HCI_CONN_LATENCY_MIN) ||
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci_cmd.c: 1 warning, 0 errors
compiling ble_hs_hci_util.c...
compiling ble_hs_id.c...
compiling ble_hs_log.c...
compiling ble_hs_mbuf.c...
compiling ble_hs_misc.c...
compiling ble_hs_mqueue.c...
compiling ble_hs_shutdown.c...
compiling ble_hs_periodic_sync.c...
compiling ble_hs_pvcy.c...
compiling ble_hs_startup.c...
compiling ble_hs_stop.c...
compiling ble_ibeacon.c...
compiling ble_l2cap.c...
compiling ble_l2cap_coc.c...
compiling ble_l2cap_sig.c...
compiling ble_l2cap_sig_cmd.c...
compiling ble_monitor.c...
compiling ble_sm_alg.c...
compiling ble_sm_cmd.c...
compiling ble_sm.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_sm.c(984): warning: #111-D: statement is unreachable
rc = ble_store_util_count(obj_type, &count);
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_sm.c: 1 warning, 0 errors
compiling ble_sm_lgcy.c...
compiling ble_sm_sc.c...
compiling ble_store.c...
compiling ble_store_util.c...
compiling ble_uuid.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_uuid.c(242): warning: #1254-D: arithmetic on pointer to void or function type
put_le32(dst + 12, BLE_UUID32(uuid)->value);
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_uuid.c: 1 warning, 0 errors
compiling ble_ll.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\controller\src\ble_ll.c(1164): warning: #69-D: integer conversion resulted in truncation
ev = ble_npl_eventq_get(&g_ble_ll_data.ll_evq, BLE_NPL_TIME_FOREVER);
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\controller\src\ble_ll.c: 1 warning, 0 errors
compiling ble_ll_adv.c...
compiling ble_ll_conn_hci.c...
compiling ble_ll_conn.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\controller\src\ble_ll_conn.c(516): warning: #111-D: statement is unreachable
connsm = g_ble_ll_conn_create_sm;
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\controller\src\ble_ll_conn.c(540): warning: #111-D: statement is unreachable
connsm = g_ble_ll_conn_create_sm;
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\controller\src\ble_ll_conn.c: 2 warnings, 0 errors
compiling ble_ll_dtm.c...
compiling ble_ll_ctrl.c...
compiling ble_ll_hci.c...
compiling ble_ll_rand.c...
compiling ble_ll_hci_ev.c...
compiling ble_ll_resolv.c...
compiling ble_ll_scan.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\controller\src\ble_ll_scan.c(2155): warning: #111-D: statement is unreachable
return 0;
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\controller\src\ble_ll_scan.c: 1 warning, 0 errors
compiling ble_ll_supp_cmd.c...
compiling ble_ll_sched.c...
compiling ble_ll_sync.c...
compiling ble_ll_trace.c...
compiling ble_ll_utils.c...
compiling ble_ll_whitelist.c...
compiling endian.c...
compiling ble_ll_xcvr.c...
compiling mem.c...
compiling hal_timer.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\src\hal_timer.c(172): warning: #188-D: enumerated type mixed with another type
NVIC_SetPendingIRQ(bsptimer->tmr_irq_num);
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\src\hal_timer.c(199): warning: #188-D: enumerated type mixed with another type
NVIC_SetPendingIRQ(bsptimer->tmr_irq_num);
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\src\hal_timer.c(234): warning: #188-D: enumerated type mixed with another type
NVIC_SetPendingIRQ(bsptimer->tmr_irq_num);
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\src\hal_timer.c(488): warning: #188-D: enumerated type mixed with another type
NVIC_DisableIRQ(irq_num);
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\src\hal_timer.c(490): warning: #188-D: enumerated type mixed with another type
NVIC_SetPriority(irq_num, (1 << __NVIC_PRIO_BITS) - 1);
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\src\hal_timer.c(556): warning: #188-D: enumerated type mixed with another type
NVIC_EnableIRQ(bsptimer->tmr_irq_num);
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\src\hal_timer.c: 6 warnings, 0 errors
compiling nimble_port.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\src\nimble_port.c(64): warning: #69-D: integer conversion resulted in truncation
ev = ble_npl_eventq_get(&g_eventq_dflt, BLE_NPL_TIME_FOREVER);
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\src\nimble_port.c: 1 warning, 0 errors
compiling os_cputime_pwr2.c...
compiling os_cputime.c...
compiling os_mempool.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\src\os_mempool.c(129): warning: #188-D: enumerated type mixed with another type
return rc;
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\src\os_mempool.c(136): warning: #188-D: enumerated type mixed with another type
return 0;
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\src\os_mempool.c(312): warning: #188-D: enumerated type mixed with another type
return rc;
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\src\os_mempool.c: 3 warnings, 0 errors
compiling os_mbuf.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\src\os_mbuf.c(388): warning: #1254-D: arithmetic on pointer to void or function type
data += space;
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\src\os_mbuf.c(403): warning: #1254-D: arithmetic on pointer to void or function type
data += new->om_len;
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\src\os_mbuf.c(654): warning: #1254-D: arithmetic on pointer to void or function type
rc = memcmp(om->om_data + om_off, data + data_off, chunk_sz);
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\src\os_mbuf.c: 3 warnings, 0 errors
compiling aes_decrypt.c...
compiling os_msys_init.c...
compiling aes_encrypt.c...
compiling cmac_mode.c...
compiling ecc.c...
compiling ecc_dh.c...
compiling utils.c...
compiling ble_hci_ram.c...
compiling ble_util.c...
compiling ble_hw.c...
compiling ble_phy.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\drivers\nrf52\src\ble_phy.c(1042): warning: #68-D: integer conversion resulted in a change of sign
ble_hdr->rxinfo.rssi = (-1 * NRF_RADIO->RSSISAMPLE) +
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\drivers\nrf52\src\ble_phy.c: 1 warning, 0 errors
compiling ble_svc_ans.c...
compiling ble_svc_bas.c...
compiling bleuart.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\bleuart\src\bleuart.c(145): warning: #177-D: function "bleuart_uart_read" was declared but never referenced
bleuart_uart_read(void)
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\bleuart\src\bleuart.c: 1 warning, 0 errors
compiling ble_svc_gap.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\gap\src\ble_svc_gap.c(38): warning: #550-D: variable "ble_svc_gap_chr_changed_cb_fn" was set but never used
static ble_svc_gap_chr_changed_fn *ble_svc_gap_chr_changed_cb_fn;
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\gap\src\ble_svc_gap.c: 1 warning, 0 errors
compiling ble_svc_gatt.c...
compiling ble_svc_ias.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\ias\src\ble_svc_ias.c(117): warning: #111-D: statement is unreachable
return 0;
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\ias\src\ble_svc_ias.c: 1 warning, 0 errors
compiling ble_svc_lls.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\lls\src\ble_svc_lls.c(116): warning: #111-D: statement is unreachable
return 0;
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\lls\src\ble_svc_lls.c: 1 warning, 0 errors
compiling ble_svc_tps.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\tps\src\ble_svc_tps.c(88): warning: #111-D: statement is unreachable
return 0;
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\tps\src\ble_svc_tps.c: 1 warning, 0 errors
compiling ble_store_ram.c...
compiling addr.c...
linking...
Program Size: Code=143432 RO-data=6172 RW-data=912 ZI-data=44184
".\Objects\TencentOS_tiny.axf" - 0 Error(s), 40 Warning(s).
<h2>Software Packages used:</h2>
Package Vendor: ARM
http://www.keil.com/pack/ARM.CMSIS.5.6.0.pack
ARM.CMSIS.5.6.0
CMSIS (Cortex Microcontroller Software Interface Standard)
* Component: CORE Version: 5.3.0
Package Vendor: NordicSemiconductor
http://developer.nordicsemi.com/nRF5_SDK/pieces/nRF_DeviceFamilyPack/NordicSemiconductor.nRF_DeviceFamilyPack.8.24.1.pack
NordicSemiconductor.nRF_DeviceFamilyPack.8.24.1
Nordic Semiconductor nRF ARM devices Device Family Pack.
<h2>Collection of Component include folders:</h2>
.\RTE\_TencentOS_tiny
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\Core\Include
C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_DeviceFamilyPack\8.24.1\Device\Include
<h2>Collection of Component Files used:</h2>
* Component: ARM::CMSIS:CORE:5.3.0
Build Time Elapsed: 00:00:21
</pre>
</body>
</html>

View File

@@ -0,0 +1,72 @@
<html>
<body>
<pre>
<h1><EFBFBD>Vision Build Log</h1>
<h2>Tool Versions:</h2>
IDE-Version: <20><>Vision V5.26.2.0
Copyright (C) 2018 ARM Ltd and ARM Germany GmbH. All rights reserved.
License Information: sheldon dai, tencent, LIC=AK1CX-H5HPV-SGF7K-ZGDWF-QC6LB-GRJE8
Tool Versions:
Toolchain: MDK-ARM Professional Version: 5.26.2.0
Toolchain Path: C:\Keil_v5\ARM\ARMCC\Bin
C Compiler: Armcc.exe V5.06 update 6 (build 750)
Assembler: Armasm.exe V5.06 update 6 (build 750)
Linker/Locator: ArmLink.exe V5.06 update 6 (build 750)
Library Manager: ArmAr.exe V5.06 update 6 (build 750)
Hex Converter: FromElf.exe V5.06 update 6 (build 750)
CPU DLL: SARMCM3.DLL V5.26.2.0
Dialog DLL: DCM.DLL V1.17.2.0
Target DLL: STLink\ST-LINKIII-KEIL_SWO.dll V3.0.5.0
Dialog DLL: TCM.DLL V1.36.1.0
<h2>Project:</h2>
D:\github\ble_dev\TencentOS-tiny\board\Nordic_NRF52832\KEIL\nimble_gatt\TencentOS_tiny.uvprojx
Project File Date: 11/12/2019
<h2>Output:</h2>
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'TencentOS_tiny'
compiling main.c...
..\..\..\..\examples\nimble_gatt\main.c(97): warning: #177-D: variable "adv_params" was declared but never referenced
struct ble_gap_adv_params adv_params;
..\..\..\..\examples\nimble_gatt\main.c(165): warning: #167-D: argument of type "void (*)(void)" is incompatible with parameter of type "k_task_entry_t"
nimble_port_tencentos_tiny_init(nimble_port_run);
..\..\..\..\examples\nimble_gatt\main.c(204): warning: #223-D: function "board_init" declared implicitly
board_init();
..\..\..\..\examples\nimble_gatt\main.c(209): warning: #223-D: function "nimble_port_init" declared implicitly
nimble_port_init();
..\..\..\..\examples\nimble_gatt\main.c(216): warning: #167-D: argument of type "int (*)(void)" is incompatible with parameter of type "k_task_entry_t"
tos_task_create(&ble_boot_task, "boot", ble_boot, NULL,
..\..\..\..\examples\nimble_gatt\main.c(78): warning: #177-D: variable "gatt_svr_svc_rw_demo_uuid" was declared but never referenced
static const ble_uuid128_t gatt_svr_svc_rw_demo_uuid
..\..\..\..\examples\nimble_gatt\main.c: 6 warnings, 0 errors
linking...
Program Size: Code=145372 RO-data=6336 RW-data=1040 ZI-data=45864
".\Objects\TencentOS_tiny.axf" - 0 Error(s), 6 Warning(s).
<h2>Software Packages used:</h2>
Package Vendor: ARM
http://www.keil.com/pack/ARM.CMSIS.5.6.0.pack
ARM.CMSIS.5.6.0
CMSIS (Cortex Microcontroller Software Interface Standard)
* Component: CORE Version: 5.3.0
Package Vendor: NordicSemiconductor
http://developer.nordicsemi.com/nRF5_SDK/pieces/nRF_DeviceFamilyPack/NordicSemiconductor.nRF_DeviceFamilyPack.8.24.1.pack
NordicSemiconductor.nRF_DeviceFamilyPack.8.24.1
Nordic Semiconductor nRF ARM devices Device Family Pack.
<h2>Collection of Component include folders:</h2>
.\RTE\_TencentOS_tiny
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\Core\Include
C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_DeviceFamilyPack\8.24.1\Device\Include
<h2>Collection of Component Files used:</h2>
* Component: ARM::CMSIS:CORE:5.3.0
Build Time Elapsed: 00:00:03
</pre>
</body>
</html>

View File

@@ -152,18 +152,34 @@
<Bp>
<Number>0</Number>
<Type>0</Type>
<LineNumber>232</LineNumber>
<LineNumber>249</LineNumber>
<EnabledFlag>0</EnabledFlag>
<Address>14772</Address>
<Address>17318</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\..\..\..\examples\blehr\main.c</Filename>
<Filename>..\..\..\..\components\connectivity\Bluetooth_5.0\porting\TencentOS_tiny\src\npl_os_tencenos_tiny.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\TencentOS_tiny\../../../../examples/blehr/main.c\232</Expression>
<Expression>\\TencentOS_tiny\../../../../components/connectivity/Bluetooth_5.0/porting/TencentOS_tiny/src/npl_os_tencenos_tiny.c\249</Expression>
</Bp>
<Bp>
<Number>1</Number>
<Type>0</Type>
<LineNumber>67</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>14906</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\..\..\..\examples\nimble_gatt\main.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\TencentOS_tiny\../../../../examples/nimble_gatt/main.c\67</Expression>
</Bp>
</Breakpoint>
<WatchWindow1>
@@ -723,8 +739,8 @@
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\examples\blehr\gatt_svr.c</PathWithFileName>
<FilenameWithoutPath>gatt_svr.c</FilenameWithoutPath>
<PathWithFileName>..\..\..\..\examples\nimble_gatt\main.c</PathWithFileName>
<FilenameWithoutPath>main.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
@@ -735,8 +751,8 @@
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\examples\blehr\main.c</PathWithFileName>
<FilenameWithoutPath>main.c</FilenameWithoutPath>
<PathWithFileName>..\..\..\..\examples\nimble_gatt\gatt_svr.c</PathWithFileName>
<FilenameWithoutPath>gatt_svr.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>

File diff suppressed because it is too large Load Diff

View File

@@ -16,122 +16,90 @@ Linker/Locator: ArmLink.exe V5.06 update 6 (build 750)
Library Manager: ArmAr.exe V5.06 update 6 (build 750)
Hex Converter: FromElf.exe V5.06 update 6 (build 750)
CPU DLL: SARMCM3.DLL V5.26.2.0
Dialog DLL: DARMCM1.DLL V1.19.1.0
Dialog DLL: DCM.DLL V1.17.2.0
Target DLL: STLink\ST-LINKIII-KEIL_SWO.dll V3.0.5.0
Dialog DLL: TARMCM1.DLL V1.14.0.0
Dialog DLL: TCM.DLL V1.36.1.0
<h2>Project:</h2>
D:\github\master\TencentOS-tiny\board\Nordic_NRF51822\KEIL\blehr\TencentOS_tiny.uvprojx
Project File Date: 10/28/2019
D:\github\ble_dev\TencentOS-tiny\board\Nordic_NRF52832\KEIL\nimble_heart_rate_sensor\TencentOS_tiny.uvprojx
Project File Date: 11/01/2019
<h2>Output:</h2>
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'TencentOS_tiny'
compiling tos_cpu.c...
compiling tos_mmblk.c...
compiling port_c.c...
compiling tos_event.c...
compiling mcu_init.c...
..\..\BSP\Src\mcu_init.c(29): warning: #260-D: explicit type is missing ("int" assumed)
_ttywrch(int ch)
..\..\BSP\Src\mcu_init.c: 1 warning, 0 errors
compiling rtc.c...
compiling tos_global.c...
compiling tos_mmheap.c...
compiling tos_sem.c...
compiling tos_robin.c...
compiling tos_sys.c...
compiling tos_sched.c...
compiling tos_pend.c...
compiling tos_mutex.c...
compiling tos_task.c...
compiling tos_tick.c...
compiling tos_binary_heap.c...
compiling tos_char_fifo.c...
compiling tos_timer.c...
compiling tos_time.c...
compiling tos_completion.c...
compiling tos_countdownlatch.c...
compiling tos_mail_queue.c...
compiling tos_message_queue.c...
compiling tos_priority_mail_queue.c...
compiling tos_priority_message_queue.c...
compiling tos_priority_queue.c...
compiling tos_ring_queue.c...
compiling cmsis_os.c...
compiling gatt_svr.c...
compiling main.c...
..\..\..\..\examples\blehr\main.c(135): warning: #231-D: declaration is not visible outside of function
..\..\..\..\examples\nimble_heart_rate_sensor\main.c(148): warning: #231-D: declaration is not visible outside of function
blehr_tx_hrate(struct os_event *ev)
..\..\..\..\examples\blehr\main.c(308): warning: #223-D: function "nimble_port_get_dflt_eventq" declared implicitly
..\..\..\..\examples\nimble_heart_rate_sensor\main.c(254): warning: #223-D: function "nimble_port_get_dflt_eventq" declared implicitly
ble_npl_callout_init(&blehr_tx_timer, nimble_port_get_dflt_eventq(),
..\..\..\..\examples\blehr\main.c(308): warning: #167-D: argument of type "int" is incompatible with parameter of type "struct ble_npl_eventq *"
..\..\..\..\examples\nimble_heart_rate_sensor\main.c(254): warning: #167-D: argument of type "int" is incompatible with parameter of type "struct ble_npl_eventq *"
ble_npl_callout_init(&blehr_tx_timer, nimble_port_get_dflt_eventq(),
..\..\..\..\examples\blehr\main.c(309): warning: #167-D: argument of type "void (*)(struct os_event *)" is incompatible with parameter of type "ble_npl_event_fn *"
blehr_tx_hrate, NULL);
..\..\..\..\examples\blehr\main.c(326): warning: #167-D: argument of type "void (*)(void)" is incompatible with parameter of type "k_task_entry_t"
..\..\..\..\examples\nimble_heart_rate_sensor\main.c(255): warning: #167-D: argument of type "void (*)(struct os_event *)" is incompatible with parameter of type "ble_npl_event_fn *"
blehr_tx_hrate, NULL);
..\..\..\..\examples\nimble_heart_rate_sensor\main.c(271): warning: #167-D: argument of type "void (*)(void)" is incompatible with parameter of type "k_task_entry_t"
nimble_port_tencentos_tiny_init(nimble_port_run);
..\..\..\..\examples\blehr\main.c(338): warning: #223-D: function "board_init" declared implicitly
..\..\..\..\examples\nimble_heart_rate_sensor\main.c(281): warning: #223-D: function "board_init" declared implicitly
board_init();
..\..\..\..\examples\blehr\main.c(343): warning: #223-D: function "nimble_port_init" declared implicitly
..\..\..\..\examples\nimble_heart_rate_sensor\main.c(286): warning: #223-D: function "nimble_port_init" declared implicitly
nimble_port_init();
..\..\..\..\examples\blehr\main.c(345): warning: #167-D: argument of type "int (*)(void)" is incompatible with parameter of type "k_task_entry_t"
..\..\..\..\examples\nimble_heart_rate_sensor\main.c(288): warning: #167-D: argument of type "int (*)(void)" is incompatible with parameter of type "k_task_entry_t"
tos_task_create(&blehr_task, "blehr_boot", blehr_boot, NULL,
..\..\..\..\examples\blehr\main.c: 8 warnings, 0 errors
compiling nimble_port_tencentos_tiny.c...
..\..\..\..\examples\nimble_heart_rate_sensor\main.c: 8 warnings, 0 errors
compiling npl_os_tencenos_tiny.c...
compiling tencent_os_tiny_libc.c...
compiling ble_att.c...
compiling ble_att_clt.c...
compiling ble_att.c...
compiling nimble_port_tencentos_tiny.c...
compiling ble_att_cmd.c...
compiling ble_eddystone.c...
compiling ble_att_svr.c...
compiling ble_gap.c...
compiling ble_gatts.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_gap.c(2241): warning: #167-D: argument of type "uint32_t *" is incompatible with parameter of type "ble_npl_time_t *"
rc = ble_npl_time_ms_to_ticks(duration_ms, &duration_ticks);
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_gap.c(4119): warning: #167-D: argument of type "uint32_t *" is incompatible with parameter of type "ble_npl_time_t *"
rc = ble_npl_time_ms_to_ticks(duration_ms, &duration_ticks);
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_gap.c(4548): warning: #167-D: argument of type "uint32_t *" is incompatible with parameter of type "ble_npl_time_t *"
rc = ble_npl_time_ms_to_ticks(duration_ms, &duration_ticks);
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_gap.c: 3 warnings, 0 errors
compiling ble_gatts_lcl.c...
compiling ble_gattc.c...
compiling ble_gatts.c...
compiling ble_hs.c...
compiling ble_hs_adv.c...
compiling ble_gattc.c...
compiling ble_hs_atomic.c...
compiling ble_hs_adv.c...
compiling ble_hs_cfg.c...
compiling ble_hs_conn.c...
compiling ble_hs_dbg.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_dbg.c(653): warning: #111-D: statement is unreachable
evcode = evbuf[0];
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_dbg.c: 1 warning, 0 errors
compiling ble_hs_flow.c...
compiling ble_hs_hci.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci.c(88): warning: #69-D: integer conversion resulted in truncation
rc = ble_npl_mutex_pend(&ble_hs_hci_mutex, BLE_NPL_TIME_FOREVER);
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci.c(38): warning: #550-D: variable "ble_hs_hci_max_pkts" was set but never used
static uint8_t ble_hs_hci_max_pkts;
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci.c: 2 warnings, 0 errors
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci.c: 1 warning, 0 errors
compiling ble_hs_hci_cmd.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci_cmd.c(478): warning: #186-D: pointless comparison of unsigned integer with zero
if ((hcc->conn_latency < BLE_HCI_CONN_LATENCY_MIN) ||
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci_cmd.c: 1 warning, 0 errors
compiling ble_hs_hci_evt.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci_evt.c(750): warning: #186-D: pointless comparison of unsigned integer with zero
if (evt.conn_latency < BLE_HCI_CONN_LATENCY_MIN ||
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci_evt.c(808): warning: #186-D: pointless comparison of unsigned integer with zero
if (evt.latency < BLE_HCI_CONN_LATENCY_MIN ||
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci_evt.c: 2 warnings, 0 errors
compiling ble_hs_hci_cmd.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci_cmd.c(478): warning: #186-D: pointless comparison of unsigned integer with zero
if ((hcc->conn_latency < BLE_HCI_CONN_LATENCY_MIN) ||
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci_cmd.c: 1 warning, 0 errors
compiling ble_hs_hci_util.c...
compiling ble_hs_id.c...
compiling ble_hs_log.c...
compiling ble_hs_id.c...
compiling ble_hs_mbuf.c...
compiling ble_hs_misc.c...
compiling ble_hs_mqueue.c...
compiling ble_hs_periodic_sync.c...
compiling ble_hs_startup.c...
compiling ble_hs_pvcy.c...
compiling ble_hs_startup.c...
compiling ble_hs_stop.c...
compiling ble_ibeacon.c...
compiling ble_l2cap.c...
compiling ble_l2cap_coc.c...
compiling ble_l2cap_sig.c...
compiling ble_l2cap_sig_cmd.c...
compiling ble_monitor.c...
compiling ble_sm_alg.c...
compiling ble_sm.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_sm.c(984): warning: #111-D: statement is unreachable
@@ -147,11 +115,7 @@ compiling ble_uuid.c...
put_le32(dst + 12, BLE_UUID32(uuid)->value);
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_uuid.c: 1 warning, 0 errors
compiling ble_ll.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\controller\src\ble_ll.c(1164): warning: #69-D: integer conversion resulted in truncation
ev = ble_npl_eventq_get(&g_ble_ll_data.ll_evq, BLE_NPL_TIME_FOREVER);
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\controller\src\ble_ll.c: 1 warning, 0 errors
compiling ble_ll_adv.c...
compiling ble_ll_dtm.c...
compiling ble_ll_conn_hci.c...
compiling ble_ll_conn.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\controller\src\ble_ll_conn.c(516): warning: #111-D: statement is unreachable
@@ -171,10 +135,11 @@ compiling ble_ll_scan.c...
compiling ble_ll_supp_cmd.c...
compiling ble_ll_sync.c...
compiling ble_ll_sched.c...
compiling ble_ll_trace.c...
compiling ble_ll_utils.c...
compiling ble_ll_whitelist.c...
compiling ble_ll_xcvr.c...
compiling mem.c...
compiling nimble_port.c...
compiling hal_timer.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\src\hal_timer.c(172): warning: #188-D: enumerated type mixed with another type
NVIC_SetPendingIRQ(bsptimer->tmr_irq_num);
@@ -189,13 +154,8 @@ compiling hal_timer.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\src\hal_timer.c(556): warning: #188-D: enumerated type mixed with another type
NVIC_EnableIRQ(bsptimer->tmr_irq_num);
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\src\hal_timer.c: 6 warnings, 0 errors
compiling mem.c...
compiling nimble_port.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\src\nimble_port.c(64): warning: #69-D: integer conversion resulted in truncation
ev = ble_npl_eventq_get(&g_eventq_dflt, BLE_NPL_TIME_FOREVER);
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\src\nimble_port.c: 1 warning, 0 errors
compiling os_cputime.c...
compiling os_cputime_pwr2.c...
compiling os_cputime.c...
compiling os_mbuf.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\src\os_mbuf.c(388): warning: #1254-D: arithmetic on pointer to void or function type
data += space;
@@ -217,11 +177,11 @@ compiling ble_hci_ram.c...
compiling ble_util.c...
compiling ble_hw.c...
compiling ble_svc_ans.c...
compiling ble_phy.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\drivers\nrf51\src\ble_phy.c(679): warning: #68-D: integer conversion resulted in a change of sign
ble_hdr->rxinfo.rssi = (-1 * NRF_RADIO->RSSISAMPLE) +
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\drivers\nrf51\src\ble_phy.c: 1 warning, 0 errors
compiling ble_svc_bas.c...
compiling ble_phy.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\drivers\nrf52\src\ble_phy.c(1042): warning: #68-D: integer conversion resulted in a change of sign
ble_hdr->rxinfo.rssi = (-1 * NRF_RADIO->RSSISAMPLE) +
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\drivers\nrf52\src\ble_phy.c: 1 warning, 0 errors
compiling bleuart.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\bleuart\src\bleuart.c(145): warning: #177-D: function "bleuart_uart_read" was declared but never referenced
bleuart_uart_read(void)
@@ -230,15 +190,15 @@ compiling ble_svc_gap.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\gap\src\ble_svc_gap.c(38): warning: #550-D: variable "ble_svc_gap_chr_changed_cb_fn" was set but never used
static ble_svc_gap_chr_changed_fn *ble_svc_gap_chr_changed_cb_fn;
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\gap\src\ble_svc_gap.c: 1 warning, 0 errors
compiling ble_svc_ias.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\ias\src\ble_svc_ias.c(117): warning: #111-D: statement is unreachable
return 0;
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\ias\src\ble_svc_ias.c: 1 warning, 0 errors
compiling ble_svc_gatt.c...
compiling ble_svc_lls.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\lls\src\ble_svc_lls.c(116): warning: #111-D: statement is unreachable
return 0;
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\lls\src\ble_svc_lls.c: 1 warning, 0 errors
compiling ble_svc_ias.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\ias\src\ble_svc_ias.c(117): warning: #111-D: statement is unreachable
return 0;
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\ias\src\ble_svc_ias.c: 1 warning, 0 errors
compiling ble_svc_tps.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\tps\src\ble_svc_tps.c(88): warning: #111-D: statement is unreachable
return 0;
@@ -246,8 +206,8 @@ compiling ble_svc_tps.c...
compiling ble_store_ram.c...
compiling addr.c...
linking...
Program Size: Code=146928 RO-data=5836 RW-data=912 ZI-data=31448
".\Objects\TencentOS_tiny.axf" - 0 Error(s), 40 Warning(s).
Program Size: Code=148792 RO-data=6220 RW-data=1080 ZI-data=44296
".\Objects\TencentOS_tiny.axf" - 0 Error(s), 38 Warning(s).
<h2>Software Packages used:</h2>
@@ -270,7 +230,7 @@ Package Vendor: NordicSemiconductor
<h2>Collection of Component Files used:</h2>
* Component: ARM::CMSIS:CORE:5.3.0
Build Time Elapsed: 00:00:24
Build Time Elapsed: 00:00:17
</pre>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,16 @@
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
LR_IROM1 0x00000000 0x00080000 { ; load region size_region
ER_IROM1 0x00000000 0x00080000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
.ANY (+XO)
}
RW_IRAM1 0x20000000 0x00010000 { ; RW data
.ANY (+RW +ZI)
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<component_viewer schemaVersion="0.1" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="Component_Viewer.xsd">
<component name="EventRecorderStub" version="1.0.0"/> <!--name and version of the component-->
<events>
</events>
</component_viewer>

View File

@@ -21,137 +21,103 @@ Target DLL: STLink\ST-LINKIII-KEIL_SWO.dll V3.0.5.0
Dialog DLL: TCM.DLL V1.36.1.0
<h2>Project:</h2>
D:\github\master\TencentOS-tiny\board\Nordic_NRF52840\KEIL\blehr\TencentOS_tiny.uvprojx
Project File Date: 10/28/2019
D:\github\ble_dev\TencentOS-tiny\board\Nordic_NRF52832\KEIL\nimble_scanner\TencentOS_tiny.uvprojx
Project File Date: 11/04/2019
<h2>Output:</h2>
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'TencentOS_tiny'
compiling tos_event.c...
compiling tos_cpu.c...
compiling tos_global.c...
compiling mcu_init.c...
compiling nrfx_glue.c...
compiling port_c.c...
compiling rtc.c...
..\..\BSP\Src\rtc.c(57): warning: #177-D: function "rtc_config" was declared but never referenced
static void rtc_config(void)
..\..\BSP\Src\rtc.c: 1 warning, 0 errors
compiling tos_mmblk.c...
compiling tos_mmheap.c...
compiling tos_robin.c...
compiling tos_pend.c...
compiling tos_mutex.c...
compiling tos_sched.c...
compiling tos_sem.c...
compiling tos_sys.c...
compiling tos_task.c...
compiling tos_tick.c...
compiling tos_time.c...
compiling tos_timer.c...
compiling tos_char_fifo.c...
compiling tos_binary_heap.c...
compiling tos_completion.c...
compiling tos_countdownlatch.c...
compiling tos_mail_queue.c...
compiling tos_message_queue.c...
compiling tos_priority_mail_queue.c...
compiling tos_priority_message_queue.c...
compiling tos_priority_queue.c...
compiling tos_ring_queue.c...
compiling cmsis_os.c...
compiling gatt_svr.c...
compiling main.c...
..\..\..\..\examples\blehr\main.c(135): warning: #231-D: declaration is not visible outside of function
blehr_tx_hrate(struct os_event *ev)
..\..\..\..\examples\blehr\main.c(308): warning: #223-D: function "nimble_port_get_dflt_eventq" declared implicitly
ble_npl_callout_init(&blehr_tx_timer, nimble_port_get_dflt_eventq(),
..\..\..\..\examples\blehr\main.c(308): warning: #167-D: argument of type "int" is incompatible with parameter of type "struct ble_npl_eventq *"
ble_npl_callout_init(&blehr_tx_timer, nimble_port_get_dflt_eventq(),
..\..\..\..\examples\blehr\main.c(309): warning: #167-D: argument of type "void (*)(struct os_event *)" is incompatible with parameter of type "ble_npl_event_fn *"
blehr_tx_hrate, NULL);
..\..\..\..\examples\blehr\main.c(326): warning: #167-D: argument of type "void (*)(void)" is incompatible with parameter of type "k_task_entry_t"
nimble_port_tencentos_tiny_init(nimble_port_run);
..\..\..\..\examples\blehr\main.c(338): warning: #223-D: function "board_init" declared implicitly
board_init();
..\..\..\..\examples\blehr\main.c(343): warning: #223-D: function "nimble_port_init" declared implicitly
nimble_port_init();
..\..\..\..\examples\blehr\main.c(345): warning: #167-D: argument of type "int (*)(void)" is incompatible with parameter of type "k_task_entry_t"
tos_task_create(&blehr_task, "blehr_boot", blehr_boot, NULL,
..\..\..\..\examples\blehr\main.c: 8 warnings, 0 errors
compiling nimble_port_tencentos_tiny.c...
compiling npl_os_tencenos_tiny.c...
compiling tencent_os_tiny_libc.c...
compiling ble_att.c...
compiling ble_att_clt.c...
compiling ble_att_cmd.c...
compiling nimble_port_tencentos_tiny.c...
compiling ble_eddystone.c...
compiling ble_att_cmd.c...
compiling main.c...
..\..\..\..\examples\nimble_scanner\main.c(147): warning: #167-D: argument of type "ble_addr_t **" is incompatible with parameter of type "const ble_addr_t *"
if (ble_addr_cmp(&addr, &iter->addr) == 0) {
..\..\..\..\examples\nimble_scanner\main.c(160): warning: #167-D: argument of type "const ble_addr_t *" is incompatible with parameter of type "ble_addr_t *"
if (nimble_scan_item_is_exist(disc_addr)) {
..\..\..\..\examples\nimble_scanner\main.c(157): warning: #177-D: variable "i" was declared but never referenced
int i = 0;
..\..\..\..\examples\nimble_scanner\main.c(254): warning: #167-D: argument of type "void (*)(void)" is incompatible with parameter of type "k_task_entry_t"
nimble_port_tencentos_tiny_init(nimble_port_run);
..\..\..\..\examples\nimble_scanner\main.c(261): warning: #223-D: function "ble_hs_util_ensure_addr" declared implicitly
rc = ble_hs_util_ensure_addr(0);
..\..\..\..\examples\nimble_scanner\main.c(298): warning: #223-D: function "board_init" declared implicitly
board_init();
..\..\..\..\examples\nimble_scanner\main.c(303): warning: #223-D: function "nimble_port_init" declared implicitly
nimble_port_init();
..\..\..\..\examples\nimble_scanner\main.c(310): warning: #167-D: argument of type "int (*)(void)" is incompatible with parameter of type "k_task_entry_t"
tos_task_create(&ble_boot_task, "ble_boot", ble_boot, NULL,
..\..\..\..\examples\nimble_scanner\main.c: 8 warnings, 0 errors
compiling ble_att_clt.c...
compiling ble_att_svr.c...
compiling ble_gap.c...
compiling ble_gatts.c...
compiling ble_gatts_lcl.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_gap.c(2241): warning: #167-D: argument of type "uint32_t *" is incompatible with parameter of type "ble_npl_time_t *"
rc = ble_npl_time_ms_to_ticks(duration_ms, &duration_ticks);
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_gap.c(4119): warning: #167-D: argument of type "uint32_t *" is incompatible with parameter of type "ble_npl_time_t *"
rc = ble_npl_time_ms_to_ticks(duration_ms, &duration_ticks);
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_gap.c(4548): warning: #167-D: argument of type "uint32_t *" is incompatible with parameter of type "ble_npl_time_t *"
rc = ble_npl_time_ms_to_ticks(duration_ms, &duration_ticks);
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_gap.c: 3 warnings, 0 errors
compiling ble_gattc.c...
compiling ble_gatts_lcl.c...
compiling ble_gatts.c...
compiling ble_hs.c...
compiling ble_hs_adv.c...
compiling ble_hs_cfg.c...
compiling ble_hs_atomic.c...
compiling ble_hs_flow.c...
compiling ble_hs_conn.c...
compiling ble_hs_hci.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci.c(38): warning: #550-D: variable "ble_hs_hci_max_pkts" was set but never used
static uint8_t ble_hs_hci_max_pkts;
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci.c: 1 warning, 0 errors
compiling ble_hs_dbg.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_dbg.c(653): warning: #111-D: statement is unreachable
evcode = evbuf[0];
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_dbg.c: 1 warning, 0 errors
compiling ble_hs_hci.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci.c(88): warning: #69-D: integer conversion resulted in truncation
rc = ble_npl_mutex_pend(&ble_hs_hci_mutex, BLE_NPL_TIME_FOREVER);
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci.c(38): warning: #550-D: variable "ble_hs_hci_max_pkts" was set but never used
static uint8_t ble_hs_hci_max_pkts;
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci.c: 2 warnings, 0 errors
compiling ble_hs_hci_cmd.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci_cmd.c(478): warning: #186-D: pointless comparison of unsigned integer with zero
if ((hcc->conn_latency < BLE_HCI_CONN_LATENCY_MIN) ||
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci_cmd.c: 1 warning, 0 errors
compiling ble_hs_hci_util.c...
compiling ble_hs_flow.c...
compiling ble_hs_hci_evt.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci_evt.c(750): warning: #186-D: pointless comparison of unsigned integer with zero
if (evt.conn_latency < BLE_HCI_CONN_LATENCY_MIN ||
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci_evt.c(808): warning: #186-D: pointless comparison of unsigned integer with zero
if (evt.latency < BLE_HCI_CONN_LATENCY_MIN ||
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci_evt.c: 2 warnings, 0 errors
compiling ble_hs_hci_util.c...
compiling ble_hs_hci_cmd.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci_cmd.c(478): warning: #186-D: pointless comparison of unsigned integer with zero
if ((hcc->conn_latency < BLE_HCI_CONN_LATENCY_MIN) ||
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_hs_hci_cmd.c: 1 warning, 0 errors
compiling ble_hs_id.c...
compiling ble_hs_log.c...
compiling ble_hs_mbuf.c...
compiling ble_hs_misc.c...
compiling ble_hs_mqueue.c...
compiling ble_hs_mbuf.c...
compiling ble_hs_log.c...
compiling ble_hs_periodic_sync.c...
compiling ble_hs_pvcy.c...
compiling ble_hs_startup.c...
compiling ble_ibeacon.c...
compiling ble_hs_stop.c...
compiling ble_hs_mqueue.c...
compiling ble_hs_pvcy.c...
compiling ble_l2cap.c...
compiling ble_hs_stop.c...
compiling ble_ibeacon.c...
compiling ble_l2cap_coc.c...
compiling ble_l2cap_sig.c...
compiling ble_l2cap_sig_cmd.c...
compiling ble_monitor.c...
compiling ble_sm_alg.c...
compiling ble_sm_cmd.c...
compiling ble_sm_lgcy.c...
compiling ble_sm_sc.c...
compiling ble_sm.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_sm.c(984): warning: #111-D: statement is unreachable
rc = ble_store_util_count(obj_type, &count);
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_sm.c: 1 warning, 0 errors
compiling ble_sm_cmd.c...
compiling ble_sm_sc.c...
compiling ble_sm_lgcy.c...
compiling ble_store.c...
compiling ble_store_util.c...
compiling ble_ll.c...
compiling ble_ll_adv.c...
compiling ble_uuid.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_uuid.c(242): warning: #1254-D: arithmetic on pointer to void or function type
put_le32(dst + 12, BLE_UUID32(uuid)->value);
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\src\ble_uuid.c: 1 warning, 0 errors
compiling ble_ll.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\controller\src\ble_ll.c(1164): warning: #69-D: integer conversion resulted in truncation
ev = ble_npl_eventq_get(&g_ble_ll_data.ll_evq, BLE_NPL_TIME_FOREVER);
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\controller\src\ble_ll.c: 1 warning, 0 errors
compiling ble_ll_adv.c...
compiling ble_ll_conn_hci.c...
compiling ble_ll_conn.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\controller\src\ble_ll_conn.c(516): warning: #111-D: statement is unreachable
@@ -161,22 +127,23 @@ compiling ble_ll_conn.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\controller\src\ble_ll_conn.c: 2 warnings, 0 errors
compiling ble_ll_dtm.c...
compiling ble_ll_ctrl.c...
compiling ble_ll_hci.c...
compiling ble_ll_hci_ev.c...
compiling ble_ll_rand.c...
compiling ble_ll_resolv.c...
compiling ble_ll_sched.c...
compiling ble_ll_hci.c...
compiling ble_ll_rand.c...
compiling ble_ll_hci_ev.c...
compiling ble_ll_scan.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\controller\src\ble_ll_scan.c(2155): warning: #111-D: statement is unreachable
return 0;
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\controller\src\ble_ll_scan.c: 1 warning, 0 errors
compiling ble_ll_sched.c...
compiling ble_ll_supp_cmd.c...
compiling ble_ll_trace.c...
compiling ble_ll_sync.c...
compiling ble_ll_utils.c...
compiling ble_ll_xcvr.c...
compiling ble_ll_whitelist.c...
compiling ble_ll_xcvr.c...
compiling mem.c...
compiling nimble_port.c...
compiling hal_timer.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\src\hal_timer.c(172): warning: #188-D: enumerated type mixed with another type
NVIC_SetPendingIRQ(bsptimer->tmr_irq_num);
@@ -191,10 +158,6 @@ compiling hal_timer.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\src\hal_timer.c(556): warning: #188-D: enumerated type mixed with another type
NVIC_EnableIRQ(bsptimer->tmr_irq_num);
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\src\hal_timer.c: 6 warnings, 0 errors
compiling nimble_port.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\src\nimble_port.c(64): warning: #69-D: integer conversion resulted in truncation
ev = ble_npl_eventq_get(&g_eventq_dflt, BLE_NPL_TIME_FOREVER);
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\src\nimble_port.c: 1 warning, 0 errors
compiling os_cputime.c...
compiling os_cputime_pwr2.c...
compiling os_mbuf.c...
@@ -221,34 +184,34 @@ compiling ble_phy.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\drivers\nrf52\src\ble_phy.c(1042): warning: #68-D: integer conversion resulted in a change of sign
ble_hdr->rxinfo.rssi = (-1 * NRF_RADIO->RSSISAMPLE) +
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\drivers\nrf52\src\ble_phy.c: 1 warning, 0 errors
compiling ble_svc_bas.c...
compiling ble_svc_ans.c...
compiling bleuart.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\bleuart\src\bleuart.c(145): warning: #177-D: function "bleuart_uart_read" was declared but never referenced
bleuart_uart_read(void)
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\bleuart\src\bleuart.c: 1 warning, 0 errors
compiling ble_svc_gatt.c...
compiling ble_svc_bas.c...
compiling ble_svc_gap.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\gap\src\ble_svc_gap.c(38): warning: #550-D: variable "ble_svc_gap_chr_changed_cb_fn" was set but never used
static ble_svc_gap_chr_changed_fn *ble_svc_gap_chr_changed_cb_fn;
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\gap\src\ble_svc_gap.c: 1 warning, 0 errors
compiling ble_svc_gatt.c...
compiling ble_svc_ias.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\ias\src\ble_svc_ias.c(117): warning: #111-D: statement is unreachable
return 0;
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\ias\src\ble_svc_ias.c: 1 warning, 0 errors
compiling ble_svc_lls.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\lls\src\ble_svc_lls.c(116): warning: #111-D: statement is unreachable
return 0;
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\lls\src\ble_svc_lls.c: 1 warning, 0 errors
compiling ble_svc_tps.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\tps\src\ble_svc_tps.c(88): warning: #111-D: statement is unreachable
return 0;
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\tps\src\ble_svc_tps.c: 1 warning, 0 errors
compiling ble_svc_lls.c...
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\lls\src\ble_svc_lls.c(116): warning: #111-D: statement is unreachable
return 0;
..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\lls\src\ble_svc_lls.c: 1 warning, 0 errors
compiling ble_store_ram.c...
compiling addr.c...
linking...
Program Size: Code=143432 RO-data=6172 RW-data=912 ZI-data=44184
".\Objects\TencentOS_tiny.axf" - 0 Error(s), 40 Warning(s).
Program Size: Code=143760 RO-data=5928 RW-data=636 ZI-data=56164
".\Objects\TencentOS_tiny.axf" - 0 Error(s), 39 Warning(s).
<h2>Software Packages used:</h2>
@@ -271,7 +234,7 @@ Package Vendor: NordicSemiconductor
<h2>Collection of Component Files used:</h2>
* Component: ARM::CMSIS:CORE:5.3.0
Build Time Elapsed: 00:00:20
Build Time Elapsed: 00:00:25
</pre>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,16 @@
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
LR_IROM1 0x00000000 0x00080000 { ; load region size_region
ER_IROM1 0x00000000 0x00080000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
.ANY (+XO)
}
RW_IRAM1 0x20000000 0x00010000 { ; RW data
.ANY (+RW +ZI)
}
}

View File

@@ -0,0 +1,20 @@
/*
* Auto generated Run-Time-Environment Component Configuration File
* *** Do not modify ! ***
*
* Project: 'TencentOS_tiny'
* Target: 'TencentOS_tiny'
*/
#ifndef RTE_COMPONENTS_H
#define RTE_COMPONENTS_H
/*
* Define the Device Header File:
*/
#define CMSIS_device_header "nrf.h"
#endif /* RTE_COMPONENTS_H */

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -338,7 +338,7 @@
<MiscControls>--reduce_paths --gnu</MiscControls>
<Define>NRF52,NRF52832_XXAA,NIMBLE_CFG_CONTROLLER=1,CONFIG_GPIO_AS_PINRESET</Define>
<Undefine></Undefine>
<IncludePath>..\..\BSP\Inc;..\..\..\..\arch\arm\arm-v7m\common\include;..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc;..\..\..\..\kernel\core\include;..\..\..\..\kernel\pm\include;..\..\..\..\osal\cmsis_os;..\..\TOS_CONFIG;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\ext\tinycrypt\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\controller\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\drivers\nrf52\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\transport\ram\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\lls\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\ans\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\bas\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\bleuart\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\gap\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\ias\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\lls\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\tps\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\gatt\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\store\ram\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\util\include;..\..\..\..\components\connectivity\Bluetooth_5.0\porting\TencentOS_tiny\include\nrf52832;..\..\..\..\components\connectivity\Bluetooth_5.0\porting\TencentOS_tiny\include;..\..\..\..\platform\vendor_bsp\nordic\nRF5_SDK_15.3.0\modules\nrfx;..\..\BSP\Src</IncludePath>
<IncludePath>..\..\BSP\Inc;..\..\..\..\arch\arm\arm-v7m\common\include;..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc;..\..\..\..\kernel\core\include;..\..\..\..\kernel\pm\include;..\..\..\..\osal\cmsis_os;..\..\TOS_CONFIG;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\ext\tinycrypt\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\controller\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\drivers\nrf52\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\transport\ram\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\lls\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\ans\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\bas\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\bleuart\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\gap\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\ias\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\lls\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\tps\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\gatt\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\store\ram\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\util\include;..\..\..\..\components\connectivity\Bluetooth_5.0\porting\TencentOS_tiny\include\nrf52832;..\..\..\..\components\connectivity\Bluetooth_5.0\porting\TencentOS_tiny\include;..\..\..\..\platform\vendor_bsp\nordic\nRF5_SDK_15.3.0\modules\nrfx;..\..\BSP\Src;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\dis\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\bas\include</IncludePath>
</VariousControls>
</Cads>
<Aads>
@@ -592,15 +592,10 @@
<Group>
<GroupName>example</GroupName>
<Files>
<File>
<FileName>gatt_svr.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\examples\blehr\gatt_svr.c</FilePath>
</File>
<File>
<FileName>main.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\examples\blehr\main.c</FilePath>
<FilePath>..\..\..\..\examples\nimble_scanner\main.c</FilePath>
</File>
</Files>
</Group>

View File

@@ -0,0 +1,371 @@
; Copyright (c) 2009-2018 ARM Limited. All rights reserved.
;
; SPDX-License-Identifier: Apache-2.0
;
; Licensed under the Apache License, Version 2.0 (the License); you may
; not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an AS IS BASIS, WITHOUT
; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;
; NOTICE: This file has been modified by Nordic Semiconductor ASA.
IF :DEF: __STARTUP_CONFIG
#ifdef __STARTUP_CONFIG
#include "startup_config.h"
#ifndef __STARTUP_CONFIG_STACK_ALIGNEMENT
#define __STARTUP_CONFIG_STACK_ALIGNEMENT 3
#endif
#endif
ENDIF
IF :DEF: __STARTUP_CONFIG
Stack_Size EQU __STARTUP_CONFIG_STACK_SIZE
ELIF :DEF: __STACK_SIZE
Stack_Size EQU __STACK_SIZE
ELSE
Stack_Size EQU 8192
ENDIF
IF :DEF: __STARTUP_CONFIG
Stack_Align EQU __STARTUP_CONFIG_STACK_ALIGNEMENT
ELSE
Stack_Align EQU 3
ENDIF
AREA STACK, NOINIT, READWRITE, ALIGN=Stack_Align
Stack_Mem SPACE Stack_Size
__initial_sp
IF :DEF: __STARTUP_CONFIG
Heap_Size EQU __STARTUP_CONFIG_HEAP_SIZE
ELIF :DEF: __HEAP_SIZE
Heap_Size EQU __HEAP_SIZE
ELSE
Heap_Size EQU 8192
ENDIF
AREA HEAP, NOINIT, READWRITE, ALIGN=3
__heap_base
Heap_Mem SPACE Heap_Size
__heap_limit
PRESERVE8
THUMB
; Vector Table Mapped to Address 0 at Reset
AREA RESET, DATA, READONLY
EXPORT __Vectors
EXPORT __Vectors_End
EXPORT __Vectors_Size
__Vectors DCD __initial_sp ; Top of Stack
DCD Reset_Handler
DCD NMI_Handler
DCD HardFault_Handler
DCD MemoryManagement_Handler
DCD BusFault_Handler
DCD UsageFault_Handler
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD SVC_Handler
DCD DebugMon_Handler
DCD 0 ; Reserved
DCD PendSV_Handler
DCD SysTick_Handler
; External Interrupts
DCD POWER_CLOCK_IRQHandler
DCD RADIO_IRQHandler
DCD UARTE0_UART0_IRQHandler
DCD SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
DCD SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
DCD NFCT_IRQHandler
DCD GPIOTE_IRQHandler
DCD SAADC_IRQHandler
DCD TIMER0_IRQHandler
DCD TIMER1_IRQHandler
DCD TIMER2_IRQHandler
DCD RTC0_IRQHandler
DCD TEMP_IRQHandler
DCD RNG_IRQHandler
DCD ECB_IRQHandler
DCD CCM_AAR_IRQHandler
DCD WDT_IRQHandler
DCD RTC1_IRQHandler
DCD QDEC_IRQHandler
DCD COMP_LPCOMP_IRQHandler
DCD SWI0_EGU0_IRQHandler
DCD SWI1_EGU1_IRQHandler
DCD SWI2_EGU2_IRQHandler
DCD SWI3_EGU3_IRQHandler
DCD SWI4_EGU4_IRQHandler
DCD SWI5_EGU5_IRQHandler
DCD TIMER3_IRQHandler
DCD TIMER4_IRQHandler
DCD PWM0_IRQHandler
DCD PDM_IRQHandler
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD MWU_IRQHandler
DCD PWM1_IRQHandler
DCD PWM2_IRQHandler
DCD SPIM2_SPIS2_SPI2_IRQHandler
DCD RTC2_IRQHandler
DCD I2S_IRQHandler
DCD FPU_IRQHandler
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
__Vectors_End
__Vectors_Size EQU __Vectors_End - __Vectors
AREA |.text|, CODE, READONLY
; Reset Handler
Reset_Handler PROC
EXPORT Reset_Handler [WEAK]
IMPORT SystemInit
IMPORT __main
LDR R0, =SystemInit
BLX R0
LDR R0, =__main
BX R0
ENDP
; Dummy Exception Handlers (infinite loops which can be modified)
NMI_Handler PROC
EXPORT NMI_Handler [WEAK]
B .
ENDP
HardFault_Handler\
PROC
EXPORT HardFault_Handler [WEAK]
B .
ENDP
MemoryManagement_Handler\
PROC
EXPORT MemoryManagement_Handler [WEAK]
B .
ENDP
BusFault_Handler\
PROC
EXPORT BusFault_Handler [WEAK]
B .
ENDP
UsageFault_Handler\
PROC
EXPORT UsageFault_Handler [WEAK]
B .
ENDP
SVC_Handler PROC
EXPORT SVC_Handler [WEAK]
B .
ENDP
DebugMon_Handler\
PROC
EXPORT DebugMon_Handler [WEAK]
B .
ENDP
PendSV_Handler PROC
EXPORT PendSV_Handler [WEAK]
B .
ENDP
SysTick_Handler PROC
EXPORT SysTick_Handler [WEAK]
B .
ENDP
Default_Handler PROC
EXPORT POWER_CLOCK_IRQHandler [WEAK]
EXPORT RADIO_IRQHandler [WEAK]
EXPORT UARTE0_UART0_IRQHandler [WEAK]
EXPORT SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler [WEAK]
EXPORT SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler [WEAK]
EXPORT NFCT_IRQHandler [WEAK]
EXPORT GPIOTE_IRQHandler [WEAK]
EXPORT SAADC_IRQHandler [WEAK]
EXPORT TIMER0_IRQHandler [WEAK]
EXPORT TIMER1_IRQHandler [WEAK]
EXPORT TIMER2_IRQHandler [WEAK]
EXPORT RTC0_IRQHandler [WEAK]
EXPORT TEMP_IRQHandler [WEAK]
EXPORT RNG_IRQHandler [WEAK]
EXPORT ECB_IRQHandler [WEAK]
EXPORT CCM_AAR_IRQHandler [WEAK]
EXPORT WDT_IRQHandler [WEAK]
EXPORT RTC1_IRQHandler [WEAK]
EXPORT QDEC_IRQHandler [WEAK]
EXPORT COMP_LPCOMP_IRQHandler [WEAK]
EXPORT SWI0_EGU0_IRQHandler [WEAK]
EXPORT SWI1_EGU1_IRQHandler [WEAK]
EXPORT SWI2_EGU2_IRQHandler [WEAK]
EXPORT SWI3_EGU3_IRQHandler [WEAK]
EXPORT SWI4_EGU4_IRQHandler [WEAK]
EXPORT SWI5_EGU5_IRQHandler [WEAK]
EXPORT TIMER3_IRQHandler [WEAK]
EXPORT TIMER4_IRQHandler [WEAK]
EXPORT PWM0_IRQHandler [WEAK]
EXPORT PDM_IRQHandler [WEAK]
EXPORT MWU_IRQHandler [WEAK]
EXPORT PWM1_IRQHandler [WEAK]
EXPORT PWM2_IRQHandler [WEAK]
EXPORT SPIM2_SPIS2_SPI2_IRQHandler [WEAK]
EXPORT RTC2_IRQHandler [WEAK]
EXPORT I2S_IRQHandler [WEAK]
EXPORT FPU_IRQHandler [WEAK]
POWER_CLOCK_IRQHandler
RADIO_IRQHandler
UARTE0_UART0_IRQHandler
SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
NFCT_IRQHandler
GPIOTE_IRQHandler
SAADC_IRQHandler
TIMER0_IRQHandler
TIMER1_IRQHandler
TIMER2_IRQHandler
RTC0_IRQHandler
TEMP_IRQHandler
RNG_IRQHandler
ECB_IRQHandler
CCM_AAR_IRQHandler
WDT_IRQHandler
RTC1_IRQHandler
QDEC_IRQHandler
COMP_LPCOMP_IRQHandler
SWI0_EGU0_IRQHandler
SWI1_EGU1_IRQHandler
SWI2_EGU2_IRQHandler
SWI3_EGU3_IRQHandler
SWI4_EGU4_IRQHandler
SWI5_EGU5_IRQHandler
TIMER3_IRQHandler
TIMER4_IRQHandler
PWM0_IRQHandler
PDM_IRQHandler
MWU_IRQHandler
PWM1_IRQHandler
PWM2_IRQHandler
SPIM2_SPIS2_SPI2_IRQHandler
RTC2_IRQHandler
I2S_IRQHandler
FPU_IRQHandler
B .
ENDP
ALIGN
; User Initial Stack & Heap
IF :DEF:__MICROLIB
EXPORT __initial_sp
EXPORT __heap_base
EXPORT __heap_limit
ELSE
IMPORT __use_two_region_memory
EXPORT __user_initial_stackheap
__user_initial_stackheap PROC
LDR R0, = Heap_Mem
LDR R1, = (Stack_Mem + Stack_Size)
LDR R2, = (Heap_Mem + Heap_Size)
LDR R3, = Stack_Mem
BX LR
ENDP
ALIGN
ENDIF
END

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<component_viewer schemaVersion="0.1" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="Component_Viewer.xsd">
<component name="EventRecorderStub" version="1.0.0"/> <!--name and version of the component-->
<events>
</events>
</component_viewer>

View File

@@ -0,0 +1,75 @@
<html>
<body>
<pre>
<h1><EFBFBD>Vision Build Log</h1>
<h2>Tool Versions:</h2>
IDE-Version: <20><>Vision V5.26.2.0
Copyright (C) 2018 ARM Ltd and ARM Germany GmbH. All rights reserved.
License Information: sheldon dai, tencent, LIC=AK1CX-H5HPV-SGF7K-ZGDWF-QC6LB-GRJE8
Tool Versions:
Toolchain: MDK-ARM Professional Version: 5.26.2.0
Toolchain Path: C:\Keil_v5\ARM\ARMCC\Bin
C Compiler: Armcc.exe V5.06 update 6 (build 750)
Assembler: Armasm.exe V5.06 update 6 (build 750)
Linker/Locator: ArmLink.exe V5.06 update 6 (build 750)
Library Manager: ArmAr.exe V5.06 update 6 (build 750)
Hex Converter: FromElf.exe V5.06 update 6 (build 750)
CPU DLL: SARMCM3.DLL V5.26.2.0
Dialog DLL: DCM.DLL V1.17.2.0
Target DLL: STLink\ST-LINKIII-KEIL_SWO.dll V3.0.5.0
Dialog DLL: TCM.DLL V1.36.1.0
<h2>Project:</h2>
D:\github\ble_dev\TencentOS-tiny\board\Nordic_NRF52840\KEIL\nimble_gatt\TencentOS_tiny.uvprojx
Project File Date: 11/12/2019
<h2>Output:</h2>
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'TencentOS_tiny'
compiling main.c...
..\..\..\..\examples\nimble_gatt\main.c(97): warning: #177-D: variable "adv_params" was declared but never referenced
struct ble_gap_adv_params adv_params;
..\..\..\..\examples\nimble_gatt\main.c(165): warning: #167-D: argument of type "void (*)(void)" is incompatible with parameter of type "k_task_entry_t"
nimble_port_tencentos_tiny_init(nimble_port_run);
..\..\..\..\examples\nimble_gatt\main.c(206): warning: #223-D: function "board_init" declared implicitly
board_init();
..\..\..\..\examples\nimble_gatt\main.c(211): warning: #223-D: function "nimble_port_init" declared implicitly
nimble_port_init();
..\..\..\..\examples\nimble_gatt\main.c(218): warning: #167-D: argument of type "int (*)(void)" is incompatible with parameter of type "k_task_entry_t"
tos_task_create(&ble_boot_task, "boot", ble_boot, NULL,
..\..\..\..\examples\nimble_gatt\main.c(78): warning: #177-D: variable "gatt_svr_svc_rw_demo_uuid" was declared but never referenced
static const ble_uuid128_t gatt_svr_svc_rw_demo_uuid
..\..\..\..\examples\nimble_gatt\main.c(82): warning: #177-D: variable "svc_adv_uuids_128" was declared but never referenced
static ble_uuid128_t svc_adv_uuids_128[] =
..\..\..\..\examples\nimble_gatt\main.c: 7 warnings, 0 errors
compiling nimble_port_tencentos_tiny.c...
linking...
Program Size: Code=145348 RO-data=6336 RW-data=1040 ZI-data=45856
".\Objects\TencentOS_tiny.axf" - 0 Error(s), 7 Warning(s).
<h2>Software Packages used:</h2>
Package Vendor: ARM
http://www.keil.com/pack/ARM.CMSIS.5.6.0.pack
ARM.CMSIS.5.6.0
CMSIS (Cortex Microcontroller Software Interface Standard)
* Component: CORE Version: 5.3.0
Package Vendor: NordicSemiconductor
http://developer.nordicsemi.com/nRF5_SDK/pieces/nRF_DeviceFamilyPack/NordicSemiconductor.nRF_DeviceFamilyPack.8.24.1.pack
NordicSemiconductor.nRF_DeviceFamilyPack.8.24.1
Nordic Semiconductor nRF ARM devices Device Family Pack.
<h2>Collection of Component include folders:</h2>
.\RTE\_TencentOS_tiny
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\Core\Include
C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_DeviceFamilyPack\8.24.1\Device\Include
<h2>Collection of Component Files used:</h2>
* Component: ARM::CMSIS:CORE:5.3.0
Build Time Elapsed: 00:00:04
</pre>
</body>
</html>

View File

@@ -0,0 +1,20 @@
/*
* Auto generated Run-Time-Environment Component Configuration File
* *** Do not modify ! ***
*
* Project: 'TencentOS_tiny'
* Target: 'TencentOS_tiny'
*/
#ifndef RTE_COMPONENTS_H
#define RTE_COMPONENTS_H
/*
* Define the Device Header File:
*/
#define CMSIS_device_header "nrf.h"
#endif /* RTE_COMPONENTS_H */

File diff suppressed because one or more lines are too long

View File

@@ -152,25 +152,30 @@
<Bp>
<Number>0</Number>
<Type>0</Type>
<LineNumber>232</LineNumber>
<EnabledFlag>0</EnabledFlag>
<Address>14772</Address>
<LineNumber>269</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>15290</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\..\..\..\examples\blehr\main.c</Filename>
<Filename>..\..\..\..\examples\nimble_gatt\gatt_svr.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\TencentOS_tiny\../../../../examples/blehr/main.c\232</Expression>
<Expression>\\TencentOS_tiny\../../../../examples/nimble_gatt/gatt_svr.c\269</Expression>
</Bp>
</Breakpoint>
<WatchWindow1>
<Ww>
<count>0</count>
<WinNumber>1</WinNumber>
<ItemText>ev</ItemText>
<ItemText>res</ItemText>
</Ww>
<Ww>
<count>1</count>
<WinNumber>1</WinNumber>
<ItemText>tos_systick_get()</ItemText>
</Ww>
</WatchWindow1>
<MemoryWindow1>
@@ -723,7 +728,7 @@
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\examples\blehr\gatt_svr.c</PathWithFileName>
<PathWithFileName>..\..\..\..\examples\nimble_gatt\gatt_svr.c</PathWithFileName>
<FilenameWithoutPath>gatt_svr.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
@@ -735,7 +740,7 @@
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\examples\blehr\main.c</PathWithFileName>
<PathWithFileName>..\..\..\..\examples\nimble_gatt\main.c</PathWithFileName>
<FilenameWithoutPath>main.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,371 @@
; Copyright (c) 2009-2018 ARM Limited. All rights reserved.
;
; SPDX-License-Identifier: Apache-2.0
;
; Licensed under the Apache License, Version 2.0 (the License); you may
; not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an AS IS BASIS, WITHOUT
; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;
; NOTICE: This file has been modified by Nordic Semiconductor ASA.
IF :DEF: __STARTUP_CONFIG
#ifdef __STARTUP_CONFIG
#include "startup_config.h"
#ifndef __STARTUP_CONFIG_STACK_ALIGNEMENT
#define __STARTUP_CONFIG_STACK_ALIGNEMENT 3
#endif
#endif
ENDIF
IF :DEF: __STARTUP_CONFIG
Stack_Size EQU __STARTUP_CONFIG_STACK_SIZE
ELIF :DEF: __STACK_SIZE
Stack_Size EQU __STACK_SIZE
ELSE
Stack_Size EQU 8192
ENDIF
IF :DEF: __STARTUP_CONFIG
Stack_Align EQU __STARTUP_CONFIG_STACK_ALIGNEMENT
ELSE
Stack_Align EQU 3
ENDIF
AREA STACK, NOINIT, READWRITE, ALIGN=Stack_Align
Stack_Mem SPACE Stack_Size
__initial_sp
IF :DEF: __STARTUP_CONFIG
Heap_Size EQU __STARTUP_CONFIG_HEAP_SIZE
ELIF :DEF: __HEAP_SIZE
Heap_Size EQU __HEAP_SIZE
ELSE
Heap_Size EQU 8192
ENDIF
AREA HEAP, NOINIT, READWRITE, ALIGN=3
__heap_base
Heap_Mem SPACE Heap_Size
__heap_limit
PRESERVE8
THUMB
; Vector Table Mapped to Address 0 at Reset
AREA RESET, DATA, READONLY
EXPORT __Vectors
EXPORT __Vectors_End
EXPORT __Vectors_Size
__Vectors DCD __initial_sp ; Top of Stack
DCD Reset_Handler
DCD NMI_Handler
DCD HardFault_Handler
DCD MemoryManagement_Handler
DCD BusFault_Handler
DCD UsageFault_Handler
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD SVC_Handler
DCD DebugMon_Handler
DCD 0 ; Reserved
DCD PendSV_Handler
DCD SysTick_Handler
; External Interrupts
DCD POWER_CLOCK_IRQHandler
DCD RADIO_IRQHandler
DCD UARTE0_UART0_IRQHandler
DCD SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
DCD SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
DCD NFCT_IRQHandler
DCD GPIOTE_IRQHandler
DCD SAADC_IRQHandler
DCD TIMER0_IRQHandler
DCD TIMER1_IRQHandler
DCD TIMER2_IRQHandler
DCD RTC0_IRQHandler
DCD TEMP_IRQHandler
DCD RNG_IRQHandler
DCD ECB_IRQHandler
DCD CCM_AAR_IRQHandler
DCD WDT_IRQHandler
DCD RTC1_IRQHandler
DCD QDEC_IRQHandler
DCD COMP_LPCOMP_IRQHandler
DCD SWI0_EGU0_IRQHandler
DCD SWI1_EGU1_IRQHandler
DCD SWI2_EGU2_IRQHandler
DCD SWI3_EGU3_IRQHandler
DCD SWI4_EGU4_IRQHandler
DCD SWI5_EGU5_IRQHandler
DCD TIMER3_IRQHandler
DCD TIMER4_IRQHandler
DCD PWM0_IRQHandler
DCD PDM_IRQHandler
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD MWU_IRQHandler
DCD PWM1_IRQHandler
DCD PWM2_IRQHandler
DCD SPIM2_SPIS2_SPI2_IRQHandler
DCD RTC2_IRQHandler
DCD I2S_IRQHandler
DCD FPU_IRQHandler
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
__Vectors_End
__Vectors_Size EQU __Vectors_End - __Vectors
AREA |.text|, CODE, READONLY
; Reset Handler
Reset_Handler PROC
EXPORT Reset_Handler [WEAK]
IMPORT SystemInit
IMPORT __main
LDR R0, =SystemInit
BLX R0
LDR R0, =__main
BX R0
ENDP
; Dummy Exception Handlers (infinite loops which can be modified)
NMI_Handler PROC
EXPORT NMI_Handler [WEAK]
B .
ENDP
HardFault_Handler\
PROC
EXPORT HardFault_Handler [WEAK]
B .
ENDP
MemoryManagement_Handler\
PROC
EXPORT MemoryManagement_Handler [WEAK]
B .
ENDP
BusFault_Handler\
PROC
EXPORT BusFault_Handler [WEAK]
B .
ENDP
UsageFault_Handler\
PROC
EXPORT UsageFault_Handler [WEAK]
B .
ENDP
SVC_Handler PROC
EXPORT SVC_Handler [WEAK]
B .
ENDP
DebugMon_Handler\
PROC
EXPORT DebugMon_Handler [WEAK]
B .
ENDP
PendSV_Handler PROC
EXPORT PendSV_Handler [WEAK]
B .
ENDP
SysTick_Handler PROC
EXPORT SysTick_Handler [WEAK]
B .
ENDP
Default_Handler PROC
EXPORT POWER_CLOCK_IRQHandler [WEAK]
EXPORT RADIO_IRQHandler [WEAK]
EXPORT UARTE0_UART0_IRQHandler [WEAK]
EXPORT SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler [WEAK]
EXPORT SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler [WEAK]
EXPORT NFCT_IRQHandler [WEAK]
EXPORT GPIOTE_IRQHandler [WEAK]
EXPORT SAADC_IRQHandler [WEAK]
EXPORT TIMER0_IRQHandler [WEAK]
EXPORT TIMER1_IRQHandler [WEAK]
EXPORT TIMER2_IRQHandler [WEAK]
EXPORT RTC0_IRQHandler [WEAK]
EXPORT TEMP_IRQHandler [WEAK]
EXPORT RNG_IRQHandler [WEAK]
EXPORT ECB_IRQHandler [WEAK]
EXPORT CCM_AAR_IRQHandler [WEAK]
EXPORT WDT_IRQHandler [WEAK]
EXPORT RTC1_IRQHandler [WEAK]
EXPORT QDEC_IRQHandler [WEAK]
EXPORT COMP_LPCOMP_IRQHandler [WEAK]
EXPORT SWI0_EGU0_IRQHandler [WEAK]
EXPORT SWI1_EGU1_IRQHandler [WEAK]
EXPORT SWI2_EGU2_IRQHandler [WEAK]
EXPORT SWI3_EGU3_IRQHandler [WEAK]
EXPORT SWI4_EGU4_IRQHandler [WEAK]
EXPORT SWI5_EGU5_IRQHandler [WEAK]
EXPORT TIMER3_IRQHandler [WEAK]
EXPORT TIMER4_IRQHandler [WEAK]
EXPORT PWM0_IRQHandler [WEAK]
EXPORT PDM_IRQHandler [WEAK]
EXPORT MWU_IRQHandler [WEAK]
EXPORT PWM1_IRQHandler [WEAK]
EXPORT PWM2_IRQHandler [WEAK]
EXPORT SPIM2_SPIS2_SPI2_IRQHandler [WEAK]
EXPORT RTC2_IRQHandler [WEAK]
EXPORT I2S_IRQHandler [WEAK]
EXPORT FPU_IRQHandler [WEAK]
POWER_CLOCK_IRQHandler
RADIO_IRQHandler
UARTE0_UART0_IRQHandler
SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
NFCT_IRQHandler
GPIOTE_IRQHandler
SAADC_IRQHandler
TIMER0_IRQHandler
TIMER1_IRQHandler
TIMER2_IRQHandler
RTC0_IRQHandler
TEMP_IRQHandler
RNG_IRQHandler
ECB_IRQHandler
CCM_AAR_IRQHandler
WDT_IRQHandler
RTC1_IRQHandler
QDEC_IRQHandler
COMP_LPCOMP_IRQHandler
SWI0_EGU0_IRQHandler
SWI1_EGU1_IRQHandler
SWI2_EGU2_IRQHandler
SWI3_EGU3_IRQHandler
SWI4_EGU4_IRQHandler
SWI5_EGU5_IRQHandler
TIMER3_IRQHandler
TIMER4_IRQHandler
PWM0_IRQHandler
PDM_IRQHandler
MWU_IRQHandler
PWM1_IRQHandler
PWM2_IRQHandler
SPIM2_SPIS2_SPI2_IRQHandler
RTC2_IRQHandler
I2S_IRQHandler
FPU_IRQHandler
B .
ENDP
ALIGN
; User Initial Stack & Heap
IF :DEF:__MICROLIB
EXPORT __initial_sp
EXPORT __heap_base
EXPORT __heap_limit
ELSE
IMPORT __use_two_region_memory
EXPORT __user_initial_stackheap
__user_initial_stackheap PROC
LDR R0, = Heap_Mem
LDR R1, = (Stack_Mem + Stack_Size)
LDR R2, = (Heap_Mem + Heap_Size)
LDR R3, = Stack_Mem
BX LR
ENDP
ALIGN
ENDIF
END

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<component_viewer schemaVersion="0.1" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="Component_Viewer.xsd">
<component name="EventRecorderStub" version="1.0.0"/> <!--name and version of the component-->
<events>
</events>
</component_viewer>

View File

@@ -0,0 +1,76 @@
<html>
<body>
<pre>
<h1><EFBFBD>Vision Build Log</h1>
<h2>Tool Versions:</h2>
IDE-Version: <20><>Vision V5.26.2.0
Copyright (C) 2018 ARM Ltd and ARM Germany GmbH. All rights reserved.
License Information: sheldon dai, tencent, LIC=AK1CX-H5HPV-SGF7K-ZGDWF-QC6LB-GRJE8
Tool Versions:
Toolchain: MDK-ARM Professional Version: 5.26.2.0
Toolchain Path: C:\Keil_v5\ARM\ARMCC\Bin
C Compiler: Armcc.exe V5.06 update 6 (build 750)
Assembler: Armasm.exe V5.06 update 6 (build 750)
Linker/Locator: ArmLink.exe V5.06 update 6 (build 750)
Library Manager: ArmAr.exe V5.06 update 6 (build 750)
Hex Converter: FromElf.exe V5.06 update 6 (build 750)
CPU DLL: SARMCM3.DLL V5.26.2.0
Dialog DLL: DCM.DLL V1.17.2.0
Target DLL: STLink\ST-LINKIII-KEIL_SWO.dll V3.0.5.0
Dialog DLL: TCM.DLL V1.36.1.0
<h2>Project:</h2>
D:\github\ble_dev\TencentOS-tiny\board\Nordic_NRF52840\KEIL\nimble_heart_rate_sensor\TencentOS_tiny.uvprojx
Project File Date: 11/11/2019
<h2>Output:</h2>
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'TencentOS_tiny'
compiling main.c...
..\..\..\..\examples\nimble_heart_rate_sensor\main.c(152): warning: #231-D: declaration is not visible outside of function
blehr_tx_hrate(struct os_event *ev)
..\..\..\..\examples\nimble_heart_rate_sensor\main.c(258): warning: #223-D: function "nimble_port_get_dflt_eventq" declared implicitly
ble_npl_callout_init(&blehr_tx_timer, nimble_port_get_dflt_eventq(),
..\..\..\..\examples\nimble_heart_rate_sensor\main.c(258): warning: #167-D: argument of type "int" is incompatible with parameter of type "struct ble_npl_eventq *"
ble_npl_callout_init(&blehr_tx_timer, nimble_port_get_dflt_eventq(),
..\..\..\..\examples\nimble_heart_rate_sensor\main.c(259): warning: #167-D: argument of type "void (*)(struct os_event *)" is incompatible with parameter of type "ble_npl_event_fn *"
blehr_tx_hrate, NULL);
..\..\..\..\examples\nimble_heart_rate_sensor\main.c(271): warning: #167-D: argument of type "void (*)(void)" is incompatible with parameter of type "k_task_entry_t"
nimble_port_tencentos_tiny_init(nimble_port_run);
..\..\..\..\examples\nimble_heart_rate_sensor\main.c(281): warning: #223-D: function "board_init" declared implicitly
board_init();
..\..\..\..\examples\nimble_heart_rate_sensor\main.c(286): warning: #223-D: function "nimble_port_init" declared implicitly
nimble_port_init();
..\..\..\..\examples\nimble_heart_rate_sensor\main.c(288): warning: #167-D: argument of type "int (*)(void)" is incompatible with parameter of type "k_task_entry_t"
tos_task_create(&ble_boot_task, "boot", ble_boot, NULL,
..\..\..\..\examples\nimble_heart_rate_sensor\main.c: 8 warnings, 0 errors
linking...
Program Size: Code=144772 RO-data=6220 RW-data=1080 ZI-data=44296
".\Objects\TencentOS_tiny.axf" - 0 Error(s), 8 Warning(s).
<h2>Software Packages used:</h2>
Package Vendor: ARM
http://www.keil.com/pack/ARM.CMSIS.5.6.0.pack
ARM.CMSIS.5.6.0
CMSIS (Cortex Microcontroller Software Interface Standard)
* Component: CORE Version: 5.3.0
Package Vendor: NordicSemiconductor
http://developer.nordicsemi.com/nRF5_SDK/pieces/nRF_DeviceFamilyPack/NordicSemiconductor.nRF_DeviceFamilyPack.8.24.1.pack
NordicSemiconductor.nRF_DeviceFamilyPack.8.24.1
Nordic Semiconductor nRF ARM devices Device Family Pack.
<h2>Collection of Component include folders:</h2>
.\RTE\_TencentOS_tiny
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\Core\Include
C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_DeviceFamilyPack\8.24.1\Device\Include
<h2>Collection of Component Files used:</h2>
* Component: ARM::CMSIS:CORE:5.3.0
Build Time Elapsed: 00:00:02
</pre>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,16 @@
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
LR_IROM1 0x00000000 0x00100000 { ; load region size_region
ER_IROM1 0x00000000 0x00100000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
.ANY (+XO)
}
RW_IRAM1 0x20000000 0x00040000 { ; RW data
.ANY (+RW +ZI)
}
}

View File

@@ -0,0 +1,20 @@
/*
* Auto generated Run-Time-Environment Component Configuration File
* *** Do not modify ! ***
*
* Project: 'TencentOS_tiny'
* Target: 'TencentOS_tiny'
*/
#ifndef RTE_COMPONENTS_H
#define RTE_COMPONENTS_H
/*
* Define the Device Header File:
*/
#define CMSIS_device_header "nrf.h"
#endif /* RTE_COMPONENTS_H */

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,371 @@
; Copyright (c) 2009-2018 ARM Limited. All rights reserved.
;
; SPDX-License-Identifier: Apache-2.0
;
; Licensed under the Apache License, Version 2.0 (the License); you may
; not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an AS IS BASIS, WITHOUT
; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;
; NOTICE: This file has been modified by Nordic Semiconductor ASA.
IF :DEF: __STARTUP_CONFIG
#ifdef __STARTUP_CONFIG
#include "startup_config.h"
#ifndef __STARTUP_CONFIG_STACK_ALIGNEMENT
#define __STARTUP_CONFIG_STACK_ALIGNEMENT 3
#endif
#endif
ENDIF
IF :DEF: __STARTUP_CONFIG
Stack_Size EQU __STARTUP_CONFIG_STACK_SIZE
ELIF :DEF: __STACK_SIZE
Stack_Size EQU __STACK_SIZE
ELSE
Stack_Size EQU 8192
ENDIF
IF :DEF: __STARTUP_CONFIG
Stack_Align EQU __STARTUP_CONFIG_STACK_ALIGNEMENT
ELSE
Stack_Align EQU 3
ENDIF
AREA STACK, NOINIT, READWRITE, ALIGN=Stack_Align
Stack_Mem SPACE Stack_Size
__initial_sp
IF :DEF: __STARTUP_CONFIG
Heap_Size EQU __STARTUP_CONFIG_HEAP_SIZE
ELIF :DEF: __HEAP_SIZE
Heap_Size EQU __HEAP_SIZE
ELSE
Heap_Size EQU 8192
ENDIF
AREA HEAP, NOINIT, READWRITE, ALIGN=3
__heap_base
Heap_Mem SPACE Heap_Size
__heap_limit
PRESERVE8
THUMB
; Vector Table Mapped to Address 0 at Reset
AREA RESET, DATA, READONLY
EXPORT __Vectors
EXPORT __Vectors_End
EXPORT __Vectors_Size
__Vectors DCD __initial_sp ; Top of Stack
DCD Reset_Handler
DCD NMI_Handler
DCD HardFault_Handler
DCD MemoryManagement_Handler
DCD BusFault_Handler
DCD UsageFault_Handler
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD SVC_Handler
DCD DebugMon_Handler
DCD 0 ; Reserved
DCD PendSV_Handler
DCD SysTick_Handler
; External Interrupts
DCD POWER_CLOCK_IRQHandler
DCD RADIO_IRQHandler
DCD UARTE0_UART0_IRQHandler
DCD SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
DCD SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
DCD NFCT_IRQHandler
DCD GPIOTE_IRQHandler
DCD SAADC_IRQHandler
DCD TIMER0_IRQHandler
DCD TIMER1_IRQHandler
DCD TIMER2_IRQHandler
DCD RTC0_IRQHandler
DCD TEMP_IRQHandler
DCD RNG_IRQHandler
DCD ECB_IRQHandler
DCD CCM_AAR_IRQHandler
DCD WDT_IRQHandler
DCD RTC1_IRQHandler
DCD QDEC_IRQHandler
DCD COMP_LPCOMP_IRQHandler
DCD SWI0_EGU0_IRQHandler
DCD SWI1_EGU1_IRQHandler
DCD SWI2_EGU2_IRQHandler
DCD SWI3_EGU3_IRQHandler
DCD SWI4_EGU4_IRQHandler
DCD SWI5_EGU5_IRQHandler
DCD TIMER3_IRQHandler
DCD TIMER4_IRQHandler
DCD PWM0_IRQHandler
DCD PDM_IRQHandler
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD MWU_IRQHandler
DCD PWM1_IRQHandler
DCD PWM2_IRQHandler
DCD SPIM2_SPIS2_SPI2_IRQHandler
DCD RTC2_IRQHandler
DCD I2S_IRQHandler
DCD FPU_IRQHandler
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
__Vectors_End
__Vectors_Size EQU __Vectors_End - __Vectors
AREA |.text|, CODE, READONLY
; Reset Handler
Reset_Handler PROC
EXPORT Reset_Handler [WEAK]
IMPORT SystemInit
IMPORT __main
LDR R0, =SystemInit
BLX R0
LDR R0, =__main
BX R0
ENDP
; Dummy Exception Handlers (infinite loops which can be modified)
NMI_Handler PROC
EXPORT NMI_Handler [WEAK]
B .
ENDP
HardFault_Handler\
PROC
EXPORT HardFault_Handler [WEAK]
B .
ENDP
MemoryManagement_Handler\
PROC
EXPORT MemoryManagement_Handler [WEAK]
B .
ENDP
BusFault_Handler\
PROC
EXPORT BusFault_Handler [WEAK]
B .
ENDP
UsageFault_Handler\
PROC
EXPORT UsageFault_Handler [WEAK]
B .
ENDP
SVC_Handler PROC
EXPORT SVC_Handler [WEAK]
B .
ENDP
DebugMon_Handler\
PROC
EXPORT DebugMon_Handler [WEAK]
B .
ENDP
PendSV_Handler PROC
EXPORT PendSV_Handler [WEAK]
B .
ENDP
SysTick_Handler PROC
EXPORT SysTick_Handler [WEAK]
B .
ENDP
Default_Handler PROC
EXPORT POWER_CLOCK_IRQHandler [WEAK]
EXPORT RADIO_IRQHandler [WEAK]
EXPORT UARTE0_UART0_IRQHandler [WEAK]
EXPORT SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler [WEAK]
EXPORT SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler [WEAK]
EXPORT NFCT_IRQHandler [WEAK]
EXPORT GPIOTE_IRQHandler [WEAK]
EXPORT SAADC_IRQHandler [WEAK]
EXPORT TIMER0_IRQHandler [WEAK]
EXPORT TIMER1_IRQHandler [WEAK]
EXPORT TIMER2_IRQHandler [WEAK]
EXPORT RTC0_IRQHandler [WEAK]
EXPORT TEMP_IRQHandler [WEAK]
EXPORT RNG_IRQHandler [WEAK]
EXPORT ECB_IRQHandler [WEAK]
EXPORT CCM_AAR_IRQHandler [WEAK]
EXPORT WDT_IRQHandler [WEAK]
EXPORT RTC1_IRQHandler [WEAK]
EXPORT QDEC_IRQHandler [WEAK]
EXPORT COMP_LPCOMP_IRQHandler [WEAK]
EXPORT SWI0_EGU0_IRQHandler [WEAK]
EXPORT SWI1_EGU1_IRQHandler [WEAK]
EXPORT SWI2_EGU2_IRQHandler [WEAK]
EXPORT SWI3_EGU3_IRQHandler [WEAK]
EXPORT SWI4_EGU4_IRQHandler [WEAK]
EXPORT SWI5_EGU5_IRQHandler [WEAK]
EXPORT TIMER3_IRQHandler [WEAK]
EXPORT TIMER4_IRQHandler [WEAK]
EXPORT PWM0_IRQHandler [WEAK]
EXPORT PDM_IRQHandler [WEAK]
EXPORT MWU_IRQHandler [WEAK]
EXPORT PWM1_IRQHandler [WEAK]
EXPORT PWM2_IRQHandler [WEAK]
EXPORT SPIM2_SPIS2_SPI2_IRQHandler [WEAK]
EXPORT RTC2_IRQHandler [WEAK]
EXPORT I2S_IRQHandler [WEAK]
EXPORT FPU_IRQHandler [WEAK]
POWER_CLOCK_IRQHandler
RADIO_IRQHandler
UARTE0_UART0_IRQHandler
SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
NFCT_IRQHandler
GPIOTE_IRQHandler
SAADC_IRQHandler
TIMER0_IRQHandler
TIMER1_IRQHandler
TIMER2_IRQHandler
RTC0_IRQHandler
TEMP_IRQHandler
RNG_IRQHandler
ECB_IRQHandler
CCM_AAR_IRQHandler
WDT_IRQHandler
RTC1_IRQHandler
QDEC_IRQHandler
COMP_LPCOMP_IRQHandler
SWI0_EGU0_IRQHandler
SWI1_EGU1_IRQHandler
SWI2_EGU2_IRQHandler
SWI3_EGU3_IRQHandler
SWI4_EGU4_IRQHandler
SWI5_EGU5_IRQHandler
TIMER3_IRQHandler
TIMER4_IRQHandler
PWM0_IRQHandler
PDM_IRQHandler
MWU_IRQHandler
PWM1_IRQHandler
PWM2_IRQHandler
SPIM2_SPIS2_SPI2_IRQHandler
RTC2_IRQHandler
I2S_IRQHandler
FPU_IRQHandler
B .
ENDP
ALIGN
; User Initial Stack & Heap
IF :DEF:__MICROLIB
EXPORT __initial_sp
EXPORT __heap_base
EXPORT __heap_limit
ELSE
IMPORT __use_two_region_memory
EXPORT __user_initial_stackheap
__user_initial_stackheap PROC
LDR R0, = Heap_Mem
LDR R1, = (Stack_Mem + Stack_Size)
LDR R2, = (Heap_Mem + Heap_Size)
LDR R3, = Stack_Mem
BX LR
ENDP
ALIGN
ENDIF
END

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<component_viewer schemaVersion="0.1" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="Component_Viewer.xsd">
<component name="EventRecorderStub" version="1.0.0"/> <!--name and version of the component-->
<events>
</events>
</component_viewer>

View File

@@ -0,0 +1,76 @@
<html>
<body>
<pre>
<h1><EFBFBD>Vision Build Log</h1>
<h2>Tool Versions:</h2>
IDE-Version: <20><>Vision V5.26.2.0
Copyright (C) 2018 ARM Ltd and ARM Germany GmbH. All rights reserved.
License Information: sheldon dai, tencent, LIC=AK1CX-H5HPV-SGF7K-ZGDWF-QC6LB-GRJE8
Tool Versions:
Toolchain: MDK-ARM Professional Version: 5.26.2.0
Toolchain Path: C:\Keil_v5\ARM\ARMCC\Bin
C Compiler: Armcc.exe V5.06 update 6 (build 750)
Assembler: Armasm.exe V5.06 update 6 (build 750)
Linker/Locator: ArmLink.exe V5.06 update 6 (build 750)
Library Manager: ArmAr.exe V5.06 update 6 (build 750)
Hex Converter: FromElf.exe V5.06 update 6 (build 750)
CPU DLL: SARMCM3.DLL V5.26.2.0
Dialog DLL: DCM.DLL V1.17.2.0
Target DLL: STLink\ST-LINKIII-KEIL_SWO.dll V3.0.5.0
Dialog DLL: TCM.DLL V1.36.1.0
<h2>Project:</h2>
D:\github\ble_dev\TencentOS-tiny\board\Nordic_NRF52840\KEIL\nimble_scanner\TencentOS_tiny.uvprojx
Project File Date: 11/11/2019
<h2>Output:</h2>
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'TencentOS_tiny'
compiling main.c...
..\..\..\..\examples\nimble_scanner\main.c(148): warning: #167-D: argument of type "ble_addr_t **" is incompatible with parameter of type "const ble_addr_t *"
if (ble_addr_cmp(&addr, &iter->addr) == 0) {
..\..\..\..\examples\nimble_scanner\main.c(161): warning: #167-D: argument of type "const ble_addr_t *" is incompatible with parameter of type "ble_addr_t *"
if (nimble_scan_item_is_exist(disc_addr)) {
..\..\..\..\examples\nimble_scanner\main.c(158): warning: #177-D: variable "i" was declared but never referenced
int i = 0;
..\..\..\..\examples\nimble_scanner\main.c(255): warning: #167-D: argument of type "void (*)(void)" is incompatible with parameter of type "k_task_entry_t"
nimble_port_tencentos_tiny_init(nimble_port_run);
..\..\..\..\examples\nimble_scanner\main.c(262): warning: #223-D: function "ble_hs_util_ensure_addr" declared implicitly
rc = ble_hs_util_ensure_addr(0);
..\..\..\..\examples\nimble_scanner\main.c(299): warning: #223-D: function "board_init" declared implicitly
board_init();
..\..\..\..\examples\nimble_scanner\main.c(304): warning: #223-D: function "nimble_port_init" declared implicitly
nimble_port_init();
..\..\..\..\examples\nimble_scanner\main.c(311): warning: #167-D: argument of type "int (*)(void)" is incompatible with parameter of type "k_task_entry_t"
tos_task_create(&ble_boot_task, "ble_boot", ble_boot, NULL,
..\..\..\..\examples\nimble_scanner\main.c: 8 warnings, 0 errors
linking...
Program Size: Code=143784 RO-data=5928 RW-data=636 ZI-data=56164
".\Objects\TencentOS_tiny.axf" - 0 Error(s), 8 Warning(s).
<h2>Software Packages used:</h2>
Package Vendor: ARM
http://www.keil.com/pack/ARM.CMSIS.5.6.0.pack
ARM.CMSIS.5.6.0
CMSIS (Cortex Microcontroller Software Interface Standard)
* Component: CORE Version: 5.3.0
Package Vendor: NordicSemiconductor
http://developer.nordicsemi.com/nRF5_SDK/pieces/nRF_DeviceFamilyPack/NordicSemiconductor.nRF_DeviceFamilyPack.8.24.1.pack
NordicSemiconductor.nRF_DeviceFamilyPack.8.24.1
Nordic Semiconductor nRF ARM devices Device Family Pack.
<h2>Collection of Component include folders:</h2>
.\RTE\_TencentOS_tiny
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\Core\Include
C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_DeviceFamilyPack\8.24.1\Device\Include
<h2>Collection of Component Files used:</h2>
* Component: ARM::CMSIS:CORE:5.3.0
Build Time Elapsed: 00:00:03
</pre>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,16 @@
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
LR_IROM1 0x00000000 0x00100000 { ; load region size_region
ER_IROM1 0x00000000 0x00100000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
.ANY (+XO)
}
RW_IRAM1 0x20000000 0x00040000 { ; RW data
.ANY (+RW +ZI)
}
}

View File

@@ -0,0 +1,20 @@
/*
* Auto generated Run-Time-Environment Component Configuration File
* *** Do not modify ! ***
*
* Project: 'TencentOS_tiny'
* Target: 'TencentOS_tiny'
*/
#ifndef RTE_COMPONENTS_H
#define RTE_COMPONENTS_H
/*
* Define the Device Header File:
*/
#define CMSIS_device_header "nrf.h"
#endif /* RTE_COMPONENTS_H */

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -338,7 +338,7 @@
<MiscControls>--reduce_paths --gnu</MiscControls>
<Define>NRF52,NRF52840_XXAA,NIMBLE_CFG_CONTROLLER=1,CONFIG_GPIO_AS_PINRESET,RETARGET_ENABLED</Define>
<Undefine></Undefine>
<IncludePath>..\..\BSP\Inc;..\..\..\..\arch\arm\arm-v7m\common\include;..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc;..\..\..\..\kernel\core\include;..\..\..\..\kernel\pm\include;..\..\..\..\osal\cmsis_os;..\..\TOS_CONFIG;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\ext\tinycrypt\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\controller\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\drivers\nrf52\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\transport\ram\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\lls\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\ans\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\bas\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\bleuart\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\gap\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\ias\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\lls\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\tps\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\gatt\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\store\ram\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\util\include;..\..\..\..\components\connectivity\Bluetooth_5.0\porting\TencentOS_tiny\include\nrf52840;..\..\..\..\components\connectivity\Bluetooth_5.0\porting\TencentOS_tiny\include;..\..\..\..\platform\vendor_bsp\nordic\nRF5_SDK_15.3.0\modules\nrfx;..\..\BSP\Src</IncludePath>
<IncludePath>..\..\BSP\Inc;..\..\..\..\arch\arm\arm-v7m\common\include;..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc;..\..\..\..\kernel\core\include;..\..\..\..\kernel\pm\include;..\..\..\..\osal\cmsis_os;..\..\TOS_CONFIG;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\porting\nimble\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\ext\tinycrypt\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\controller\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\drivers\nrf52\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\transport\ram\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\lls\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\ans\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\bas\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\bleuart\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\gap\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\ias\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\lls\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\tps\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\gatt\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\store\ram\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\util\include;..\..\..\..\components\connectivity\Bluetooth_5.0\porting\TencentOS_tiny\include\nrf52840;..\..\..\..\components\connectivity\Bluetooth_5.0\porting\TencentOS_tiny\include;..\..\..\..\platform\vendor_bsp\nordic\nRF5_SDK_15.3.0\modules\nrfx;..\..\BSP\Src;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\dis\include;..\..\..\..\components\connectivity\Bluetooth_5.0\3rdparty\NimBLE_1_2_0\nimble\host\services\bas\include</IncludePath>
</VariousControls>
</Cads>
<Aads>
@@ -592,15 +592,10 @@
<Group>
<GroupName>example</GroupName>
<Files>
<File>
<FileName>gatt_svr.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\examples\blehr\gatt_svr.c</FilePath>
</File>
<File>
<FileName>main.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\examples\blehr\main.c</FilePath>
<FilePath>..\..\..\..\examples\nimble_scanner\main.c</FilePath>
</File>
</Files>
</Group>

View File

@@ -0,0 +1,371 @@
; Copyright (c) 2009-2018 ARM Limited. All rights reserved.
;
; SPDX-License-Identifier: Apache-2.0
;
; Licensed under the Apache License, Version 2.0 (the License); you may
; not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an AS IS BASIS, WITHOUT
; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;
; NOTICE: This file has been modified by Nordic Semiconductor ASA.
IF :DEF: __STARTUP_CONFIG
#ifdef __STARTUP_CONFIG
#include "startup_config.h"
#ifndef __STARTUP_CONFIG_STACK_ALIGNEMENT
#define __STARTUP_CONFIG_STACK_ALIGNEMENT 3
#endif
#endif
ENDIF
IF :DEF: __STARTUP_CONFIG
Stack_Size EQU __STARTUP_CONFIG_STACK_SIZE
ELIF :DEF: __STACK_SIZE
Stack_Size EQU __STACK_SIZE
ELSE
Stack_Size EQU 8192
ENDIF
IF :DEF: __STARTUP_CONFIG
Stack_Align EQU __STARTUP_CONFIG_STACK_ALIGNEMENT
ELSE
Stack_Align EQU 3
ENDIF
AREA STACK, NOINIT, READWRITE, ALIGN=Stack_Align
Stack_Mem SPACE Stack_Size
__initial_sp
IF :DEF: __STARTUP_CONFIG
Heap_Size EQU __STARTUP_CONFIG_HEAP_SIZE
ELIF :DEF: __HEAP_SIZE
Heap_Size EQU __HEAP_SIZE
ELSE
Heap_Size EQU 8192
ENDIF
AREA HEAP, NOINIT, READWRITE, ALIGN=3
__heap_base
Heap_Mem SPACE Heap_Size
__heap_limit
PRESERVE8
THUMB
; Vector Table Mapped to Address 0 at Reset
AREA RESET, DATA, READONLY
EXPORT __Vectors
EXPORT __Vectors_End
EXPORT __Vectors_Size
__Vectors DCD __initial_sp ; Top of Stack
DCD Reset_Handler
DCD NMI_Handler
DCD HardFault_Handler
DCD MemoryManagement_Handler
DCD BusFault_Handler
DCD UsageFault_Handler
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD SVC_Handler
DCD DebugMon_Handler
DCD 0 ; Reserved
DCD PendSV_Handler
DCD SysTick_Handler
; External Interrupts
DCD POWER_CLOCK_IRQHandler
DCD RADIO_IRQHandler
DCD UARTE0_UART0_IRQHandler
DCD SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
DCD SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
DCD NFCT_IRQHandler
DCD GPIOTE_IRQHandler
DCD SAADC_IRQHandler
DCD TIMER0_IRQHandler
DCD TIMER1_IRQHandler
DCD TIMER2_IRQHandler
DCD RTC0_IRQHandler
DCD TEMP_IRQHandler
DCD RNG_IRQHandler
DCD ECB_IRQHandler
DCD CCM_AAR_IRQHandler
DCD WDT_IRQHandler
DCD RTC1_IRQHandler
DCD QDEC_IRQHandler
DCD COMP_LPCOMP_IRQHandler
DCD SWI0_EGU0_IRQHandler
DCD SWI1_EGU1_IRQHandler
DCD SWI2_EGU2_IRQHandler
DCD SWI3_EGU3_IRQHandler
DCD SWI4_EGU4_IRQHandler
DCD SWI5_EGU5_IRQHandler
DCD TIMER3_IRQHandler
DCD TIMER4_IRQHandler
DCD PWM0_IRQHandler
DCD PDM_IRQHandler
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD MWU_IRQHandler
DCD PWM1_IRQHandler
DCD PWM2_IRQHandler
DCD SPIM2_SPIS2_SPI2_IRQHandler
DCD RTC2_IRQHandler
DCD I2S_IRQHandler
DCD FPU_IRQHandler
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
__Vectors_End
__Vectors_Size EQU __Vectors_End - __Vectors
AREA |.text|, CODE, READONLY
; Reset Handler
Reset_Handler PROC
EXPORT Reset_Handler [WEAK]
IMPORT SystemInit
IMPORT __main
LDR R0, =SystemInit
BLX R0
LDR R0, =__main
BX R0
ENDP
; Dummy Exception Handlers (infinite loops which can be modified)
NMI_Handler PROC
EXPORT NMI_Handler [WEAK]
B .
ENDP
HardFault_Handler\
PROC
EXPORT HardFault_Handler [WEAK]
B .
ENDP
MemoryManagement_Handler\
PROC
EXPORT MemoryManagement_Handler [WEAK]
B .
ENDP
BusFault_Handler\
PROC
EXPORT BusFault_Handler [WEAK]
B .
ENDP
UsageFault_Handler\
PROC
EXPORT UsageFault_Handler [WEAK]
B .
ENDP
SVC_Handler PROC
EXPORT SVC_Handler [WEAK]
B .
ENDP
DebugMon_Handler\
PROC
EXPORT DebugMon_Handler [WEAK]
B .
ENDP
PendSV_Handler PROC
EXPORT PendSV_Handler [WEAK]
B .
ENDP
SysTick_Handler PROC
EXPORT SysTick_Handler [WEAK]
B .
ENDP
Default_Handler PROC
EXPORT POWER_CLOCK_IRQHandler [WEAK]
EXPORT RADIO_IRQHandler [WEAK]
EXPORT UARTE0_UART0_IRQHandler [WEAK]
EXPORT SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler [WEAK]
EXPORT SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler [WEAK]
EXPORT NFCT_IRQHandler [WEAK]
EXPORT GPIOTE_IRQHandler [WEAK]
EXPORT SAADC_IRQHandler [WEAK]
EXPORT TIMER0_IRQHandler [WEAK]
EXPORT TIMER1_IRQHandler [WEAK]
EXPORT TIMER2_IRQHandler [WEAK]
EXPORT RTC0_IRQHandler [WEAK]
EXPORT TEMP_IRQHandler [WEAK]
EXPORT RNG_IRQHandler [WEAK]
EXPORT ECB_IRQHandler [WEAK]
EXPORT CCM_AAR_IRQHandler [WEAK]
EXPORT WDT_IRQHandler [WEAK]
EXPORT RTC1_IRQHandler [WEAK]
EXPORT QDEC_IRQHandler [WEAK]
EXPORT COMP_LPCOMP_IRQHandler [WEAK]
EXPORT SWI0_EGU0_IRQHandler [WEAK]
EXPORT SWI1_EGU1_IRQHandler [WEAK]
EXPORT SWI2_EGU2_IRQHandler [WEAK]
EXPORT SWI3_EGU3_IRQHandler [WEAK]
EXPORT SWI4_EGU4_IRQHandler [WEAK]
EXPORT SWI5_EGU5_IRQHandler [WEAK]
EXPORT TIMER3_IRQHandler [WEAK]
EXPORT TIMER4_IRQHandler [WEAK]
EXPORT PWM0_IRQHandler [WEAK]
EXPORT PDM_IRQHandler [WEAK]
EXPORT MWU_IRQHandler [WEAK]
EXPORT PWM1_IRQHandler [WEAK]
EXPORT PWM2_IRQHandler [WEAK]
EXPORT SPIM2_SPIS2_SPI2_IRQHandler [WEAK]
EXPORT RTC2_IRQHandler [WEAK]
EXPORT I2S_IRQHandler [WEAK]
EXPORT FPU_IRQHandler [WEAK]
POWER_CLOCK_IRQHandler
RADIO_IRQHandler
UARTE0_UART0_IRQHandler
SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
NFCT_IRQHandler
GPIOTE_IRQHandler
SAADC_IRQHandler
TIMER0_IRQHandler
TIMER1_IRQHandler
TIMER2_IRQHandler
RTC0_IRQHandler
TEMP_IRQHandler
RNG_IRQHandler
ECB_IRQHandler
CCM_AAR_IRQHandler
WDT_IRQHandler
RTC1_IRQHandler
QDEC_IRQHandler
COMP_LPCOMP_IRQHandler
SWI0_EGU0_IRQHandler
SWI1_EGU1_IRQHandler
SWI2_EGU2_IRQHandler
SWI3_EGU3_IRQHandler
SWI4_EGU4_IRQHandler
SWI5_EGU5_IRQHandler
TIMER3_IRQHandler
TIMER4_IRQHandler
PWM0_IRQHandler
PDM_IRQHandler
MWU_IRQHandler
PWM1_IRQHandler
PWM2_IRQHandler
SPIM2_SPIS2_SPI2_IRQHandler
RTC2_IRQHandler
I2S_IRQHandler
FPU_IRQHandler
B .
ENDP
ALIGN
; User Initial Stack & Heap
IF :DEF:__MICROLIB
EXPORT __initial_sp
EXPORT __heap_base
EXPORT __heap_limit
ELSE
IMPORT __use_two_region_memory
EXPORT __user_initial_stackheap
__user_initial_stackheap PROC
LDR R0, = Heap_Mem
LDR R1, = (Stack_Mem + Stack_Size)
LDR R2, = (Heap_Mem + Heap_Size)
LDR R3, = Stack_Mem
BX LR
ENDP
ALIGN
ENDIF
END

View File

@@ -39,8 +39,8 @@ extern "C" {
#define BLE_NPL_TIME_FOREVER TOS_TIME_FOREVER
/* This should be compatible with k_tick_t */
typedef uint32_t ble_npl_time_t;
typedef int32_t ble_npl_stime_t;
typedef uint64_t ble_npl_time_t;
typedef int64_t ble_npl_stime_t;
extern volatile int ble_npl_in_critical;

View File

@@ -35,6 +35,11 @@
#define MYNEWT_VAL_OS_CPUTIME_TIMER_NUM (5)
#endif
/*** sys/log/stub */
#ifndef MYNEWT_VAL_LOG_LEVEL
#define MYNEWT_VAL_LOG_LEVEL (10)
#endif
/*** crypto/tinycrypt */
#ifndef MYNEWT_VAL_TINYCRYPT_UECC_RNG_TRNG_DEV_NAME
#define MYNEWT_VAL_TINYCRYPT_UECC_RNG_TRNG_DEV_NAME ("trng")

View File

@@ -35,6 +35,11 @@
#define MYNEWT_VAL_OS_CPUTIME_TIMER_NUM (5)
#endif
/*** sys/log/stub */
#ifndef MYNEWT_VAL_LOG_LEVEL
#define MYNEWT_VAL_LOG_LEVEL (10)
#endif
/*** crypto/tinycrypt */
#ifndef MYNEWT_VAL_TINYCRYPT_UECC_RNG_TRNG_DEV_NAME
#define MYNEWT_VAL_TINYCRYPT_UECC_RNG_TRNG_DEV_NAME ("trng")

View File

@@ -35,6 +35,11 @@
#define MYNEWT_VAL_OS_CPUTIME_TIMER_NUM (5)
#endif
/*** sys/log/stub */
#ifndef MYNEWT_VAL_LOG_LEVEL
#define MYNEWT_VAL_LOG_LEVEL (10)
#endif
/*** crypto/tinycrypt */
#ifndef MYNEWT_VAL_TINYCRYPT_UECC_RNG_TRNG_DEV_NAME
#define MYNEWT_VAL_TINYCRYPT_UECC_RNG_TRNG_DEV_NAME ("trng")

View File

@@ -69,7 +69,5 @@ nimble_port_tencentos_tiny_init(k_task_entry_t host_task_fn)
if (err != K_ERR_NONE) {
return;
}
tos_knl_start();
}

View File

@@ -0,0 +1,40 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#ifndef H_BLEHR_SENSOR_
#define H_BLEHR_SENSOR_
#include "nimble/ble.h"
#include "modlog/modlog.h"
#ifdef __cplusplus
extern "C" {
#endif
#define GATT_DEVICE_INFO_UUID 0x180A
#define GATT_MANUFACTURER_NAME_UUID 0x2A29
#define GATT_MODEL_NUMBER_UUID 0x2A24
int gatt_svr_init(void);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,280 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include "host/ble_hs.h"
#include "host/ble_uuid.h"
#include "blehr_sens.h"
#include "services/dis/ble_svc_dis.h"
#include "services/bas/ble_svc_bas.h"
/* UUID = 1bce38b3-d137-48ff-a13e-033e14c7a335 */
static const ble_uuid128_t gatt_svr_svc_rw_demo_uuid
= BLE_UUID128_INIT(0x35, 0xa3, 0xc7, 0x14, 0x3e, 0x03, 0x3e, 0xa1, 0xff,
0x48, 0x37, 0xd1, 0xb3, 0x38, 0xce, 0x1b);
/* UUID = 35f28386-3070-4f3b-ba38-27507e991762 */
static const ble_uuid128_t gatt_svr_chr_rw_demo_write_uuid
= BLE_UUID128_INIT(0x62, 0x17, 0x99, 0x7e, 0x50, 0x27, 0x38, 0xba, 0x3b,
0x4f, 0x70, 0x30, 0x86, 0x83, 0xf2, 0x35);
/* UUID = ccdd113f-40d5-4d68-86ac-a728dd82f4aa */
static const ble_uuid128_t gatt_svr_chr_rw_demo_readonly_uuid
= BLE_UUID128_INIT(0xaa, 0xf4, 0x82, 0xdd, 0x28, 0xa7, 0xac, 0x86, 0x68,
0x4d, 0xd5, 0x40, 0x3f, 0x11, 0xdd, 0xcc);
#define REPLY_BUFFER_SIZE 100
static char reply[REPLY_BUFFER_SIZE];
static char rm_demo_write_data[64] = "This characteristic is readable and writeable!";
static int gatt_svr_chr_access_device_info_manufacturer(
uint16_t conn_handle, uint16_t attr_handle,
struct ble_gatt_access_ctxt *ctxt, void *arg);
static int gatt_svr_chr_access_device_info_model(
uint16_t conn_handle, uint16_t attr_handle,
struct ble_gatt_access_ctxt *ctxt, void *arg);
static int gatt_svr_chr_access_rw_demo(
uint16_t conn_handle, uint16_t attr_handle,
struct ble_gatt_access_ctxt *ctxt, void *arg);
/* define several bluetooth services for our device */
static const struct ble_gatt_svc_def gatt_svr_svcs[] = {
/*
* access_cb defines a callback for read and write access events on
* given characteristics
*/
{
/* Service: Device Information */
.type = BLE_GATT_SVC_TYPE_PRIMARY,
.uuid = BLE_UUID16_DECLARE(GATT_DEVICE_INFO_UUID),
.characteristics = (struct ble_gatt_chr_def[]) { {
/* Characteristic: * Manufacturer name */
.uuid = BLE_UUID16_DECLARE(GATT_MANUFACTURER_NAME_UUID),
.access_cb = gatt_svr_chr_access_device_info_manufacturer,
.flags = BLE_GATT_CHR_F_READ,
}, {
/* Characteristic: Model number string */
.uuid = BLE_UUID16_DECLARE(GATT_MODEL_NUMBER_UUID),
.access_cb = gatt_svr_chr_access_device_info_model,
.flags = BLE_GATT_CHR_F_READ,
}, {
0, /* No more characteristics in this service */
}, }
},
{
/* Service: Read/Write Demo */
.type = BLE_GATT_SVC_TYPE_PRIMARY,
.uuid = (ble_uuid_t*) &gatt_svr_svc_rw_demo_uuid.u,
.characteristics = (struct ble_gatt_chr_def[]) { {
/* Characteristic: Read/Write Demo write */
.uuid = (ble_uuid_t*) &gatt_svr_chr_rw_demo_write_uuid.u,
.access_cb = gatt_svr_chr_access_rw_demo,
.flags = BLE_GATT_CHR_F_READ | BLE_GATT_CHR_F_WRITE,
}, {
/* Characteristic: Read/Write Demo read only */
.uuid = (ble_uuid_t*) &gatt_svr_chr_rw_demo_readonly_uuid.u,
.access_cb = gatt_svr_chr_access_rw_demo,
.flags = BLE_GATT_CHR_F_READ,
}, {
0, /* No more characteristics in this service */
}, }
},
{
0, /* No more services */
},
};
static int gatt_svr_chr_access_device_info_manufacturer(
uint16_t conn_handle, uint16_t attr_handle,
struct ble_gatt_access_ctxt *ctxt, void *arg)
{
printf("service 'device info: manufacturer' callback triggered\n");
snprintf(reply, REPLY_BUFFER_SIZE, "This is TencentOS tiny\n");
printf("reply: %s\n", reply);
int rc = os_mbuf_append(ctxt->om, reply, strlen(reply));
printf("\n");
return rc;
}
static int gatt_svr_chr_access_device_info_model(
uint16_t conn_handle, uint16_t attr_handle,
struct ble_gatt_access_ctxt *ctxt, void *arg)
{
printf("service 'device info: model' callback triggered\n");
snprintf(reply, REPLY_BUFFER_SIZE, "running TencentOS tiny on nordic ble board");
printf("reply: %s\n", reply);
int rc = os_mbuf_append(ctxt->om, reply, strlen(reply));
printf("\n");
return rc;
}
static int gatt_svr_chr_access_rw_demo(
uint16_t conn_handle, uint16_t attr_handle,
struct ble_gatt_access_ctxt *ctxt, void *arg)
{
printf("service 'rw demo' callback triggered\n");
int rc = 0;
ble_uuid_t* write_uuid = (ble_uuid_t*) &gatt_svr_chr_rw_demo_write_uuid.u;
ble_uuid_t* readonly_uuid = (ble_uuid_t*) &gatt_svr_chr_rw_demo_readonly_uuid.u;
if (ble_uuid_cmp(ctxt->chr->uuid, write_uuid) == 0) {
printf("access to characteristic 'rw demo (write)'\n");
switch (ctxt->op) {
case BLE_GATT_ACCESS_OP_READ_CHR:
printf("read from characteristic\n");
printf("current value of rm_demo_write_data: '%s'\n",
rm_demo_write_data);
/* send given data to the client */
rc = os_mbuf_append(ctxt->om, &rm_demo_write_data, strlen(rm_demo_write_data));
break;
case BLE_GATT_ACCESS_OP_WRITE_CHR:
printf("write to characteristic\n");
printf("old value of rm_demo_write_data: '%s'\n", rm_demo_write_data);
uint16_t om_len;
om_len = OS_MBUF_PKTLEN(ctxt->om);
/* read sent data */
rc = ble_hs_mbuf_to_flat(ctxt->om, &rm_demo_write_data,
sizeof rm_demo_write_data, &om_len);
/* we need to null-terminate the received string */
rm_demo_write_data[om_len] = '\0';
printf("new value of rm_demo_write_data: '%s'\n",
rm_demo_write_data);
break;
case BLE_GATT_ACCESS_OP_READ_DSC:
printf("read from descriptor\n");
break;
case BLE_GATT_ACCESS_OP_WRITE_DSC:
printf("write to descriptor\n");
break;
default:
printf("unhandled operation!\n");
rc = 1;
break;
}
printf("\n");
return rc;
}
else if (ble_uuid_cmp(ctxt->chr->uuid, readonly_uuid) == 0) {
printf("access to characteristic 'rw demo (read-only)'\n");
if (ctxt->op == BLE_GATT_ACCESS_OP_READ_CHR) {
char random_digit;
/* get random char between '0' and '9' */
random_digit = 48 + (rand() % 10);
snprintf(reply, REPLY_BUFFER_SIZE, "new random number: %c", random_digit);
printf("reply: %s\n", reply);
rc = os_mbuf_append(ctxt->om, &reply, strlen(reply));
printf("\n");
return rc;
}
return 0;
}
printf("unhandled uuid!\n");
return 1;
}
void
gatt_svr_register_cb(struct ble_gatt_register_ctxt *ctxt, void *arg)
{
char buf[BLE_UUID_STR_LEN];
switch (ctxt->op) {
case BLE_GATT_REGISTER_OP_SVC:
MODLOG_DFLT(DEBUG, "registered service %s with handle=%d\n",
ble_uuid_to_str(ctxt->svc.svc_def->uuid, buf),
ctxt->svc.handle);
break;
case BLE_GATT_REGISTER_OP_CHR:
MODLOG_DFLT(DEBUG, "registering characteristic %s with "
"def_handle=%d val_handle=%d\n",
ble_uuid_to_str(ctxt->chr.chr_def->uuid, buf),
ctxt->chr.def_handle,
ctxt->chr.val_handle);
break;
case BLE_GATT_REGISTER_OP_DSC:
MODLOG_DFLT(DEBUG, "registering descriptor %s with handle=%d\n",
ble_uuid_to_str(ctxt->dsc.dsc_def->uuid, buf),
ctxt->dsc.handle);
break;
default:
assert(0);
break;
}
}
int
gatt_svr_init(void)
{
int rc;
rc = ble_gatts_count_cfg(gatt_svr_svcs);
if (rc != 0) {
return rc;
}
rc = ble_gatts_add_svcs(gatt_svr_svcs);
if (rc != 0) {
return rc;
}
return 0;
}

222
examples/nimble_gatt/main.c Normal file
View File

@@ -0,0 +1,222 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "nimble/nimble_port_tencentos_tiny.h"
#include "host/ble_hs.h"
#include "host/util/util.h"
#include "host/ble_gatt.h"
#include "services/gap/ble_svc_gap.h"
#include "services/gatt/ble_svc_gatt.h"
#include "blehr_sens.h"
static const char device_name[] = "Nimble Gatt";
static uint8_t ble_addr_type;
static void start_advertise(void);
static int blegatt_gap_event(struct ble_gap_event *event, void *arg)
{
switch (event->type) {
case BLE_GAP_EVENT_CONNECT:
if (event->connect.status) {
start_advertise();
}
break;
case BLE_GAP_EVENT_DISCONNECT:
start_advertise();
break;
}
return 0;
}
static void start_advertise(void)
{
int rc;
struct ble_gap_adv_params advp;
memset(&advp, 0, sizeof advp);
advp.conn_mode = BLE_GAP_CONN_MODE_UND;
advp.disc_mode = BLE_GAP_DISC_MODE_GEN;
rc = ble_gap_adv_start(ble_addr_type, NULL, BLE_HS_FOREVER,
&advp, blegatt_gap_event, NULL);
assert(rc == 0);
}
static void
put_ad(uint8_t ad_type, uint8_t ad_len, const void *ad, uint8_t *buf,
uint8_t *len)
{
buf[(*len)++] = ad_len + 1;
buf[(*len)++] = ad_type;
memcpy(&buf[*len], ad, ad_len);
*len += ad_len;
}
static void
update_ad(void)
{
uint8_t ad[BLE_HS_ADV_MAX_SZ];
uint8_t ad_len = 0;
uint8_t ad_flags = BLE_HS_ADV_F_DISC_GEN | BLE_HS_ADV_F_BREDR_UNSUP;
put_ad(BLE_HS_ADV_TYPE_FLAGS, 1, &ad_flags, ad, &ad_len);
put_ad(BLE_HS_ADV_TYPE_COMP_NAME, sizeof(device_name), device_name, ad, &ad_len);
ble_gap_adv_set_data(ad, ad_len);
}
#if 1
/* UUID = 1bce38b3-d137-48ff-a13e-033e14c7a335 */
static const ble_uuid128_t gatt_svr_svc_rw_demo_uuid
= BLE_UUID128_INIT(0x35, 0xa3, 0xc7, 0x14, 0x3e, 0x03, 0x3e, 0xa1, 0xff,
0x48, 0x37, 0xd1, 0xb3, 0x38, 0xce, 0x1b);
static ble_uuid128_t svc_adv_uuids_128[] =
{
{ BLE_UUID_TYPE_128, { 0x35, 0xa3, 0xc7, 0x14, 0x3e, 0x03, 0x3e, 0xa1, 0xff,
0x48, 0x37, 0xd1, 0xb3, 0x38, 0xce, 0x1b } },
};
#endif
static ble_uuid16_t svc_adv_uuids[] =
{
{ BLE_UUID_TYPE_16, GATT_DEVICE_INFO_UUID },
};
void ble_set_fields(void)
{
struct ble_gap_adv_params adv_params;
struct ble_hs_adv_fields fields;
int rc;
/*
* Set the advertisement data included in our advertisements:
* o Flags (indicates advertisement type and other general info)
* o Advertising tx power
* o Device name
*/
memset(&fields, 0, sizeof(fields));
/*
* Advertise two flags:
* o Discoverability in forthcoming advertisement (general)
* o BLE-only (BR/EDR unsupported)
*/
fields.flags = BLE_HS_ADV_F_DISC_GEN |
BLE_HS_ADV_F_BREDR_UNSUP;
/*
* Indicate that the TX power level field should be included; have the
* stack fill this value automatically. This is done by assigning the
* special value BLE_HS_ADV_TX_PWR_LVL_AUTO.
*/
fields.tx_pwr_lvl_is_present = 1;
fields.tx_pwr_lvl = BLE_HS_ADV_TX_PWR_LVL_AUTO;
fields.name = (uint8_t *)device_name;
fields.name_len = strlen(device_name);
fields.name_is_complete = 1;
/*** 0x02,0x03 - 16-bit service class UUIDs. */
#if 1
fields.num_uuids16 = 1;
fields.uuids16 = svc_adv_uuids;
fields.uuids16_is_complete = 1;
#endif
#if 0
fields.num_uuids128 = 1;
fields.uuids128 = svc_adv_uuids_128;
fields.uuids128_is_complete = 1;
#endif
rc = ble_gap_adv_set_fields(&fields);
if (rc != 0) {
MODLOG_DFLT(ERROR, "error setting advertisement data; rc=%d\n", rc);
return;
}
/*** 0xff - Manufacturer specific data. */
memset(&fields, 0, sizeof(fields));
fields.mfg_data = (uint8_t*)"GZH:Bluetooth-BLE,177341833";
fields.mfg_data_len = 27;
rc = ble_gap_adv_rsp_set_fields(&fields);
if (rc != 0) {
MODLOG_DFLT(ERROR, "error setting advertisement data; rc=%d\n", rc);
return;
}
}
int ble_boot(void)
{
int rc = 0;
extern void nimble_port_run(void);
nimble_port_tencentos_tiny_init(nimble_port_run);
/* make sure synchronization of host and controller is done */
while (!ble_hs_synced()) {
;
}
rc = ble_hs_util_ensure_addr(0);
assert(rc == 0);
rc = ble_hs_id_infer_auto(0, &ble_addr_type);
assert(rc == 0);
ble_svc_gap_init();
ble_svc_gatt_init();
/* verify and add our custom services */
rc = gatt_svr_init();
assert(rc == 0);
/* set the device name */
rc = ble_svc_gap_device_name_set(device_name);
assert(rc == 0);
/* reload the GATT server to link our added services */
ble_gatts_start();
update_ad();
ble_set_fields();
start_advertise();
return 0;
}
k_task_t ble_boot_task;
k_stack_t ble_boot_stack[2048];
int main(void)
{
board_init();
/* Initialize OS */
tos_knl_init();
nimble_port_init();
/*
in this case, ble_boot_task's priority must lower than MYNEWT_VAL_BLE_HOST_TASK_PRIORITY && MYNEWT_VAL_BLE_LL_TASK_PRIORITY,
numerically bigger
to give the host and ll task a chance to run first just after the nimble_port_tencentos_tiny_init.
*/
tos_task_create(&ble_boot_task, "boot", ble_boot, NULL,
6,
ble_boot_stack, sizeof(ble_boot_stack),
0);
tos_knl_start();
}

View File

@@ -0,0 +1,6 @@
# NimBLE心率传感器案例
本案例通过实现一个模拟的BLE心率传感器展示如何通过GATT notification来实现异步的数据传输。
编译工程并烧写后使用手机或任何能支持心率传感器app建议使用Nordic官方的`nRF Toolbox`工具的设备连接开发板创建的Heart Rate Sensor蓝牙设备app界面上可以获取到传感器所在位置以及上传过来的心率信息。

View File

@@ -0,0 +1,13 @@
NimBLE Heart Rate Sensor Example
================================
This example demonstrates how to implement asynchronous data transfer using GATT
notifications by implementing a mock-up BLE heart rate sensor. Once flashed on
a node, you can connect to it using any phone or device capable of using such a
heart rate sensor, e.g. Nordics `nRF Toolbox` for Android
(https://play.google.com/store/apps/details?id=no.nordicsemi.android.nrftoolbox).
The heart rate sensor is simulated by simply providing an up- and down counter
for its BPM value.
On top of the heart rate service, this example implements the device information
as well as the battery service.

View File

@@ -24,18 +24,30 @@
#include "host/ble_uuid.h"
#include "blehr_sens.h"
static const char *manuf_name = "Apache Mynewt";
static const char *model_num = "Mynewt HR Sensor";
#include "services/dis/ble_svc_dis.h"
#include "services/bas/ble_svc_bas.h"
static const char *manuf_name = "TencentOS tiny";
static const char *model_num = "TOS HR Sensor";
uint16_t hrs_hrm_handle;
static const char *serial_num = "deadbeef-baddad";
static const char *firmware_ver = "1.0.0";
static const char *hardware_ver = "V1.0";
static int
gatt_svr_chr_access_heart_rate(uint16_t conn_handle, uint16_t attr_handle,
struct ble_gatt_access_ctxt *ctxt, void *arg);
struct ble_gatt_access_ctxt *ctxt, void *arg);
static int
gatt_svr_chr_access_battery_level(uint16_t conn_handle, uint16_t attr_handle,
struct ble_gatt_access_ctxt *ctxt, void *arg);
static int
gatt_svr_chr_access_device_info(uint16_t conn_handle, uint16_t attr_handle,
struct ble_gatt_access_ctxt *ctxt, void *arg);
/* GATT service definitions */
static const struct ble_gatt_svc_def gatt_svr_svcs[] = {
{
/* Service: Heart-rate */
@@ -71,14 +83,37 @@ static const struct ble_gatt_svc_def gatt_svr_svcs[] = {
.uuid = BLE_UUID16_DECLARE(GATT_MODEL_NUMBER_UUID),
.access_cb = gatt_svr_chr_access_device_info,
.flags = BLE_GATT_CHR_F_READ,
}, {
.uuid = BLE_UUID16_DECLARE(BLE_SVC_DIS_CHR_UUID16_SERIAL_NUMBER),
.access_cb = gatt_svr_chr_access_device_info,
.flags = BLE_GATT_CHR_F_READ,
}, {
.uuid = BLE_UUID16_DECLARE(BLE_SVC_DIS_CHR_UUID16_FIRMWARE_REVISION),
.access_cb = gatt_svr_chr_access_device_info,
.flags = BLE_GATT_CHR_F_READ,
}, {
.uuid = BLE_UUID16_DECLARE(BLE_SVC_DIS_CHR_UUID16_HARDWARE_REVISION),
.access_cb = gatt_svr_chr_access_device_info,
.flags = BLE_GATT_CHR_F_READ,
}, {
0, /* No more characteristics in this service */
}, }
},
{
0, /* No more services */
},
{
/* Service: Battery Level */
.type = BLE_GATT_SVC_TYPE_PRIMARY,
.uuid = BLE_UUID16_DECLARE(BLE_SVC_BAS_UUID16),
.characteristics = (struct ble_gatt_chr_def[]) { {
.uuid = BLE_UUID16_DECLARE(BLE_SVC_BAS_CHR_UUID16_BATTERY_LEVEL),
.access_cb = gatt_svr_chr_access_battery_level,
.flags = BLE_GATT_CHR_F_READ,
}, {
0, /* No more characteristics in this service */
}, }
},
{
0, /* No more services */
},
};
static int
@@ -104,27 +139,53 @@ gatt_svr_chr_access_heart_rate(uint16_t conn_handle, uint16_t attr_handle,
static int
gatt_svr_chr_access_device_info(uint16_t conn_handle, uint16_t attr_handle,
struct ble_gatt_access_ctxt *ctxt, void *arg)
struct ble_gatt_access_ctxt *ctxt, void *arg)
{
uint16_t uuid;
int rc;
uuid = ble_uuid_u16(ctxt->chr->uuid);
if (uuid == GATT_MODEL_NUMBER_UUID) {
rc = os_mbuf_append(ctxt->om, model_num, strlen(model_num));
return rc == 0 ? 0 : BLE_ATT_ERR_INSUFFICIENT_RES;
}
if (uuid == GATT_MANUFACTURER_NAME_UUID) {
rc = os_mbuf_append(ctxt->om, manuf_name, strlen(manuf_name));
return rc == 0 ? 0 : BLE_ATT_ERR_INSUFFICIENT_RES;
}
if (uuid == GATT_MODEL_NUMBER_UUID) {
rc = os_mbuf_append(ctxt->om, model_num, strlen(model_num));
return rc == 0 ? 0 : BLE_ATT_ERR_INSUFFICIENT_RES;
}
if (uuid == BLE_SVC_DIS_CHR_UUID16_SERIAL_NUMBER) {
rc = os_mbuf_append(ctxt->om, serial_num, strlen(serial_num));
return rc == 0 ? 0 : BLE_ATT_ERR_INSUFFICIENT_RES;
}
if (uuid == BLE_SVC_DIS_CHR_UUID16_FIRMWARE_REVISION) {
rc = os_mbuf_append(ctxt->om, firmware_ver, strlen(firmware_ver));
return rc == 0 ? 0 : BLE_ATT_ERR_INSUFFICIENT_RES;
}
if (uuid == BLE_SVC_DIS_CHR_UUID16_HARDWARE_REVISION) {
rc = os_mbuf_append(ctxt->om, hardware_ver, strlen(hardware_ver));
return rc == 0 ? 0 : BLE_ATT_ERR_INSUFFICIENT_RES;
}
assert(0);
return BLE_ATT_ERR_UNLIKELY;
}
static int
gatt_svr_chr_access_battery_level(uint16_t conn_handle, uint16_t attr_handle,
struct ble_gatt_access_ctxt *ctxt, void *arg)
{
MODLOG_DFLT(DEBUG, "[READ] battery level service: battery level value");
uint8_t level = 42;
int res = os_mbuf_append(ctxt->om, &level, sizeof(level));
return (res == 0) ? 0 : BLE_ATT_ERR_INSUFFICIENT_RES;
}
void
gatt_svr_register_cb(struct ble_gatt_register_ctxt *ctxt, void *arg)
{

View File

@@ -17,6 +17,7 @@
* under the License.
*/
#include <assert.h>
#include <string.h>
#include <stdio.h>
@@ -25,10 +26,13 @@
#include "console/console.h"
#include "config/private_syscfg.h"
#include "nimble/ble.h"
#include "host/ble_hs.h"
#include "services/gap/ble_svc_gap.h"
#include "blehr_sens.h"
#include "host/ble_hs.h"
#include "host/ble_gatt.h"
#include "services/gap/ble_svc_gap.h"
#include "services/gatt/ble_svc_gatt.h"
#include "blehr_sens.h"
#include "nimble/nimble_port_tencentos_tiny.h"
static bool notify_state;
@@ -36,11 +40,11 @@ static bool notify_state;
/* Connection handle */
static uint16_t conn_handle;
static const char *device_name = "blehr_sensor";
static const char *device_name = "Heart Rate Sensor";
static int blehr_gap_event(struct ble_gap_event *event, void *arg);
static uint8_t blehr_addr_type;
static uint8_t ble_addr_type;
/* Sending notify data timer */
static struct ble_npl_callout blehr_tx_timer;
@@ -48,6 +52,11 @@ static struct ble_npl_callout blehr_tx_timer;
/* Variable to simulate heart beats */
static uint8_t heartrate = 90;
static ble_uuid16_t svc_adv_uuids[] =
{
{ BLE_UUID_TYPE_16, GATT_HRS_UUID }
};
/*
* Enables advertising with parameters:
* o General discoverable mode
@@ -88,17 +97,33 @@ blehr_advertise(void)
fields.name_len = strlen(device_name);
fields.name_is_complete = 1;
/*** 0x02,0x03 - 16-bit service class UUIDs. */
fields.num_uuids16 = 1;
fields.uuids16 = svc_adv_uuids;
fields.uuids16_is_complete = 1;
rc = ble_gap_adv_set_fields(&fields);
if (rc != 0) {
MODLOG_DFLT(ERROR, "error setting advertisement data; rc=%d\n", rc);
return;
}
/*** 0xff - Manufacturer specific data. */
memset(&fields, 0, sizeof(fields));
fields.mfg_data = (uint8_t*)"GZH:Bluetooth-BLE,177341833";
fields.mfg_data_len = 27;
rc = ble_gap_adv_rsp_set_fields(&fields);
if (rc != 0) {
MODLOG_DFLT(ERROR, "error setting advertisement data; rc=%d\n", rc);
return;
}
/* Begin advertising */
memset(&adv_params, 0, sizeof(adv_params));
adv_params.conn_mode = BLE_GAP_CONN_MODE_UND;
adv_params.disc_mode = BLE_GAP_DISC_MODE_GEN;
rc = ble_gap_adv_start(blehr_addr_type, NULL, BLE_HS_FOREVER,
rc = ble_gap_adv_start(ble_addr_type, NULL, BLE_HS_FOREVER,
&adv_params, blehr_gap_event, NULL);
if (rc != 0) {
MODLOG_DFLT(ERROR, "error enabling advertisement; rc=%d\n", rc);
@@ -109,11 +134,7 @@ blehr_advertise(void)
static void
blehr_tx_hrate_stop(void)
{
#if 0
os_callout_stop(&blehr_tx_timer);
#else
ble_npl_callout_stop(&blehr_tx_timer);
#endif
}
/* Reset heartrate measurment */
@@ -122,11 +143,7 @@ blehr_tx_hrate_reset(void)
{
int rc;
#if 0
rc = os_callout_reset(&blehr_tx_timer, OS_TICKS_PER_SEC);
#else
rc = ble_npl_callout_reset(&blehr_tx_timer, OS_TICKS_PER_SEC);
#endif
assert(rc == 0);
}
@@ -213,7 +230,6 @@ blehr_gap_event(struct ble_gap_event *event, void *arg)
event->mtu.conn_handle,
event->mtu.value);
break;
}
return 0;
@@ -225,53 +241,24 @@ blehr_on_sync(void)
int rc;
/* Use privacy */
rc = ble_hs_id_infer_auto(0, &blehr_addr_type);
rc = ble_hs_id_infer_auto(0, &ble_addr_type);
assert(rc == 0);
/* Begin advertising */
blehr_advertise();
}
void sysinit(void)
int ble_boot(void)
{
k_err_t err;
err = tos_knl_init();
if (err != K_ERR_NONE) {
return;
}
}
/*
* main
*
* The main task for the project. This function initializes the packages,
* then starts serving events from default event queue.
*
* @return int NOTE: this function should never return!
*/
#if 0
int
main(void)
{
int rc;
board_init();
/* Initialize OS */
sysinit();
int rc = 0;
/* Initialize the NimBLE host configuration */
ble_hs_cfg.sync_cb = blehr_on_sync;
#if 0
os_callout_init(&blehr_tx_timer, os_eventq_dflt_get(),
blehr_tx_hrate, NULL);
#else
ble_npl_callout_init(&blehr_tx_timer, nimble_port_get_dflt_eventq(),
blehr_tx_hrate, NULL);
#endif
blehr_tx_hrate, NULL);
/* verify and add our custom services */
rc = gatt_svr_init();
assert(rc == 0);
@@ -279,59 +266,15 @@ main(void)
rc = ble_svc_gap_device_name_set(device_name);
assert(rc == 0);
/* As the last thing, process events from default event queue */
#if 0
while (1) {
os_eventq_run(os_eventq_dflt_get());
}
#else
/* run an event loop for handling the heart rate update events */
extern void nimble_port_run(void);
nimble_port_tencentos_tiny_init(nimble_port_run);
#endif
return 0;
}
#else
int blehr_boot(void)
{
int rc;
/* Initialize the NimBLE host configuration */
ble_hs_cfg.sync_cb = blehr_on_sync;
#if 0
os_callout_init(&blehr_tx_timer, os_eventq_dflt_get(),
blehr_tx_hrate, NULL);
#else
ble_npl_callout_init(&blehr_tx_timer, nimble_port_get_dflt_eventq(),
blehr_tx_hrate, NULL);
#endif
rc = gatt_svr_init();
assert(rc == 0);
/* Set the default device name */
rc = ble_svc_gap_device_name_set(device_name);
assert(rc == 0);
/* As the last thing, process events from default event queue */
#if 0
while (1) {
os_eventq_run(os_eventq_dflt_get());
}
#else
extern void nimble_port_run(void);
nimble_port_tencentos_tiny_init(nimble_port_run);
#endif
return 0;
}
#endif
k_task_t blehr_task;
k_stack_t blehr_stack[512];
k_task_t ble_boot_task;
k_stack_t ble_boot_stack[512];
int main(void)
{
@@ -342,9 +285,9 @@ int main(void)
nimble_port_init();
tos_task_create(&blehr_task, "blehr_boot", blehr_boot, NULL,
tos_task_create(&ble_boot_task, "boot", ble_boot, NULL,
4,
blehr_stack, sizeof(blehr_stack),
ble_boot_stack, sizeof(ble_boot_stack),
0);
tos_knl_start();
}

View File

@@ -0,0 +1,317 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "nimble/nimble_port_tencentos_tiny.h"
#include "nimble/ble.h"
#include "host/ble_gap.h"
#define BLE_RAW_ADV_DATA_LEN (31U)
typedef enum nimble_scan_status_en {
NIMBLE_SCAN_STATUS_STOPPED,
NIMBLE_SCAN_STATUS_SCANNING,
} nimble_scan_status_t;
typedef struct nimble_scan_item_st {
k_list_t list;
ble_addr_t addr; /* ble address */
uint8_t adv_data[BLE_RAW_ADV_DATA_LEN]; /* advertising data received */
uint8_t adv_data_len; /* length of the advertising data */
int8_t rssi; /* last RSSI of a scanned node */
uint8_t type; /* advertising packet type */
} nimble_scan_item_t;
/*
type: type of advertising packet, e.g BLE_HCI_ADV_TYPE_ADV_IND
disc_addr: advertising address of the source node
disc_rssi: RSSI value for the received packet
disc_adv_data: received advertising data
disc_adv_data_len: length of disc_adv_data in bytes
*/
typedef void(*nimble_scan_cb_t)(uint8_t type,
const ble_addr_t *disc_addr, int8_t disc_rssi,
const uint8_t *disc_adv_data, size_t disc_adv_data_len);
static uint8_t ble_addr_type;
static nimble_scan_cb_t scan_disc_cb = NULL;
static struct ble_gap_disc_params scan_params = { 0 };
static nimble_scan_item_t entry_pool[200];
TOS_LIST_DEFINE(free_entry);
TOS_LIST_DEFINE(scan_entry);
void nimble_scan_info_list_init(void)
{
int i = 0;
for (i = 0; i < sizeof(entry_pool) / sizeof(entry_pool[0]); ++i) {
tos_list_init(&entry_pool[i].list);
tos_list_add(&entry_pool[i].list, &free_entry);
}
}
void nimble_scan_item_addr_display(ble_addr_t *addr)
{
int i = 0;
printf("%02x", (int)addr->val[5]);
for (i = 4; i >=0; --i) {
printf(":%02x", addr->val[i]);
}
switch (addr->type) {
case BLE_ADDR_PUBLIC:
printf(" (PUBLIC)");
break;
case BLE_ADDR_RANDOM:
printf(" (RANDOM)");
break;
case BLE_ADDR_PUBLIC_ID:
printf(" (PUB_ID)");
break;
case BLE_ADDR_RANDOM_ID:
printf(" (RAND_ID)");
break;
default:
printf(" (UNKNOWN)");
break;
}
}
void nimble_scan_item_type_display(uint8_t type)
{
switch (type) {
case BLE_HCI_ADV_TYPE_ADV_IND:
printf(" [IND]");
break;
case BLE_HCI_ADV_TYPE_ADV_DIRECT_IND_HD:
printf(" [DIRECT_IND_HD]");
break;
case BLE_HCI_ADV_TYPE_ADV_SCAN_IND:
printf(" [SCAN_IND]");
break;
case BLE_HCI_ADV_TYPE_ADV_NONCONN_IND:
printf(" [NONCONN_IND]");
break;
case BLE_HCI_ADV_TYPE_ADV_DIRECT_IND_LD:
printf(" [DIRECT_IND_LD]");
break;
default:
printf(" [INVALID]");
break;
}
}
void nimble_scan_item_display(nimble_scan_item_t *item)
{
nimble_scan_item_addr_display(&item->addr);
nimble_scan_item_type_display(item->type);
printf(", rssi: %d\n", item->rssi);
printf("\n");
}
void nimble_scan_info_list_display(void)
{
k_list_t *curr;
nimble_scan_item_t *iter;
TOS_LIST_FOR_EACH(curr, &scan_entry) {
iter = TOS_LIST_ENTRY(curr, nimble_scan_item_t, list);
nimble_scan_item_display(iter);
}
}
nimble_scan_item_t *nimble_scan_item_alloc(void)
{
return TOS_LIST_FIRST_ENTRY_OR_NULL(&free_entry, nimble_scan_item_t, list);
}
int nimble_scan_item_is_exist(ble_addr_t *addr)
{
k_list_t *curr;
nimble_scan_item_t *iter;
TOS_LIST_FOR_EACH(curr, &free_entry) {
iter = TOS_LIST_ENTRY(curr, nimble_scan_item_t, list);
if (ble_addr_cmp(&addr, &iter->addr) == 0) {
return K_TRUE;
}
}
return K_FALSE;
}
void nimble_scan_info_save(uint8_t type, const ble_addr_t *disc_addr, int8_t disc_rssi,
const uint8_t *disc_adv_data, size_t disc_adv_data_len)
{
int i = 0;
nimble_scan_item_t *item;
if (nimble_scan_item_is_exist(disc_addr)) {
return;
}
item = nimble_scan_item_alloc();
if (!item) {
return;
}
memcpy(&item->addr, disc_addr, sizeof(ble_addr_t));
if (disc_adv_data) {
memcpy(&item->adv_data, disc_adv_data, disc_adv_data_len);
}
item->adv_data_len = disc_adv_data_len;
item->rssi = disc_rssi;
item->type = type;
tos_list_del(&item->list);
tos_list_add(&item->list, &scan_entry);
}
static int blescan_gap_event(struct ble_gap_event *event, void *arg)
{
/* only interested in the DISC event */
switch (event->type) {
case BLE_GAP_EVENT_DISC:
scan_disc_cb(event->disc.event_type, &event->disc.addr, event->disc.rssi,
event->disc.data, (size_t)event->disc.length_data);
break;
default:
/* should never happen */
MODLOG_DFLT(DEBUG, "unexpected event: (%d)\n", (int)event->type);
assert(0);
break;
}
return 0;
}
int nimble_scan_start(void)
{
int rc;
if (ble_gap_disc_active() != 0) {
return 0;
}
rc = ble_gap_disc(ble_addr_type, BLE_HS_FOREVER,
&scan_params, blescan_gap_event, NULL);
if (rc != 0) {
MODLOG_DFLT(DEBUG, "[scanner] err: start failed (%i)\n", rc);
return -1;
}
return 0;
}
void nimble_scan_stop(void)
{
int rc;
if (ble_gap_disc_active() != 1) {
return;
}
rc = ble_gap_disc_cancel();
assert(rc == 0);
}
nimble_scan_status_t nimble_scan_status(void)
{
return ble_gap_disc_active() == 1 ? NIMBLE_SCAN_STATUS_SCANNING : NIMBLE_SCAN_STATUS_STOPPED;
}
int nimble_scan_init(const struct ble_gap_disc_params *params, nimble_scan_cb_t disc_cb)
{
assert(disc_cb);
if (params) {
memcpy(&scan_params, params, sizeof(scan_params));
} else {
memset(&scan_params, 0, sizeof(scan_params));
}
scan_disc_cb = disc_cb;
return 0;
}
int ble_boot(void)
{
int rc;
extern void nimble_port_run(void);
nimble_port_tencentos_tiny_init(nimble_port_run);
/* make sure synchronization of host and controller is done */
while (!ble_hs_synced()) {
;
}
rc = ble_hs_util_ensure_addr(0);
assert(rc == 0);
rc = ble_hs_id_infer_auto(0, &ble_addr_type);
assert(rc == 0);
/* do a 'full time' scan, set the window equal the interval */
struct ble_gap_disc_params scan_params = {
.itvl = BLE_GAP_LIM_DISC_SCAN_INT,
.window = BLE_GAP_LIM_DISC_SCAN_WINDOW,
.filter_policy = 0, /* dummy */
.limited = 0, /* no limited discovery */
.passive = 0, /* no passive scanning */
.filter_duplicates = 0, /* no duplicate filtering */
};
nimble_scan_info_list_init();
/* initialize the nimble scanner */
nimble_scan_init(&scan_params, nimble_scan_info_save);
rc = nimble_scan_start();
assert(rc == 0);
tos_task_delay(2000);
nimble_scan_stop();
nimble_scan_info_list_display();
return 0;
}
k_task_t ble_boot_task;
k_stack_t ble_boot_stack[2048];
int main(void)
{
board_init();
/* Initialize OS */
tos_knl_init();
nimble_port_init();
/*
in this case, ble_boot_task's priority must lower than MYNEWT_VAL_BLE_HOST_TASK_PRIORITY && MYNEWT_VAL_BLE_LL_TASK_PRIORITY,
numerically bigger
to give the host and ll task a chance to run first just after the nimble_port_tencentos_tiny_init.
*/
tos_task_create(&ble_boot_task, "ble_boot", ble_boot, NULL,
6,
ble_boot_stack, sizeof(ble_boot_stack),
0);
tos_knl_start();
}

View File

@@ -285,7 +285,7 @@ __API__ k_err_t tos_bin_heap_flush(k_bin_heap_t *bin_heap)
__API__ int tos_bin_heap_is_empty(k_bin_heap_t *bin_heap)
{
TOS_CPU_CPSR_ALLOC();
int is_empty = 0;
int is_empty = K_FALSE;
TOS_PTR_SANITY_CHECK_RC(bin_heap, K_FALSE);
TOS_OBJ_VERIFY_RC(bin_heap, KNL_OBJ_TYPE_BINARY_HEAP, K_FALSE);
@@ -300,7 +300,7 @@ __API__ int tos_bin_heap_is_empty(k_bin_heap_t *bin_heap)
__API__ int tos_bin_heap_is_full(k_bin_heap_t *bin_heap)
{
TOS_CPU_CPSR_ALLOC();
int is_full = 0;
int is_full = K_FALSE;
TOS_PTR_SANITY_CHECK_RC(bin_heap, K_FALSE);
TOS_OBJ_VERIFY_RC(bin_heap, KNL_OBJ_TYPE_BINARY_HEAP, K_FALSE);

View File

@@ -222,7 +222,7 @@ __API__ k_err_t tos_ring_q_flush(k_ring_q_t *ring_q)
__API__ int tos_ring_q_is_empty(k_ring_q_t *ring_q)
{
TOS_CPU_CPSR_ALLOC();
int is_empty = 0;
int is_empty = K_FALSE;
TOS_PTR_SANITY_CHECK_RC(ring_q, K_FALSE);
TOS_OBJ_VERIFY_RC(ring_q, KNL_OBJ_TYPE_RING_QUEUE, K_FALSE);
@@ -237,7 +237,7 @@ __API__ int tos_ring_q_is_empty(k_ring_q_t *ring_q)
__API__ int tos_ring_q_is_full(k_ring_q_t *ring_q)
{
TOS_CPU_CPSR_ALLOC();
int is_full = 0;
int is_full = K_FALSE;
TOS_PTR_SANITY_CHECK_RC(ring_q, K_FALSE);
TOS_OBJ_VERIFY_RC(ring_q, KNL_OBJ_TYPE_RING_QUEUE, K_FALSE);