├── main.c ├── .gitignore ├── pca10028 └── s110 │ └── armgcc │ ├── ble_app_template_gcc_nrf51.ld │ └── Makefile ├── license.txt ├── README.md ├── ble_lbs.h ├── pstorage_platform.h ├── ble_lbs.c └── arm ├── ble_app_lbs.uvoptx ├── ble_app_lbs.uvopt ├── ble_app_lbs.uvproj └── ble_app_lbs.uvprojx /main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NordicPlayground/nrf51-ble-app-lbs/HEAD/main.c -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | */_build/* 2 | !*/_build/*.hex 3 | arm/* 4 | !arm/*.uvproj 5 | !arm/*.uvprojx 6 | !arm/*.uvopt 7 | !arm/*.uvoptx 8 | gcc/* 9 | !gcc/*.bat 10 | !gcc/Makefile 11 | iar/* 12 | !iar/*.ewp 13 | !iar/*.eww 14 | *.uvgui.* 15 | *.dep 16 | *.log 17 | *.bak 18 | *.ini 19 | 20 | -------------------------------------------------------------------------------- /pca10028/s110/armgcc/ble_app_template_gcc_nrf51.ld: -------------------------------------------------------------------------------- 1 | /* Linker script to configure memory regions. */ 2 | 3 | SEARCH_DIR(.) 4 | GROUP(-lgcc -lc -lnosys) 5 | 6 | MEMORY 7 | { 8 | FLASH (rx) : ORIGIN = 0x18000, LENGTH = 0x28000 9 | RAM (rwx) : ORIGIN = 0x20002000, LENGTH = 0x6000 10 | } 11 | 12 | INCLUDE "gcc_nrf51_common.ld" -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013, Nordic Semiconductor ASA 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of Nordic Semiconductor ASA nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE . -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | nrf51-ble-app-lbs 2 | ================== 3 | (Draft update to v8.0) 4 | This is the accompanying code for the application note nAN-36: "Creating Bluetooth Low Energy Applications Using nRF51822". It is an implemtation of a simple application that shows a custom service with two characteristics; one for a button and one for a LED. The button characteristic will send a notification with the button state when the button is pressed or released, while the LED characteristic can be used to control an on-board LED. 5 | 6 | Requirements 7 | ------------ 8 | - nRF51 SDK version 8.0 9 | - S110 SoftDevice version 8.0 10 | - nRF51822 DK (PCA10028) 11 | 12 | The project may need modifications to work with other versions or other boards. 13 | 14 | To compile it, clone the repository in the [SDK]/examples/ble_peripheral folder. 15 | 16 | About this project 17 | ------------------ 18 | This application is one of several applications that has been built by the support team at Nordic Semiconductor, as a demo of some particular feature or use case. It has not necessarily been thoroughly tested, so there might be unknown issues. It is hence provided as-is, without any warranty. 19 | 20 | However, in the hope that it still may be useful also for others than the ones we initially wrote it for, we've chosen to distribute it here on GitHub. 21 | 22 | The application is built to be used with the official nRF51 SDK, that can be downloaded from https://www.nordicsemi.no, provided you have a product key for one of our kits. 23 | 24 | Please post any questions about this project on https://devzone.nordicsemi.com. 25 | 26 | How to get started 27 | ------------------ 28 | - Install [Keil MDK version 5](http://www2.keil.com/mdk5/) 29 | - Download SDK version 8.0.0 zip(nRF51_SDK_8.0.0_5fc2c3a.zip) from [here](https://developer.nordicsemi.com/nRF51_SDK/nRF51_SDK_v8.x.x/). 30 | - The zip version of the SDK requires the nRF51 MDK to be installed separately (msi installer is included in the zip) 31 | - Unzip to C:\Keil_v5\ARM\Device\SDK8.0.0 (SDK8.0.0 folder must be created) 32 | - Make sure you are on the [SDKv8.0 branch](https://github.com/NordicSemiconductor/nrf51-ble-app-lbs/tree/SDKv8.0) of this github example project, and download the zip file. 33 | - Unzip it to C:\Keil_v5\ARM\Device\SDK8.0.0\examples\ble_peripheral 34 | - Open ble_app_lbs.uvprojx in C:\Keil_v5\ARM\Device\SDK8.0.0\examples\ble_peripheral\nrf51-ble-app-lbs-master\arm and compile. 35 | -------------------------------------------------------------------------------- /ble_lbs.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the license.txt file. 5 | */ 6 | 7 | #ifndef BLE_LBS_H__ 8 | #define BLE_LBS_H__ 9 | 10 | #include 11 | #include 12 | #include "ble.h" 13 | #include "ble_srv_common.h" 14 | 15 | #define LBS_UUID_BASE {0x23, 0xD1, 0xBC, 0xEA, 0x5F, 0x78, 0x23, 0x15, 0xDE, 0xEF, 0x12, 0x12, 0x00, 0x00, 0x00, 0x00} 16 | #define LBS_UUID_SERVICE 0x1523 17 | #define LBS_UUID_LED_CHAR 0x1525 18 | #define LBS_UUID_BUTTON_CHAR 0x1524 19 | 20 | // Forward declaration of the ble_lbs_t type. 21 | typedef struct ble_lbs_s ble_lbs_t; 22 | 23 | typedef void (*ble_lbs_led_write_handler_t) (ble_lbs_t * p_lbs, uint8_t new_state); 24 | 25 | typedef struct 26 | { 27 | ble_lbs_led_write_handler_t led_write_handler; /**< Event handler to be called when LED characteristic is written. */ 28 | } ble_lbs_init_t; 29 | 30 | /**@brief LED Button Service structure. This contains various status information for the service. */ 31 | typedef struct ble_lbs_s 32 | { 33 | uint16_t service_handle; 34 | ble_gatts_char_handles_t led_char_handles; 35 | ble_gatts_char_handles_t button_char_handles; 36 | uint8_t uuid_type; 37 | uint16_t conn_handle; 38 | ble_lbs_led_write_handler_t led_write_handler; 39 | } ble_lbs_t; 40 | 41 | /**@brief Function for initializing the LED Button Service. 42 | * 43 | * @param[out] p_lbs LED Button Service structure. This structure will have to be supplied by 44 | * the application. It will be initialized by this function, and will later 45 | * be used to identify this particular service instance. 46 | * @param[in] p_lbs_init Information needed to initialize the service. 47 | * 48 | * @return NRF_SUCCESS on successful initialization of service, otherwise an error code. 49 | */ 50 | uint32_t ble_lbs_init(ble_lbs_t * p_lbs, const ble_lbs_init_t * p_lbs_init); 51 | 52 | /**@brief Function for handling the Application's BLE Stack events. 53 | * 54 | * @details Handles all events from the BLE stack of interest to the LED Button Service. 55 | * 56 | * 57 | * @param[in] p_lbs LED Button Service structure. 58 | * @param[in] p_ble_evt Event received from the BLE stack. 59 | */ 60 | void ble_lbs_on_ble_evt(ble_lbs_t * p_lbs, ble_evt_t * p_ble_evt); 61 | 62 | /**@brief Function for sending a button state notification. 63 | */ 64 | uint32_t ble_lbs_on_button_change(ble_lbs_t * p_lbs, uint8_t button_state); 65 | 66 | #endif // BLE_LBS_H__ 67 | 68 | /** @} */ 69 | -------------------------------------------------------------------------------- /pstorage_platform.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the license.txt file. 5 | */ 6 | 7 | /** @cond To make doxygen skip this file */ 8 | 9 | /** @file 10 | * This header contains defines with respect persistent storage that are specific to 11 | * persistent storage implementation and application use case. 12 | */ 13 | #ifndef PSTORAGE_PL_H__ 14 | #define PSTORAGE_PL_H__ 15 | 16 | #include 17 | 18 | #define PSTORAGE_FLASH_PAGE_SIZE ((uint16_t)NRF_FICR->CODEPAGESIZE) /**< Size of one flash page. */ 19 | #define PSTORAGE_FLASH_EMPTY_MASK 0xFFFFFFFF /**< Bit mask that defines an empty address in flash. */ 20 | 21 | #define PSTORAGE_FLASH_PAGE_END \ 22 | ((NRF_UICR->BOOTLOADERADDR != PSTORAGE_FLASH_EMPTY_MASK) \ 23 | ? (NRF_UICR->BOOTLOADERADDR / PSTORAGE_FLASH_PAGE_SIZE) \ 24 | : NRF_FICR->CODESIZE) 25 | 26 | 27 | #define PSTORAGE_MAX_APPLICATIONS 2 /**< Maximum number of applications that can be registered with the module, configurable based on system requirements. */ 28 | #define PSTORAGE_MIN_BLOCK_SIZE 0x0010 /**< Minimum size of block that can be registered with the module. Should be configured based on system requirements, recommendation is not have this value to be at least size of word. */ 29 | 30 | #define PSTORAGE_DATA_START_ADDR ((PSTORAGE_FLASH_PAGE_END - PSTORAGE_MAX_APPLICATIONS - 1) \ 31 | * PSTORAGE_FLASH_PAGE_SIZE) /**< Start address for persistent data, configurable according to system requirements. */ 32 | #define PSTORAGE_DATA_END_ADDR ((PSTORAGE_FLASH_PAGE_END - 1) * PSTORAGE_FLASH_PAGE_SIZE) /**< End address for persistent data, configurable according to system requirements. */ 33 | #define PSTORAGE_SWAP_ADDR PSTORAGE_DATA_END_ADDR /**< Top-most page is used as swap area for clear and update. */ 34 | 35 | #define PSTORAGE_MAX_BLOCK_SIZE PSTORAGE_FLASH_PAGE_SIZE /**< Maximum size of block that can be registered with the module. Should be configured based on system requirements. And should be greater than or equal to the minimum size. */ 36 | #define PSTORAGE_CMD_QUEUE_SIZE 30 /**< Maximum number of flash access commands that can be maintained by the module for all applications. Configurable. */ 37 | 38 | 39 | /** Abstracts persistently memory block identifier. */ 40 | typedef uint32_t pstorage_block_t; 41 | 42 | typedef struct 43 | { 44 | uint32_t module_id; /**< Module ID.*/ 45 | pstorage_block_t block_id; /**< Block ID.*/ 46 | } pstorage_handle_t; 47 | 48 | typedef uint16_t pstorage_size_t; /** Size of length and offset fields. */ 49 | 50 | /**@brief Handles Flash Access Result Events. To be called in the system event dispatcher of the application. */ 51 | void pstorage_sys_event_handler (uint32_t sys_evt); 52 | 53 | #endif // PSTORAGE_PL_H__ 54 | 55 | /** @} */ 56 | /** @endcond */ 57 | -------------------------------------------------------------------------------- /ble_lbs.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the license.txt file. 5 | */ 6 | 7 | #include "ble_lbs.h" 8 | #include 9 | #include "nordic_common.h" 10 | #include "ble_srv_common.h" 11 | #include "app_util.h" 12 | 13 | 14 | /**@brief Function for handling the Connect event. 15 | * 16 | * @param[in] p_lbs LED Button Service structure. 17 | * @param[in] p_ble_evt Event received from the BLE stack. 18 | */ 19 | static void on_connect(ble_lbs_t * p_lbs, ble_evt_t * p_ble_evt) 20 | { 21 | p_lbs->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; 22 | } 23 | 24 | 25 | /**@brief Function for handling the Disconnect event. 26 | * 27 | * @param[in] p_lbs LED Button Service structure. 28 | * @param[in] p_ble_evt Event received from the BLE stack. 29 | */ 30 | static void on_disconnect(ble_lbs_t * p_lbs, ble_evt_t * p_ble_evt) 31 | { 32 | UNUSED_PARAMETER(p_ble_evt); 33 | p_lbs->conn_handle = BLE_CONN_HANDLE_INVALID; 34 | } 35 | 36 | 37 | /**@brief Function for handling the Write event. 38 | * 39 | * @param[in] p_lbs LED Button Service structure. 40 | * @param[in] p_ble_evt Event received from the BLE stack. 41 | */ 42 | static void on_write(ble_lbs_t * p_lbs, ble_evt_t * p_ble_evt) 43 | { 44 | ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; 45 | 46 | if ((p_evt_write->handle == p_lbs->led_char_handles.value_handle) && 47 | (p_evt_write->len == 1) && 48 | (p_lbs->led_write_handler != NULL)) 49 | { 50 | p_lbs->led_write_handler(p_lbs, p_evt_write->data[0]); 51 | } 52 | } 53 | 54 | 55 | void ble_lbs_on_ble_evt(ble_lbs_t * p_lbs, ble_evt_t * p_ble_evt) 56 | { 57 | switch (p_ble_evt->header.evt_id) 58 | { 59 | case BLE_GAP_EVT_CONNECTED: 60 | on_connect(p_lbs, p_ble_evt); 61 | break; 62 | 63 | case BLE_GAP_EVT_DISCONNECTED: 64 | on_disconnect(p_lbs, p_ble_evt); 65 | break; 66 | 67 | case BLE_GATTS_EVT_WRITE: 68 | on_write(p_lbs, p_ble_evt); 69 | break; 70 | 71 | default: 72 | // No implementation needed. 73 | break; 74 | } 75 | } 76 | 77 | 78 | /**@brief Function for adding the LED characteristic. 79 | * 80 | */ 81 | static uint32_t led_char_add(ble_lbs_t * p_lbs, const ble_lbs_init_t * p_lbs_init) 82 | { 83 | ble_gatts_char_md_t char_md; 84 | ble_gatts_attr_t attr_char_value; 85 | ble_uuid_t ble_uuid; 86 | ble_gatts_attr_md_t attr_md; 87 | 88 | memset(&char_md, 0, sizeof(char_md)); 89 | 90 | char_md.char_props.read = 1; 91 | char_md.char_props.write = 1; 92 | char_md.p_char_user_desc = NULL; 93 | char_md.p_char_pf = NULL; 94 | char_md.p_user_desc_md = NULL; 95 | char_md.p_cccd_md = NULL; 96 | char_md.p_sccd_md = NULL; 97 | 98 | ble_uuid.type = p_lbs->uuid_type; 99 | ble_uuid.uuid = LBS_UUID_LED_CHAR; 100 | 101 | memset(&attr_md, 0, sizeof(attr_md)); 102 | 103 | BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.read_perm); 104 | BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.write_perm); 105 | attr_md.vloc = BLE_GATTS_VLOC_STACK; 106 | attr_md.rd_auth = 0; 107 | attr_md.wr_auth = 0; 108 | attr_md.vlen = 0; 109 | 110 | memset(&attr_char_value, 0, sizeof(attr_char_value)); 111 | 112 | attr_char_value.p_uuid = &ble_uuid; 113 | attr_char_value.p_attr_md = &attr_md; 114 | attr_char_value.init_len = sizeof(uint8_t); 115 | attr_char_value.init_offs = 0; 116 | attr_char_value.max_len = sizeof(uint8_t); 117 | attr_char_value.p_value = NULL; 118 | 119 | return sd_ble_gatts_characteristic_add(p_lbs->service_handle, &char_md, 120 | &attr_char_value, 121 | &p_lbs->led_char_handles); 122 | } 123 | 124 | /**@brief Function for adding the Button characteristic. 125 | * 126 | */ 127 | static uint32_t button_char_add(ble_lbs_t * p_lbs, const ble_lbs_init_t * p_lbs_init) 128 | { 129 | ble_gatts_char_md_t char_md; 130 | ble_gatts_attr_md_t cccd_md; 131 | ble_gatts_attr_t attr_char_value; 132 | ble_uuid_t ble_uuid; 133 | ble_gatts_attr_md_t attr_md; 134 | 135 | memset(&cccd_md, 0, sizeof(cccd_md)); 136 | 137 | BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm); 138 | BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.write_perm); 139 | cccd_md.vloc = BLE_GATTS_VLOC_STACK; 140 | 141 | memset(&char_md, 0, sizeof(char_md)); 142 | 143 | char_md.char_props.read = 1; 144 | char_md.char_props.notify = 1; 145 | char_md.p_char_user_desc = NULL; 146 | char_md.p_char_pf = NULL; 147 | char_md.p_user_desc_md = NULL; 148 | char_md.p_cccd_md = &cccd_md; 149 | char_md.p_sccd_md = NULL; 150 | 151 | ble_uuid.type = p_lbs->uuid_type; 152 | ble_uuid.uuid = LBS_UUID_BUTTON_CHAR; 153 | 154 | memset(&attr_md, 0, sizeof(attr_md)); 155 | 156 | BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.read_perm); 157 | BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.write_perm); 158 | attr_md.vloc = BLE_GATTS_VLOC_STACK; 159 | attr_md.rd_auth = 0; 160 | attr_md.wr_auth = 0; 161 | attr_md.vlen = 0; 162 | 163 | memset(&attr_char_value, 0, sizeof(attr_char_value)); 164 | 165 | attr_char_value.p_uuid = &ble_uuid; 166 | attr_char_value.p_attr_md = &attr_md; 167 | attr_char_value.init_len = sizeof(uint8_t); 168 | attr_char_value.init_offs = 0; 169 | attr_char_value.max_len = sizeof(uint8_t); 170 | attr_char_value.p_value = NULL; 171 | 172 | return sd_ble_gatts_characteristic_add(p_lbs->service_handle, &char_md, 173 | &attr_char_value, 174 | &p_lbs->button_char_handles); 175 | } 176 | 177 | uint32_t ble_lbs_init(ble_lbs_t * p_lbs, const ble_lbs_init_t * p_lbs_init) 178 | { 179 | uint32_t err_code; 180 | ble_uuid_t ble_uuid; 181 | 182 | // Initialize service structure 183 | p_lbs->conn_handle = BLE_CONN_HANDLE_INVALID; 184 | p_lbs->led_write_handler = p_lbs_init->led_write_handler; 185 | 186 | // Add service 187 | ble_uuid128_t base_uuid = {LBS_UUID_BASE}; 188 | err_code = sd_ble_uuid_vs_add(&base_uuid, &p_lbs->uuid_type); 189 | if (err_code != NRF_SUCCESS) 190 | { 191 | return err_code; 192 | } 193 | 194 | ble_uuid.type = p_lbs->uuid_type; 195 | ble_uuid.uuid = LBS_UUID_SERVICE; 196 | 197 | err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, &ble_uuid, &p_lbs->service_handle); 198 | if (err_code != NRF_SUCCESS) 199 | { 200 | return err_code; 201 | } 202 | 203 | err_code = button_char_add(p_lbs, p_lbs_init); 204 | if (err_code != NRF_SUCCESS) 205 | { 206 | return err_code; 207 | } 208 | 209 | err_code = led_char_add(p_lbs, p_lbs_init); 210 | if (err_code != NRF_SUCCESS) 211 | { 212 | return err_code; 213 | } 214 | 215 | return NRF_SUCCESS; 216 | } 217 | 218 | uint32_t ble_lbs_on_button_change(ble_lbs_t * p_lbs, uint8_t button_state) 219 | { 220 | ble_gatts_hvx_params_t params; 221 | uint16_t len = sizeof(button_state); 222 | 223 | memset(¶ms, 0, sizeof(params)); 224 | params.type = BLE_GATT_HVX_NOTIFICATION; 225 | params.handle = p_lbs->button_char_handles.value_handle; 226 | params.p_data = &button_state; 227 | params.p_len = &len; 228 | 229 | return sd_ble_gatts_hvx(p_lbs->conn_handle, ¶ms); 230 | } 231 | -------------------------------------------------------------------------------- /pca10028/s110/armgcc/Makefile: -------------------------------------------------------------------------------- 1 | PROJECT_NAME := ble_app_template_s110_pca10028 2 | 3 | export OUTPUT_FILENAME 4 | #MAKEFILE_NAME := $(CURDIR)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) 5 | MAKEFILE_NAME := $(MAKEFILE_LIST) 6 | MAKEFILE_DIR := $(dir $(MAKEFILE_NAME) ) 7 | 8 | TEMPLATE_PATH = ../../../../../../components/toolchain/gcc 9 | ifeq ($(OS),Windows_NT) 10 | include $(TEMPLATE_PATH)/Makefile.windows 11 | else 12 | include $(TEMPLATE_PATH)/Makefile.posix 13 | endif 14 | 15 | MK := mkdir 16 | RM := rm -rf 17 | 18 | #echo suspend 19 | ifeq ("$(VERBOSE)","1") 20 | NO_ECHO := 21 | else 22 | NO_ECHO := @ 23 | endif 24 | 25 | # Toolchain commands 26 | CC := "$(GNU_INSTALL_ROOT)/bin/$(GNU_PREFIX)-gcc" 27 | AS := "$(GNU_INSTALL_ROOT)/bin/$(GNU_PREFIX)-as" 28 | AR := "$(GNU_INSTALL_ROOT)/bin/$(GNU_PREFIX)-ar" -r 29 | LD := "$(GNU_INSTALL_ROOT)/bin/$(GNU_PREFIX)-ld" 30 | NM := "$(GNU_INSTALL_ROOT)/bin/$(GNU_PREFIX)-nm" 31 | OBJDUMP := "$(GNU_INSTALL_ROOT)/bin/$(GNU_PREFIX)-objdump" 32 | OBJCOPY := "$(GNU_INSTALL_ROOT)/bin/$(GNU_PREFIX)-objcopy" 33 | SIZE := "$(GNU_INSTALL_ROOT)/bin/$(GNU_PREFIX)-size" 34 | 35 | #function for removing duplicates in a list 36 | remduplicates = $(strip $(if $1,$(firstword $1) $(call remduplicates,$(filter-out $(firstword $1),$1)))) 37 | 38 | #source common to all targets 39 | C_SOURCE_FILES += \ 40 | ../../../../../../components/libraries/button/app_button.c \ 41 | ../../../../../../components/libraries/util/app_error.c \ 42 | ../../../../../../components/libraries/gpiote/app_gpiote.c \ 43 | ../../../../../../components/libraries/scheduler/app_scheduler.c \ 44 | ../../../../../../components/libraries/timer/app_timer.c \ 45 | ../../../../../../components/libraries/timer/app_timer_appsh.c \ 46 | ../../../../../../components/libraries/util/nrf_assert.c \ 47 | ../../../../../../components/drivers_nrf/hal/nrf_delay.c \ 48 | ../../../../../../components/drivers_nrf/pstorage/pstorage.c \ 49 | ../../../../../bsp/bsp.c \ 50 | ../../../main.c \ 51 | ../../../ble_lbs.c \ 52 | ../../../../../../components/ble/common/ble_advdata.c \ 53 | ../../../../../../components/ble/common/ble_conn_params.c \ 54 | ../../../../../../components/ble/common/ble_srv_common.c \ 55 | ../../../../../../components/ble/ble_debug_assert_handler/ble_debug_assert_handler.c \ 56 | ../../../../../../components/toolchain/system_nrf51.c \ 57 | ../../../../../../components/softdevice/common/softdevice_handler/softdevice_handler.c \ 58 | 59 | #assembly files common to all targets 60 | ASM_SOURCE_FILES = ../../../../../../components/toolchain/gcc/gcc_startup_nrf51.s 61 | 62 | #includes common to all targets 63 | INC_PATHS = -I../../../ 64 | INC_PATHS += -I../../../../../../components/libraries/util 65 | INC_PATHS += -I../../../../../../components/toolchain/gcc 66 | INC_PATHS += -I../../../../../../components/toolchain 67 | INC_PATHS += -I../../../../../../components/ble/common 68 | INC_PATHS += -I../../../../../../components/ble/ble_error_log 69 | INC_PATHS += -I../../../../../../components/ble/ble_debug_assert_handler 70 | INC_PATHS += -I../../../../../../components/libraries/scheduler 71 | INC_PATHS += -I../../../../../../components/libraries/gpiote 72 | INC_PATHS += -I../../../../../../components/softdevice/s110/headers 73 | INC_PATHS += -I../../../../../../components/libraries/timer 74 | INC_PATHS += -I../../../../../bsp 75 | INC_PATHS += -I../../../../../../components/device 76 | INC_PATHS += -I../../../../../../components/softdevice/common/softdevice_handler 77 | INC_PATHS += -I../../../../../../components/drivers_nrf/hal 78 | INC_PATHS += -I../../../../../../components/drivers_nrf/ble_flash 79 | INC_PATHS += -I../../../../../../components/drivers_nrf/pstorage 80 | INC_PATHS += -I../../../../../../components/libraries/button 81 | 82 | OBJECT_DIRECTORY = _build 83 | LISTING_DIRECTORY = $(OBJECT_DIRECTORY) 84 | OUTPUT_BINARY_DIRECTORY = $(OBJECT_DIRECTORY) 85 | 86 | # Sorting removes duplicates 87 | BUILD_DIRECTORIES := $(sort $(OBJECT_DIRECTORY) $(OUTPUT_BINARY_DIRECTORY) $(LISTING_DIRECTORY) ) 88 | 89 | #flags common to all targets 90 | CFLAGS = -DSOFTDEVICE_PRESENT 91 | CFLAGS += -DNRF51 92 | CFLAGS += -DS110 93 | CFLAGS += -DBOARD_PCA10028 94 | CFLAGS += -DBLE_STACK_SUPPORT_REQD 95 | CFLAGS += -mcpu=cortex-m0 96 | CFLAGS += -mthumb -mabi=aapcs --std=gnu99 97 | CFLAGS += -Wall -O3 98 | CFLAGS += -mfloat-abi=soft 99 | # keep every function in separate section. This will allow linker to dump unused functions 100 | CFLAGS += -ffunction-sections -fdata-sections -fno-strict-aliasing 101 | CFLAGS += -flto -fno-builtin 102 | 103 | # keep every function in separate section. This will allow linker to dump unused functions 104 | LDFLAGS += -Xlinker -Map=$(LISTING_DIRECTORY)/$(OUTPUT_FILENAME).map 105 | LDFLAGS += -mthumb -mabi=aapcs -L $(TEMPLATE_PATH) -T$(LINKER_SCRIPT) 106 | LDFLAGS += -mcpu=cortex-m0 107 | # let linker to dump unused sections 108 | LDFLAGS += -Wl,--gc-sections 109 | # use newlib in nano version 110 | LDFLAGS += --specs=nano.specs -lc -lnosys 111 | 112 | # Assembler flags 113 | ASMFLAGS += -x assembler-with-cpp 114 | ASMFLAGS += -DSOFTDEVICE_PRESENT 115 | ASMFLAGS += -DNRF51 116 | ASMFLAGS += -DS110 117 | ASMFLAGS += -DBOARD_PCA10028 118 | ASMFLAGS += -DBLE_STACK_SUPPORT_REQD 119 | #default target - first one defined 120 | default: clean nrf51422_xxac_s110 121 | 122 | #building all targets 123 | all: clean 124 | $(NO_ECHO)$(MAKE) -f $(MAKEFILE_NAME) -C $(MAKEFILE_DIR) -e cleanobj 125 | $(NO_ECHO)$(MAKE) -f $(MAKEFILE_NAME) -C $(MAKEFILE_DIR) -e nrf51422_xxac_s110 126 | 127 | #target for printing all targets 128 | help: 129 | @echo following targets are available: 130 | @echo nrf51422_xxac_s110 131 | @echo flash_softdevice 132 | 133 | 134 | C_SOURCE_FILE_NAMES = $(notdir $(C_SOURCE_FILES)) 135 | C_PATHS = $(call remduplicates, $(dir $(C_SOURCE_FILES) ) ) 136 | C_OBJECTS = $(addprefix $(OBJECT_DIRECTORY)/, $(C_SOURCE_FILE_NAMES:.c=.o) ) 137 | 138 | ASM_SOURCE_FILE_NAMES = $(notdir $(ASM_SOURCE_FILES)) 139 | ASM_PATHS = $(call remduplicates, $(dir $(ASM_SOURCE_FILES) )) 140 | ASM_OBJECTS = $(addprefix $(OBJECT_DIRECTORY)/, $(ASM_SOURCE_FILE_NAMES:.s=.o) ) 141 | 142 | vpath %.c $(C_PATHS) 143 | vpath %.s $(ASM_PATHS) 144 | 145 | OBJECTS = $(C_OBJECTS) $(ASM_OBJECTS) 146 | 147 | nrf51422_xxac_s110: OUTPUT_FILENAME := nrf51422_xxac_s110 148 | nrf51422_xxac_s110: LINKER_SCRIPT=ble_app_template_gcc_nrf51.ld 149 | nrf51422_xxac_s110: $(BUILD_DIRECTORIES) $(OBJECTS) 150 | @echo Linking target: $(OUTPUT_FILENAME).out 151 | $(NO_ECHO)$(CC) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out 152 | $(NO_ECHO)$(MAKE) -f $(MAKEFILE_NAME) -C $(MAKEFILE_DIR) -e finalize 153 | 154 | ## Create build directories 155 | $(BUILD_DIRECTORIES): 156 | echo $(MAKEFILE_NAME) 157 | $(MK) $@ 158 | 159 | # Create objects from C SRC files 160 | $(OBJECT_DIRECTORY)/%.o: %.c 161 | @echo Compiling file: $(notdir $<) 162 | $(NO_ECHO)$(CC) $(CFLAGS) $(INC_PATHS) -c -o $@ $< 163 | 164 | # Assemble files 165 | $(OBJECT_DIRECTORY)/%.o: %.s 166 | @echo Compiling file: $(notdir $<) 167 | $(NO_ECHO)$(CC) $(ASMFLAGS) $(INC_PATHS) -c -o $@ $< 168 | 169 | 170 | # Link 171 | $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out: $(BUILD_DIRECTORIES) $(OBJECTS) 172 | @echo Linking target: $(OUTPUT_FILENAME).out 173 | $(NO_ECHO)$(CC) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out 174 | 175 | 176 | ## Create binary .bin file from the .out file 177 | $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).bin: $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out 178 | @echo Preparing: $(OUTPUT_FILENAME).bin 179 | $(NO_ECHO)$(OBJCOPY) -O binary $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).bin 180 | 181 | ## Create binary .hex file from the .out file 182 | $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).hex: $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out 183 | @echo Preparing: $(OUTPUT_FILENAME).hex 184 | $(NO_ECHO)$(OBJCOPY) -O ihex $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).hex 185 | 186 | finalize: genbin genhex echosize 187 | 188 | genbin: 189 | @echo Preparing: $(OUTPUT_FILENAME).bin 190 | $(NO_ECHO)$(OBJCOPY) -O binary $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).bin 191 | 192 | ## Create binary .hex file from the .out file 193 | genhex: 194 | @echo Preparing: $(OUTPUT_FILENAME).hex 195 | $(NO_ECHO)$(OBJCOPY) -O ihex $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).hex 196 | 197 | echosize: 198 | -@echo "" 199 | $(NO_ECHO)$(SIZE) $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out 200 | -@echo "" 201 | 202 | clean: 203 | $(RM) $(BUILD_DIRECTORIES) 204 | 205 | cleanobj: 206 | $(RM) $(BUILD_DIRECTORIES)/*.o 207 | 208 | flash: $(MAKECMDGOALS) 209 | @echo Flashing: $(OUTPUT_BINARY_DIRECTORY)/$<.hex 210 | nrfjprog --reset --program $(OUTPUT_BINARY_DIRECTORY)/$<.hex 211 | 212 | ## Flash softdevice 213 | flash_softdevice: 214 | @echo Flashing: s110_softdevice.hex 215 | nrfjprog --reset --program ../../../../../../components/softdevice/s110/hex/s110_softdevice.hex 216 | -------------------------------------------------------------------------------- /arm/ble_app_lbs.uvoptx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.0 5 | 6 |
### uVision Project, (C) Keil Software
7 | 8 | 9 | *.c 10 | *.s*; *.src; *.a* 11 | *.obj 12 | *.lib 13 | *.txt; *.h; *.inc 14 | *.plm 15 | *.cpp 16 | 17 | 18 | 19 | 0 20 | 0 21 | 22 | 23 | 24 | nrf51822_xxaa_s110 (256K) 25 | 0x4 26 | ARM-ADS 27 | 28 | 16000000 29 | 30 | 1 31 | 1 32 | 0 33 | 1 34 | 35 | 36 | 1 37 | 65535 38 | 0 39 | 0 40 | 0 41 | 42 | 43 | 79 44 | 66 45 | 8 46 | .\_build\ 47 | 48 | 49 | 1 50 | 1 51 | 1 52 | 0 53 | 1 54 | 1 55 | 0 56 | 1 57 | 0 58 | 0 59 | 0 60 | 0 61 | 62 | 63 | 1 64 | 1 65 | 1 66 | 1 67 | 1 68 | 1 69 | 1 70 | 0 71 | 0 72 | 73 | 74 | 1 75 | 0 76 | 1 77 | 78 | 5 79 | 80 | 0 81 | 1 82 | 1 83 | 1 84 | 1 85 | 1 86 | 1 87 | 1 88 | 1 89 | 1 90 | 1 91 | 1 92 | 1 93 | 1 94 | 0 95 | 1 96 | 0 97 | 1 98 | 1 99 | 0 100 | 0 101 | 6 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | Segger\JL2CM3.dll 113 | 114 | 115 | 116 | 0 117 | DLGTARM 118 | (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0) 119 | 120 | 121 | 0 122 | ARMDBGFLAGS 123 | 124 | 125 | 126 | 0 127 | UL2CM3 128 | UL2CM3(-S0 -C0 -P0 ) -FN1 -FC1000 -FD20000000 -FF0nrf51xxx -FL0200000 -FS00 -FP0($$Device:nRF51822_xxAA$Flash\nrf51xxx.flm) 129 | 130 | 131 | 0 132 | JL2CM3 133 | -U518108710 -O78 -S0 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8004 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nrf51xxx.flm -FS00 -FL0200000 -FP0($$Device:nRF51822_xxAA$Flash\nrf51xxx.flm) 134 | 135 | 136 | 137 | 138 | 0 139 | 0 140 | 188 141 | 1 142 |
95680
143 | 0 144 | 0 145 | 0 146 | 0 147 | 0 148 | 1 149 | ..\..\..\..\components\libraries\scheduler\app_scheduler.c 150 | 151 | \\ble_app_lbs\../../../../components/libraries/scheduler/app_scheduler.c\188 152 |
153 |
154 | 155 | 156 | 0 157 | 1 158 | p_lbs 159 | 160 | 161 | 1 162 | 1 163 | base_uuid 164 | 165 | 166 | 167 | 0 168 | 169 | 170 | 0 171 | 0 172 | 1 173 | 0 174 | 0 175 | 0 176 | 0 177 | 1 178 | 0 179 | 0 180 | 0 181 | 0 182 | 0 183 | 0 184 | 0 185 | 0 186 | 0 187 | 0 188 | 0 189 | 0 190 | 0 191 | 0 192 | 0 193 | 0 194 | 195 | 196 | 197 |
198 |
199 | 200 | 201 | nrf51822_xxab_s110 (128K) 202 | 0x4 203 | ARM-ADS 204 | 205 | 16000000 206 | 207 | 0 208 | 1 209 | 1 210 | 0 211 | 212 | 213 | 1 214 | 65535 215 | 0 216 | 0 217 | 0 218 | 219 | 220 | 79 221 | 66 222 | 8 223 | .\_build\ 224 | 225 | 226 | 1 227 | 1 228 | 1 229 | 0 230 | 1 231 | 1 232 | 0 233 | 1 234 | 0 235 | 0 236 | 0 237 | 0 238 | 239 | 240 | 1 241 | 1 242 | 1 243 | 1 244 | 1 245 | 1 246 | 1 247 | 0 248 | 0 249 | 250 | 251 | 0 252 | 0 253 | 0 254 | 255 | 0 256 | 257 | 0 258 | 1 259 | 1 260 | 1 261 | 1 262 | 1 263 | 1 264 | 1 265 | 1 266 | 1 267 | 0 268 | 1 269 | 1 270 | 1 271 | 0 272 | 1 273 | 0 274 | 1 275 | 1 276 | 0 277 | 0 278 | 7 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | Segger\JL2CM3.dll 290 | 291 | 292 | 293 | 0 294 | JL2CM3 295 | -U -O78 -S0 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -TO18 -TC10000000 -TP21 -TDS8004 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC800 -FN1 -FP0($$Device:nRF51822_xxAA$Flash\nrf51xxx.flm) -FF0nrf51xxx -FS00 -FL0200000 296 | 297 | 298 | 299 | 300 | 0 301 | 0 302 | 103 303 | 1 304 |
0
305 | 0 306 | 0 307 | 0 308 | 0 309 | 0 310 | 0 311 | C:\Nordic Semiconductor\Misc\Training\51822\nrf51822v6_0\Board\pca10001\s110\nrf51-ble-app-lbs-master\main.c 312 | 313 | 314 |
315 | 316 | 1 317 | 0 318 | 188 319 | 1 320 |
0
321 | 0 322 | 0 323 | 0 324 | 0 325 | 0 326 | 0 327 | ..\..\..\..\components\libraries\scheduler\app_scheduler.c 328 | 329 | 330 |
331 |
332 | 333 | 0 334 | 335 | 336 | 0 337 | 0 338 | 0 339 | 0 340 | 0 341 | 0 342 | 0 343 | 0 344 | 0 345 | 0 346 | 0 347 | 0 348 | 0 349 | 0 350 | 0 351 | 0 352 | 0 353 | 0 354 | 0 355 | 0 356 | 0 357 | 0 358 | 0 359 | 0 360 | 361 | 362 | 363 |
364 |
365 | 366 | 367 | Startup Code 368 | 1 369 | 0 370 | 0 371 | 0 372 | 373 | 1 374 | 1 375 | 1 376 | 0 377 | 0 378 | 0 379 | 0 380 | ..\..\..\..\components\toolchain\system_nrf51.c 381 | system_nrf51.c 382 | 0 383 | 0 384 | 385 | 386 | 1 387 | 2 388 | 2 389 | 0 390 | 0 391 | 0 392 | 0 393 | ..\..\..\..\components\toolchain\arm\arm_startup_nrf51.s 394 | arm_startup_nrf51.s 395 | 0 396 | 0 397 | 398 | 399 | 400 | 401 | Source Code 402 | 1 403 | 0 404 | 0 405 | 0 406 | 407 | 2 408 | 3 409 | 1 410 | 0 411 | 0 412 | 0 413 | 0 414 | .\..\main.c 415 | main.c 416 | 0 417 | 0 418 | 419 | 420 | 421 | 422 | Services 423 | 1 424 | 0 425 | 0 426 | 0 427 | 428 | 3 429 | 4 430 | 1 431 | 0 432 | 0 433 | 0 434 | 0 435 | ..\ble_lbs.c 436 | ble_lbs.c 437 | 0 438 | 0 439 | 440 | 441 | 3 442 | 5 443 | 1 444 | 0 445 | 0 446 | 0 447 | 0 448 | ..\..\..\..\components\ble\common\ble_srv_common.c 449 | ble_srv_common.c 450 | 0 451 | 0 452 | 453 | 454 | 455 | 456 | Libraries 457 | 1 458 | 0 459 | 0 460 | 0 461 | 462 | 4 463 | 6 464 | 1 465 | 0 466 | 0 467 | 0 468 | 0 469 | ..\..\..\..\components\ble\ble_error_log\ble_error_log.c 470 | ble_error_log.c 471 | 0 472 | 0 473 | 474 | 475 | 4 476 | 7 477 | 1 478 | 0 479 | 0 480 | 0 481 | 0 482 | ..\..\..\..\components\ble\ble_debug_assert_handler\ble_debug_assert_handler.c 483 | ble_debug_assert_handler.c 484 | 0 485 | 0 486 | 487 | 488 | 4 489 | 8 490 | 1 491 | 0 492 | 0 493 | 0 494 | 0 495 | ..\..\..\..\components\ble\common\ble_conn_params.c 496 | ble_conn_params.c 497 | 0 498 | 0 499 | 500 | 501 | 4 502 | 9 503 | 1 504 | 0 505 | 0 506 | 0 507 | 0 508 | ..\..\..\..\components\softdevice\common\softdevice_handler\softdevice_handler.c 509 | softdevice_handler.c 510 | 0 511 | 0 512 | 513 | 514 | 4 515 | 10 516 | 1 517 | 0 518 | 0 519 | 0 520 | 0 521 | ..\..\..\..\components\libraries\button\app_button.c 522 | app_button.c 523 | 0 524 | 0 525 | 526 | 527 | 4 528 | 11 529 | 1 530 | 0 531 | 0 532 | 0 533 | 0 534 | ..\..\..\..\components\libraries\scheduler\app_scheduler.c 535 | app_scheduler.c 536 | 0 537 | 0 538 | 539 | 540 | 4 541 | 12 542 | 1 543 | 0 544 | 0 545 | 0 546 | 0 547 | ..\..\..\..\components\ble\common\ble_advdata.c 548 | ble_advdata.c 549 | 0 550 | 0 551 | 552 | 553 | 4 554 | 13 555 | 1 556 | 0 557 | 0 558 | 0 559 | 0 560 | ..\..\..\..\components\libraries\crc16\crc16.c 561 | crc16.c 562 | 0 563 | 0 564 | 565 | 566 | 4 567 | 14 568 | 1 569 | 0 570 | 0 571 | 0 572 | 0 573 | ..\..\..\..\components\drivers_nrf\pstorage\pstorage.c 574 | pstorage.c 575 | 0 576 | 0 577 | 578 | 579 | 4 580 | 15 581 | 1 582 | 0 583 | 0 584 | 0 585 | 0 586 | ..\..\..\..\components\libraries\gpiote\app_gpiote.c 587 | app_gpiote.c 588 | 0 589 | 0 590 | 591 | 592 | 4 593 | 16 594 | 1 595 | 0 596 | 0 597 | 0 598 | 0 599 | ..\..\..\..\components\libraries\timer\app_timer.c 600 | app_timer.c 601 | 0 602 | 0 603 | 604 | 605 | 4 606 | 17 607 | 1 608 | 0 609 | 0 610 | 0 611 | 0 612 | ..\..\..\..\components\libraries\timer\app_timer_appsh.c 613 | app_timer_appsh.c 614 | 0 615 | 0 616 | 617 | 618 | 619 |
620 | -------------------------------------------------------------------------------- /arm/ble_app_lbs.uvopt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.0 5 | 6 |
### uVision Project, (C) Keil Software
7 | 8 | 9 | *.c 10 | *.s*; *.src; *.a* 11 | *.obj 12 | *.lib 13 | *.txt; *.h; *.inc 14 | *.plm 15 | *.cpp 16 | 17 | 18 | 19 | 0 20 | 0 21 | 22 | 23 | 24 | nrf51822_xxaa_s110 (256K) 25 | 0x4 26 | ARM-ADS 27 | 28 | 16000000 29 | 30 | 1 31 | 1 32 | 0 33 | 1 34 | 35 | 36 | 1 37 | 65535 38 | 0 39 | 0 40 | 0 41 | 42 | 43 | 79 44 | 66 45 | 8 46 | .\_build\ 47 | 48 | 49 | 1 50 | 1 51 | 1 52 | 0 53 | 1 54 | 1 55 | 0 56 | 1 57 | 0 58 | 0 59 | 0 60 | 0 61 | 62 | 63 | 1 64 | 1 65 | 1 66 | 1 67 | 1 68 | 1 69 | 1 70 | 0 71 | 0 72 | 73 | 74 | 1 75 | 0 76 | 1 77 | 78 | 0 79 | 80 | 0 81 | 1 82 | 1 83 | 1 84 | 1 85 | 1 86 | 1 87 | 1 88 | 1 89 | 1 90 | 1 91 | 1 92 | 1 93 | 1 94 | 0 95 | 1 96 | 0 97 | 1 98 | 1 99 | 0 100 | 0 101 | 6 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | Segger\JL2CM3.dll 113 | 114 | 115 | 116 | 0 117 | DLGTARM 118 | (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0) 119 | 120 | 121 | 0 122 | ARMDBGFLAGS 123 | 124 | 125 | 126 | 0 127 | DLGUARM 128 | 129 | 130 | 0 131 | UL2CM3 132 | UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0nrf51xxx -FS00 -FL0200000 -FP0($$Device:nRF51822_xxAA$Flash\nrf51xxx.flm)) 133 | 134 | 135 | 0 136 | JL2CM3 137 | -U681481358 -O78 -S0 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8004 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nrf51xxx.flm -FS00 -FL0200000 -FP0($$Device:nRF51822_xxAA$Flash\nrf51xxx.flm) 138 | 139 | 140 | 141 | 142 | 0 143 | 0 144 | 188 145 | 1 146 |
95680
147 | 0 148 | 0 149 | 0 150 | 0 151 | 0 152 | 1 153 | ..\..\..\..\components\libraries\scheduler\app_scheduler.c 154 | 155 | \\ble_app_lbs\../../../../components/libraries/scheduler/app_scheduler.c\188 156 |
157 |
158 | 159 | 160 | 0 161 | 1 162 | p_lbs 163 | 164 | 165 | 1 166 | 1 167 | base_uuid 168 | 169 | 170 | 171 | 0 172 | 173 | 174 | 0 175 | 0 176 | 1 177 | 0 178 | 0 179 | 0 180 | 0 181 | 1 182 | 0 183 | 0 184 | 0 185 | 0 186 | 0 187 | 0 188 | 0 189 | 0 190 | 0 191 | 0 192 | 0 193 | 0 194 | 0 195 | 0 196 | 0 197 | 0 198 | 199 | 200 | 201 |
202 |
203 | 204 | 205 | nrf51822_xxab_s110 (128K) 206 | 0x4 207 | ARM-ADS 208 | 209 | 16000000 210 | 211 | 0 212 | 1 213 | 1 214 | 0 215 | 216 | 217 | 1 218 | 65535 219 | 0 220 | 0 221 | 0 222 | 223 | 224 | 79 225 | 66 226 | 8 227 | .\_build\ 228 | 229 | 230 | 1 231 | 1 232 | 1 233 | 0 234 | 1 235 | 1 236 | 0 237 | 1 238 | 0 239 | 0 240 | 0 241 | 0 242 | 243 | 244 | 1 245 | 1 246 | 1 247 | 1 248 | 1 249 | 1 250 | 1 251 | 0 252 | 0 253 | 254 | 255 | 0 256 | 0 257 | 0 258 | 259 | 0 260 | 261 | 0 262 | 1 263 | 1 264 | 1 265 | 1 266 | 1 267 | 1 268 | 1 269 | 1 270 | 1 271 | 0 272 | 1 273 | 1 274 | 1 275 | 0 276 | 1 277 | 0 278 | 1 279 | 1 280 | 0 281 | 0 282 | 7 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | Segger\JL2CM3.dll 294 | 295 | 296 | 297 | 0 298 | JL2CM3 299 | -U -O78 -S0 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -TO18 -TC10000000 -TP21 -TDS8004 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC800 -FN1 -FP0($$Device:nRF51822_xxAA$Flash\nrf51xxx.flm) -FF0nrf51xxx -FS00 -FL0200000 300 | 301 | 302 | 303 | 304 | 0 305 | 0 306 | 103 307 | 1 308 |
0
309 | 0 310 | 0 311 | 0 312 | 0 313 | 0 314 | 0 315 | C:\Nordic Semiconductor\Misc\Training\51822\nrf51822v6_0\Board\pca10001\s110\nrf51-ble-app-lbs-master\main.c 316 | 317 | 318 |
319 | 320 | 1 321 | 0 322 | 188 323 | 1 324 |
0
325 | 0 326 | 0 327 | 0 328 | 0 329 | 0 330 | 0 331 | ..\..\..\..\components\libraries\scheduler\app_scheduler.c 332 | 333 | 334 |
335 |
336 | 337 | 0 338 | 339 | 340 | 0 341 | 0 342 | 0 343 | 0 344 | 0 345 | 0 346 | 0 347 | 0 348 | 0 349 | 0 350 | 0 351 | 0 352 | 0 353 | 0 354 | 0 355 | 0 356 | 0 357 | 0 358 | 0 359 | 0 360 | 0 361 | 0 362 | 0 363 | 0 364 | 365 | 366 | 367 |
368 |
369 | 370 | 371 | Startup Code 372 | 1 373 | 0 374 | 0 375 | 0 376 | 377 | 1 378 | 1 379 | 1 380 | 0 381 | 0 382 | 0 383 | 0 384 | ..\..\..\..\components\toolchain\system_nrf51.c 385 | system_nrf51.c 386 | 0 387 | 0 388 | 389 | 390 | 1 391 | 2 392 | 2 393 | 0 394 | 0 395 | 0 396 | 0 397 | ..\..\..\..\components\toolchain\arm\arm_startup_nrf51.s 398 | arm_startup_nrf51.s 399 | 0 400 | 0 401 | 402 | 403 | 404 | 405 | Source Code 406 | 1 407 | 0 408 | 0 409 | 0 410 | 411 | 2 412 | 3 413 | 1 414 | 0 415 | 0 416 | 0 417 | 0 418 | .\..\main.c 419 | main.c 420 | 0 421 | 0 422 | 423 | 424 | 425 | 426 | Services 427 | 1 428 | 0 429 | 0 430 | 0 431 | 432 | 3 433 | 4 434 | 1 435 | 0 436 | 0 437 | 0 438 | 0 439 | ..\ble_lbs.c 440 | ble_lbs.c 441 | 0 442 | 0 443 | 444 | 445 | 3 446 | 5 447 | 1 448 | 0 449 | 0 450 | 0 451 | 0 452 | ..\..\..\..\components\ble\common\ble_srv_common.c 453 | ble_srv_common.c 454 | 0 455 | 0 456 | 457 | 458 | 459 | 460 | Libraries 461 | 1 462 | 0 463 | 0 464 | 0 465 | 466 | 4 467 | 6 468 | 1 469 | 0 470 | 0 471 | 0 472 | 0 473 | ..\..\..\..\components\ble\ble_error_log\ble_error_log.c 474 | ble_error_log.c 475 | 0 476 | 0 477 | 478 | 479 | 4 480 | 7 481 | 1 482 | 0 483 | 0 484 | 0 485 | 0 486 | ..\..\..\..\components\ble\ble_debug_assert_handler\ble_debug_assert_handler.c 487 | ble_debug_assert_handler.c 488 | 0 489 | 0 490 | 491 | 492 | 4 493 | 8 494 | 1 495 | 0 496 | 0 497 | 0 498 | 0 499 | ..\..\..\..\components\ble\common\ble_conn_params.c 500 | ble_conn_params.c 501 | 0 502 | 0 503 | 504 | 505 | 4 506 | 9 507 | 1 508 | 0 509 | 0 510 | 0 511 | 0 512 | ..\..\..\..\components\softdevice\common\softdevice_handler\softdevice_handler.c 513 | softdevice_handler.c 514 | 0 515 | 0 516 | 517 | 518 | 4 519 | 10 520 | 1 521 | 0 522 | 0 523 | 0 524 | 0 525 | ..\..\..\..\components\libraries\button\app_button.c 526 | app_button.c 527 | 0 528 | 0 529 | 530 | 531 | 4 532 | 11 533 | 1 534 | 0 535 | 0 536 | 0 537 | 0 538 | ..\..\..\..\components\libraries\scheduler\app_scheduler.c 539 | app_scheduler.c 540 | 0 541 | 0 542 | 543 | 544 | 4 545 | 12 546 | 1 547 | 0 548 | 0 549 | 0 550 | 0 551 | ..\..\..\..\components\ble\common\ble_advdata.c 552 | ble_advdata.c 553 | 0 554 | 0 555 | 556 | 557 | 4 558 | 13 559 | 1 560 | 0 561 | 0 562 | 0 563 | 0 564 | ..\..\..\..\components\libraries\crc16\crc16.c 565 | crc16.c 566 | 0 567 | 0 568 | 569 | 570 | 4 571 | 14 572 | 1 573 | 0 574 | 0 575 | 0 576 | 0 577 | ..\..\..\..\components\drivers_nrf\pstorage\pstorage.c 578 | pstorage.c 579 | 0 580 | 0 581 | 582 | 583 | 4 584 | 15 585 | 1 586 | 0 587 | 0 588 | 0 589 | 0 590 | ..\..\..\..\components\libraries\gpiote\app_gpiote.c 591 | app_gpiote.c 592 | 0 593 | 0 594 | 595 | 596 | 4 597 | 16 598 | 1 599 | 0 600 | 0 601 | 0 602 | 0 603 | ..\..\..\..\components\libraries\timer\app_timer.c 604 | app_timer.c 605 | 0 606 | 0 607 | 608 | 609 | 4 610 | 17 611 | 1 612 | 0 613 | 0 614 | 0 615 | 0 616 | ..\..\..\..\components\libraries\timer\app_timer_appsh.c 617 | app_timer_appsh.c 618 | 0 619 | 0 620 | 621 | 622 | 623 |
624 | -------------------------------------------------------------------------------- /arm/ble_app_lbs.uvproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.1 5 | 6 |
### uVision Project, (C) Keil Software
7 | 8 | 9 | 10 | nrf51822_xxaa_s110 (256K) 11 | 0x4 12 | ARM-ADS 13 | 14 | 15 | nRF51822_xxAA 16 | Nordic Semiconductor 17 | IRAM(0x20000000-0x20003FFF) IROM(0-0x3FFFF) CLOCK(16000000) CPUTYPE("Cortex-M0") ESEL ELITTLE 18 | 19 | "Device\Nordic\nRF51822\Source\templates\arm\arm_startup_nrf51.s"("Nordic Semiconductor nRF51822 Startup Code") 20 | UL2CM3(-UM0364FCE -O78 -S0 -C0 -TO18 -TC16000000 -TP21 -TDS800D -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000) 21 | 0 22 | nrf.h 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | SFD\Nordic\nRF51\nrf51822.sfr 33 | 0 34 | 0 35 | 36 | 37 | 38 | ..\Device\Nordic\nRF51822\Include\ 39 | ..\Device\Nordic\nRF51822\Include\ 40 | 41 | 0 42 | 0 43 | 0 44 | 0 45 | 1 46 | 47 | .\_build\ 48 | ble_app_lbs 49 | 1 50 | 0 51 | 1 52 | 1 53 | 1 54 | .\_build\ 55 | 1 56 | 0 57 | 0 58 | 59 | 0 60 | 0 61 | 62 | 63 | 0 64 | 0 65 | 0 66 | 0 67 | 68 | 69 | 0 70 | 0 71 | 72 | 73 | 0 74 | 0 75 | 0 76 | 0 77 | 78 | 79 | 0 80 | 0 81 | 82 | 83 | 0 84 | 0 85 | 86 | 0 87 | 88 | 89 | 90 | 0 91 | 0 92 | 0 93 | 0 94 | 0 95 | 1 96 | 0 97 | 0 98 | 0 99 | 0 100 | 3 101 | 102 | 103 | 1 104 | 105 | 106 | 107 | 108 | 109 | 110 | SARMCM3.DLL 111 | 112 | TARMCM1.DLL 113 | -pCM0 114 | 115 | 116 | 117 | 1 118 | 0 119 | 0 120 | 0 121 | 16 122 | 123 | 124 | 0 125 | 1 126 | 1 127 | 1 128 | 1 129 | 1 130 | 1 131 | 1 132 | 0 133 | 1 134 | 135 | 136 | 1 137 | 1 138 | 1 139 | 1 140 | 1 141 | 1 142 | 0 143 | 1 144 | 0 145 | 1 146 | 147 | 0 148 | 6 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | Segger\JL2CM3.dll 163 | 164 | 165 | 166 | 167 | 1 168 | 0 169 | 0 170 | 1 171 | 1 172 | 4099 173 | 174 | 1 175 | Segger\JL2CM3.dll 176 | "" () 177 | 178 | 179 | 180 | 181 | 0 182 | 183 | 184 | 185 | 0 186 | 1 187 | 1 188 | 1 189 | 1 190 | 1 191 | 1 192 | 1 193 | 0 194 | 1 195 | 1 196 | 0 197 | 1 198 | 1 199 | 0 200 | 0 201 | 1 202 | 1 203 | 1 204 | 1 205 | 1 206 | 1 207 | 1 208 | 1 209 | 1 210 | 0 211 | 0 212 | "Cortex-M0" 213 | 214 | 0 215 | 0 216 | 0 217 | 1 218 | 1 219 | 0 220 | 0 221 | 0 222 | 0 223 | 0 224 | 8 225 | 0 226 | 1 227 | 0 228 | 3 229 | 3 230 | 0 231 | 0 232 | 0 233 | 0 234 | 0 235 | 0 236 | 0 237 | 0 238 | 0 239 | 0 240 | 1 241 | 0 242 | 0 243 | 0 244 | 0 245 | 1 246 | 0 247 | 248 | 249 | 0 250 | 0x0 251 | 0x0 252 | 253 | 254 | 0 255 | 0x0 256 | 0x0 257 | 258 | 259 | 0 260 | 0x0 261 | 0x0 262 | 263 | 264 | 0 265 | 0x0 266 | 0x0 267 | 268 | 269 | 0 270 | 0x0 271 | 0x0 272 | 273 | 274 | 0 275 | 0x0 276 | 0x0 277 | 278 | 279 | 0 280 | 0x20000000 281 | 0x4000 282 | 283 | 284 | 1 285 | 0x0 286 | 0x40000 287 | 288 | 289 | 0 290 | 0x0 291 | 0x0 292 | 293 | 294 | 1 295 | 0x0 296 | 0x0 297 | 298 | 299 | 1 300 | 0x0 301 | 0x0 302 | 303 | 304 | 1 305 | 0x0 306 | 0x0 307 | 308 | 309 | 1 310 | 0x18000 311 | 0x28000 312 | 313 | 314 | 1 315 | 0x0 316 | 0x0 317 | 318 | 319 | 0 320 | 0x0 321 | 0x0 322 | 323 | 324 | 0 325 | 0x0 326 | 0x0 327 | 328 | 329 | 0 330 | 0x0 331 | 0x0 332 | 333 | 334 | 0 335 | 0x20002000 336 | 0x2000 337 | 338 | 339 | 0 340 | 0x0 341 | 0x0 342 | 343 | 344 | 345 | 346 | 347 | 1 348 | 1 349 | 0 350 | 0 351 | 0 352 | 0 353 | 1 354 | 0 355 | 0 356 | 0 357 | 2 358 | 0 359 | 0 360 | 0 361 | 0 362 | 363 | --c99 364 | NRF51 DEBUG_NRF_USER BLE_STACK_SUPPORT_REQD BOARD_PCA10028 SOFTDEVICE_PRESENT 365 | 366 | ..\config;..\..\..\..\components\toolchain;..\..\..\..\components\libraries\button;..\..\..\..\components\libraries\scheduler;..\..\..\..\components\softdevice\s110\headers;..\..\..\..\components\ble\common;..\..\..\bsp;..\..\..\..\components\libraries\util;..\..\..\..\components\libraries\timer;..\..\..\..\components\libraries\gpiote;..\..\..\..\components\drivers_nrf\hal;..\..\..\..\components\softdevice\common\softdevice_handler;..\..\..\..\components\ble\ble_debug_assert_handler;..\..\..\..\components\ble\ble_error_log;..\..\..\..\components\drivers_nrf\pstorage;..\;..\..\..\..\components\drivers_nrf\ble_flash 367 | 368 | 369 | 370 | 1 371 | 0 372 | 0 373 | 0 374 | 0 375 | 0 376 | 0 377 | 0 378 | 0 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 1 388 | 0 389 | 0 390 | 0 391 | 1 392 | 0 393 | 0x00000000 394 | 0x20000000 395 | 396 | ..\scatter.sct 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | Startup Code 408 | 409 | 410 | system_nrf51.c 411 | 1 412 | ..\..\..\..\components\toolchain\system_nrf51.c 413 | 414 | 415 | arm_startup_nrf51.s 416 | 2 417 | ..\..\..\..\components\toolchain\arm\arm_startup_nrf51.s 418 | 419 | 420 | 421 | 422 | Source Code 423 | 424 | 425 | main.c 426 | 1 427 | .\..\main.c 428 | 429 | 430 | 431 | 432 | Services 433 | 434 | 435 | ble_lbs.c 436 | 1 437 | ..\ble_lbs.c 438 | 439 | 440 | ble_srv_common.c 441 | 1 442 | ..\..\..\..\components\ble\common\ble_srv_common.c 443 | 444 | 445 | 446 | 447 | Libraries 448 | 449 | 450 | ble_error_log.c 451 | 1 452 | ..\..\..\..\components\ble\ble_error_log\ble_error_log.c 453 | 454 | 455 | ble_debug_assert_handler.c 456 | 1 457 | ..\..\..\..\components\ble\ble_debug_assert_handler\ble_debug_assert_handler.c 458 | 459 | 460 | ble_conn_params.c 461 | 1 462 | ..\..\..\..\components\ble\common\ble_conn_params.c 463 | 464 | 465 | softdevice_handler.c 466 | 1 467 | ..\..\..\..\components\softdevice\common\softdevice_handler\softdevice_handler.c 468 | 469 | 470 | app_button.c 471 | 1 472 | ..\..\..\..\components\libraries\button\app_button.c 473 | 474 | 475 | app_scheduler.c 476 | 1 477 | ..\..\..\..\components\libraries\scheduler\app_scheduler.c 478 | 479 | 480 | ble_advdata.c 481 | 1 482 | ..\..\..\..\components\ble\common\ble_advdata.c 483 | 484 | 485 | crc16.c 486 | 1 487 | ..\..\..\..\components\libraries\crc16\crc16.c 488 | 489 | 490 | pstorage.c 491 | 1 492 | ..\..\..\..\components\drivers_nrf\pstorage\pstorage.c 493 | 494 | 495 | app_gpiote.c 496 | 1 497 | ..\..\..\..\components\libraries\gpiote\app_gpiote.c 498 | 499 | 500 | app_timer.c 501 | 1 502 | ..\..\..\..\components\libraries\timer\app_timer.c 503 | 504 | 505 | app_timer_appsh.c 506 | 1 507 | ..\..\..\..\components\libraries\timer\app_timer_appsh.c 508 | 509 | 510 | 511 | 512 | 513 | 514 | nrf51822_xxab_s110 (128K) 515 | 0x4 516 | ARM-ADS 517 | 518 | 519 | nRF51822_xxAB 520 | Nordic Semiconductor 521 | IRAM(0x20000000-0x20003FFF) IROM(0-0x3FFFF) CLOCK(16000000) CPUTYPE("Cortex-M0") ESEL ELITTLE 522 | 523 | "Device\Nordic\nRF51822\Source\templates\arm\arm_startup_nrf51.s"("Nordic Semiconductor nRF51822 Startup Code") 524 | UL2CM3(-UM0364FCE -O78 -S0 -C0 -TO18 -TC16000000 -TP21 -TDS800D -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000) 525 | 0 526 | nrf.h 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | SFD\Nordic\nRF51\nrf51822.sfr 537 | 0 538 | 0 539 | 540 | 541 | 542 | ..\Device\Nordic\nRF51822\Include\ 543 | ..\Device\Nordic\nRF51822\Include\ 544 | 545 | 0 546 | 0 547 | 0 548 | 0 549 | 1 550 | 551 | .\_build\ 552 | ble_app_lbs 553 | 1 554 | 0 555 | 1 556 | 1 557 | 1 558 | .\_build\ 559 | 1 560 | 0 561 | 0 562 | 563 | 0 564 | 0 565 | 566 | 567 | 0 568 | 0 569 | 0 570 | 0 571 | 572 | 573 | 0 574 | 0 575 | 576 | 577 | 0 578 | 0 579 | 0 580 | 0 581 | 582 | 583 | 0 584 | 0 585 | 586 | 587 | 0 588 | 0 589 | 590 | 0 591 | 592 | 593 | 594 | 0 595 | 0 596 | 0 597 | 0 598 | 0 599 | 1 600 | 0 601 | 0 602 | 0 603 | 0 604 | 3 605 | 606 | 607 | 1 608 | 609 | 610 | 611 | 612 | 613 | 614 | SARMCM3.DLL 615 | 616 | TARMCM1.DLL 617 | -pCM0 618 | 619 | 620 | 621 | 1 622 | 0 623 | 0 624 | 0 625 | 16 626 | 627 | 628 | 0 629 | 1 630 | 1 631 | 1 632 | 1 633 | 1 634 | 1 635 | 1 636 | 0 637 | 1 638 | 639 | 640 | 1 641 | 1 642 | 0 643 | 1 644 | 1 645 | 1 646 | 0 647 | 1 648 | 0 649 | 1 650 | 651 | 0 652 | 7 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | Segger\JL2CM3.dll 667 | 668 | 669 | 670 | 671 | 1 672 | 0 673 | 0 674 | 1 675 | 1 676 | 4099 677 | 678 | 1 679 | Segger\JL2CM3.dll 680 | 681 | 682 | 683 | 684 | 685 | 0 686 | 687 | 688 | 689 | 0 690 | 1 691 | 1 692 | 1 693 | 1 694 | 1 695 | 1 696 | 1 697 | 0 698 | 1 699 | 1 700 | 0 701 | 1 702 | 1 703 | 0 704 | 0 705 | 1 706 | 1 707 | 1 708 | 1 709 | 1 710 | 1 711 | 1 712 | 1 713 | 1 714 | 0 715 | 0 716 | "Cortex-M0" 717 | 718 | 0 719 | 0 720 | 0 721 | 1 722 | 1 723 | 0 724 | 0 725 | 0 726 | 0 727 | 0 728 | 8 729 | 0 730 | 1 731 | 0 732 | 3 733 | 3 734 | 0 735 | 0 736 | 0 737 | 0 738 | 0 739 | 0 740 | 0 741 | 0 742 | 0 743 | 0 744 | 1 745 | 0 746 | 0 747 | 0 748 | 0 749 | 1 750 | 0 751 | 752 | 753 | 0 754 | 0x0 755 | 0x0 756 | 757 | 758 | 0 759 | 0x0 760 | 0x0 761 | 762 | 763 | 0 764 | 0x0 765 | 0x0 766 | 767 | 768 | 0 769 | 0x0 770 | 0x0 771 | 772 | 773 | 0 774 | 0x0 775 | 0x0 776 | 777 | 778 | 0 779 | 0x0 780 | 0x0 781 | 782 | 783 | 0 784 | 0x20000000 785 | 0x4000 786 | 787 | 788 | 1 789 | 0x0 790 | 0x40000 791 | 792 | 793 | 0 794 | 0x0 795 | 0x0 796 | 797 | 798 | 1 799 | 0x0 800 | 0x0 801 | 802 | 803 | 1 804 | 0x0 805 | 0x0 806 | 807 | 808 | 1 809 | 0x0 810 | 0x0 811 | 812 | 813 | 1 814 | 0x14000 815 | 0xb000 816 | 817 | 818 | 1 819 | 0x0 820 | 0x0 821 | 822 | 823 | 0 824 | 0x0 825 | 0x0 826 | 827 | 828 | 0 829 | 0x0 830 | 0x0 831 | 832 | 833 | 0 834 | 0x0 835 | 0x0 836 | 837 | 838 | 0 839 | 0x20002000 840 | 0x2000 841 | 842 | 843 | 0 844 | 0x0 845 | 0x0 846 | 847 | 848 | 849 | 850 | 851 | 1 852 | 1 853 | 0 854 | 0 855 | 0 856 | 0 857 | 1 858 | 0 859 | 0 860 | 0 861 | 2 862 | 0 863 | 0 864 | 0 865 | 0 866 | 867 | --c99 868 | NRF51 DEBUG_NRF_USER BLE_STACK_SUPPORT_REQD BOARD_PCA10001 869 | 870 | ..;..\..\..\..\..\Include;..\..\..\..\..\Include\app_common;..\..\..\..\..\Include\ble;..\..\..\..\..\Include\ble\ble_services;..\..\..\..\..\Include\s110;..\..\..\..\..\Include\sd_common 871 | 872 | 873 | 874 | 1 875 | 0 876 | 0 877 | 0 878 | 0 879 | 0 880 | 0 881 | 0 882 | 0 883 | 884 | 885 | 886 | 887 | 888 | 889 | 890 | 891 | 1 892 | 0 893 | 0 894 | 0 895 | 1 896 | 0 897 | 0x00000000 898 | 0x20000000 899 | 900 | ..\scatter.sct 901 | 902 | 903 | 904 | 905 | 906 | 907 | 908 | 909 | 910 | 911 | Startup Code 912 | 913 | 914 | system_nrf51.c 915 | 1 916 | ..\..\..\..\components\toolchain\system_nrf51.c 917 | 918 | 919 | arm_startup_nrf51.s 920 | 2 921 | ..\..\..\..\components\toolchain\arm\arm_startup_nrf51.s 922 | 923 | 924 | 925 | 926 | Source Code 927 | 928 | 929 | main.c 930 | 1 931 | .\..\main.c 932 | 933 | 934 | 935 | 936 | Services 937 | 938 | 939 | ble_lbs.c 940 | 1 941 | ..\ble_lbs.c 942 | 943 | 944 | ble_srv_common.c 945 | 1 946 | ..\..\..\..\components\ble\common\ble_srv_common.c 947 | 948 | 949 | 950 | 951 | Libraries 952 | 953 | 954 | ble_error_log.c 955 | 1 956 | ..\..\..\..\components\ble\ble_error_log\ble_error_log.c 957 | 958 | 959 | ble_debug_assert_handler.c 960 | 1 961 | ..\..\..\..\components\ble\ble_debug_assert_handler\ble_debug_assert_handler.c 962 | 963 | 964 | ble_conn_params.c 965 | 1 966 | ..\..\..\..\components\ble\common\ble_conn_params.c 967 | 968 | 969 | softdevice_handler.c 970 | 1 971 | ..\..\..\..\components\softdevice\common\softdevice_handler\softdevice_handler.c 972 | 973 | 974 | app_button.c 975 | 1 976 | ..\..\..\..\components\libraries\button\app_button.c 977 | 978 | 979 | app_scheduler.c 980 | 1 981 | ..\..\..\..\components\libraries\scheduler\app_scheduler.c 982 | 983 | 984 | ble_advdata.c 985 | 1 986 | ..\..\..\..\components\ble\common\ble_advdata.c 987 | 988 | 989 | crc16.c 990 | 1 991 | ..\..\..\..\components\libraries\crc16\crc16.c 992 | 993 | 994 | pstorage.c 995 | 1 996 | ..\..\..\..\components\drivers_nrf\pstorage\pstorage.c 997 | 998 | 999 | app_gpiote.c 1000 | 1 1001 | ..\..\..\..\components\libraries\gpiote\app_gpiote.c 1002 | 1003 | 1004 | app_timer.c 1005 | 1 1006 | ..\..\..\..\components\libraries\timer\app_timer.c 1007 | 1008 | 1009 | app_timer_appsh.c 1010 | 1 1011 | ..\..\..\..\components\libraries\timer\app_timer_appsh.c 1012 | 1013 | 1014 | 1015 | 1016 | 1017 | 1018 | 1019 |
1020 | -------------------------------------------------------------------------------- /arm/ble_app_lbs.uvprojx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 2.1 5 | 6 |
### uVision Project, (C) Keil Software
7 | 8 | 9 | 10 | nrf51822_xxaa_s110 (256K) 11 | 0x4 12 | ARM-ADS 13 | 14 | 15 | nRF51822_xxAA 16 | Nordic Semiconductor 17 | NordicSemiconductor.nRF_DeviceFamilyPack.7.1.0 18 | http://developer.nordicsemi.com/nRF51_SDK/pieces/nRF_DeviceFamilyPack/ 19 | IROM(0x00000000,0x40000) IRAM(0x20000000,0x4000) CPUTYPE("Cortex-M0") CLOCK(12000000) ELITTLE 20 | 21 | 22 | UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0nrf51xxx -FS00 -FL0200000 -FP0($$Device:nRF51822_xxAA$Flash\nrf51xxx.flm)) 23 | 0 24 | $$Device:nRF51822_xxAA$Device\Include\nrf.h 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | $$Device:nRF51822_xxAA$SVD\nrf51.xml 35 | 0 36 | 0 37 | 38 | 39 | 40 | 41 | 42 | 43 | 0 44 | 0 45 | 0 46 | 0 47 | 1 48 | 49 | .\_build\ 50 | ble_app_lbs 51 | 1 52 | 0 53 | 1 54 | 1 55 | 1 56 | .\_build\ 57 | 1 58 | 0 59 | 0 60 | 61 | 0 62 | 0 63 | 64 | 65 | 0 66 | 0 67 | 0 68 | 0 69 | 70 | 71 | 0 72 | 0 73 | 74 | 75 | 0 76 | 0 77 | 0 78 | 0 79 | 80 | 81 | 0 82 | 0 83 | 84 | 85 | 0 86 | 0 87 | 88 | 0 89 | 90 | 91 | 92 | 0 93 | 0 94 | 0 95 | 0 96 | 0 97 | 1 98 | 0 99 | 0 100 | 0 101 | 0 102 | 3 103 | 104 | 105 | 1 106 | 107 | 108 | SARMCM3.DLL 109 | 110 | DARMCM1.DLL 111 | -pCM0 112 | SARMCM3.DLL 113 | 114 | TARMCM1.DLL 115 | -pCM0 116 | 117 | 118 | 119 | 1 120 | 0 121 | 0 122 | 0 123 | 16 124 | 125 | 126 | 0 127 | 1 128 | 1 129 | 1 130 | 1 131 | 1 132 | 1 133 | 1 134 | 0 135 | 1 136 | 137 | 138 | 1 139 | 1 140 | 1 141 | 1 142 | 1 143 | 1 144 | 0 145 | 1 146 | 0 147 | 1 148 | 149 | 0 150 | 6 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | Segger\JL2CM3.dll 165 | 166 | 167 | 168 | 169 | 1 170 | 0 171 | 0 172 | 1 173 | 1 174 | 4099 175 | 176 | 1 177 | Segger\JL2CM3.dll 178 | "" () 179 | 180 | 181 | 182 | 183 | 0 184 | 185 | 186 | 187 | 0 188 | 1 189 | 1 190 | 1 191 | 1 192 | 1 193 | 1 194 | 1 195 | 0 196 | 1 197 | 1 198 | 0 199 | 1 200 | 1 201 | 0 202 | 0 203 | 1 204 | 1 205 | 1 206 | 1 207 | 1 208 | 1 209 | 1 210 | 1 211 | 1 212 | 0 213 | 0 214 | "Cortex-M0" 215 | 216 | 0 217 | 0 218 | 0 219 | 1 220 | 1 221 | 0 222 | 0 223 | 0 224 | 0 225 | 0 226 | 8 227 | 0 228 | 0 229 | 0 230 | 3 231 | 3 232 | 0 233 | 0 234 | 0 235 | 0 236 | 0 237 | 0 238 | 0 239 | 0 240 | 0 241 | 0 242 | 1 243 | 0 244 | 0 245 | 0 246 | 0 247 | 1 248 | 0 249 | 250 | 251 | 0 252 | 0x0 253 | 0x0 254 | 255 | 256 | 0 257 | 0x0 258 | 0x0 259 | 260 | 261 | 0 262 | 0x0 263 | 0x0 264 | 265 | 266 | 0 267 | 0x0 268 | 0x0 269 | 270 | 271 | 0 272 | 0x0 273 | 0x0 274 | 275 | 276 | 0 277 | 0x0 278 | 0x0 279 | 280 | 281 | 0 282 | 0x20000000 283 | 0x4000 284 | 285 | 286 | 1 287 | 0x0 288 | 0x40000 289 | 290 | 291 | 0 292 | 0x0 293 | 0x0 294 | 295 | 296 | 1 297 | 0x0 298 | 0x0 299 | 300 | 301 | 1 302 | 0x0 303 | 0x0 304 | 305 | 306 | 1 307 | 0x0 308 | 0x0 309 | 310 | 311 | 1 312 | 0x18000 313 | 0x28000 314 | 315 | 316 | 1 317 | 0x0 318 | 0x0 319 | 320 | 321 | 0 322 | 0x0 323 | 0x0 324 | 325 | 326 | 0 327 | 0x0 328 | 0x0 329 | 330 | 331 | 0 332 | 0x0 333 | 0x0 334 | 335 | 336 | 0 337 | 0x20002000 338 | 0x2000 339 | 340 | 341 | 0 342 | 0x0 343 | 0x0 344 | 345 | 346 | 347 | 348 | 349 | 1 350 | 1 351 | 0 352 | 0 353 | 0 354 | 0 355 | 1 356 | 0 357 | 0 358 | 0 359 | 2 360 | 0 361 | 0 362 | 0 363 | 0 364 | 365 | --c99 366 | NRF51 DEBUG_NRF_USER BLE_STACK_SUPPORT_REQD BOARD_PCA10028 SOFTDEVICE_PRESENT 367 | 368 | ..\config;..\..\..\..\components\toolchain;..\..\..\..\components\libraries\button;..\..\..\..\components\libraries\scheduler;..\..\..\..\components\softdevice\s110\headers;..\..\..\..\components\ble\common;..\..\..\bsp;..\..\..\..\components\libraries\util;..\..\..\..\components\libraries\timer;..\..\..\..\components\libraries\gpiote;..\..\..\..\components\drivers_nrf\hal;..\..\..\..\components\softdevice\common\softdevice_handler;..\..\..\..\components\ble\ble_debug_assert_handler;..\..\..\..\components\ble\ble_error_log;..\..\..\..\components\drivers_nrf\pstorage;..\;..\..\..\..\components\drivers_nrf\ble_flash 369 | 370 | 371 | 372 | 1 373 | 0 374 | 0 375 | 0 376 | 0 377 | 0 378 | 0 379 | 0 380 | 0 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 1 390 | 0 391 | 0 392 | 0 393 | 1 394 | 0 395 | 0x00000000 396 | 0x20000000 397 | 398 | ..\scatter.sct 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | Startup Code 410 | 411 | 412 | system_nrf51.c 413 | 1 414 | ..\..\..\..\components\toolchain\system_nrf51.c 415 | 416 | 417 | arm_startup_nrf51.s 418 | 2 419 | ..\..\..\..\components\toolchain\arm\arm_startup_nrf51.s 420 | 421 | 422 | 423 | 424 | Source Code 425 | 426 | 427 | main.c 428 | 1 429 | .\..\main.c 430 | 431 | 432 | 433 | 434 | Services 435 | 436 | 437 | ble_lbs.c 438 | 1 439 | ..\ble_lbs.c 440 | 441 | 442 | ble_srv_common.c 443 | 1 444 | ..\..\..\..\components\ble\common\ble_srv_common.c 445 | 446 | 447 | 448 | 449 | Libraries 450 | 451 | 452 | ble_error_log.c 453 | 1 454 | ..\..\..\..\components\ble\ble_error_log\ble_error_log.c 455 | 456 | 457 | ble_debug_assert_handler.c 458 | 1 459 | ..\..\..\..\components\ble\ble_debug_assert_handler\ble_debug_assert_handler.c 460 | 461 | 462 | ble_conn_params.c 463 | 1 464 | ..\..\..\..\components\ble\common\ble_conn_params.c 465 | 466 | 467 | softdevice_handler.c 468 | 1 469 | ..\..\..\..\components\softdevice\common\softdevice_handler\softdevice_handler.c 470 | 471 | 472 | app_button.c 473 | 1 474 | ..\..\..\..\components\libraries\button\app_button.c 475 | 476 | 477 | app_scheduler.c 478 | 1 479 | ..\..\..\..\components\libraries\scheduler\app_scheduler.c 480 | 481 | 482 | ble_advdata.c 483 | 1 484 | ..\..\..\..\components\ble\common\ble_advdata.c 485 | 486 | 487 | crc16.c 488 | 1 489 | ..\..\..\..\components\libraries\crc16\crc16.c 490 | 491 | 492 | pstorage.c 493 | 1 494 | ..\..\..\..\components\drivers_nrf\pstorage\pstorage.c 495 | 496 | 497 | app_gpiote.c 498 | 1 499 | ..\..\..\..\components\libraries\gpiote\app_gpiote.c 500 | 501 | 502 | app_timer.c 503 | 1 504 | ..\..\..\..\components\libraries\timer\app_timer.c 505 | 506 | 507 | app_timer_appsh.c 508 | 1 509 | ..\..\..\..\components\libraries\timer\app_timer_appsh.c 510 | 511 | 512 | 513 | 514 | 515 | 516 | nrf51822_xxab_s110 (128K) 517 | 0x4 518 | ARM-ADS 519 | 520 | 521 | nRF51822_xxAB 522 | Nordic Semiconductor 523 | IRAM(0x20000000-0x20003FFF) IROM(0-0x3FFFF) CLOCK(16000000) CPUTYPE("Cortex-M0") ESEL ELITTLE 524 | 525 | "Device\Nordic\nRF51822\Source\templates\arm\arm_startup_nrf51.s"("Nordic Semiconductor nRF51822 Startup Code") 526 | UL2CM3(-UM0364FCE -O78 -S0 -C0 -TO18 -TC16000000 -TP21 -TDS800D -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000) 527 | 0 528 | nrf.h 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | SFD\Nordic\nRF51\nrf51822.sfr 539 | 0 540 | 0 541 | 542 | 543 | 544 | ..\Device\Nordic\nRF51822\Include\ 545 | ..\Device\Nordic\nRF51822\Include\ 546 | 547 | 0 548 | 0 549 | 0 550 | 0 551 | 1 552 | 553 | .\_build\ 554 | ble_app_lbs 555 | 1 556 | 0 557 | 1 558 | 1 559 | 1 560 | .\_build\ 561 | 1 562 | 0 563 | 0 564 | 565 | 0 566 | 0 567 | 568 | 569 | 0 570 | 0 571 | 0 572 | 0 573 | 574 | 575 | 0 576 | 0 577 | 578 | 579 | 0 580 | 0 581 | 0 582 | 0 583 | 584 | 585 | 0 586 | 0 587 | 588 | 589 | 0 590 | 0 591 | 592 | 0 593 | 594 | 595 | 596 | 0 597 | 0 598 | 0 599 | 0 600 | 0 601 | 1 602 | 0 603 | 0 604 | 0 605 | 0 606 | 3 607 | 608 | 609 | 1 610 | 611 | 612 | 613 | 614 | 615 | 616 | SARMCM3.DLL 617 | 618 | TARMCM1.DLL 619 | -pCM0 620 | 621 | 622 | 623 | 1 624 | 0 625 | 0 626 | 0 627 | 16 628 | 629 | 630 | 0 631 | 1 632 | 1 633 | 1 634 | 1 635 | 1 636 | 1 637 | 1 638 | 0 639 | 1 640 | 641 | 642 | 1 643 | 1 644 | 0 645 | 1 646 | 1 647 | 1 648 | 0 649 | 1 650 | 0 651 | 1 652 | 653 | 0 654 | 7 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | Segger\JL2CM3.dll 669 | 670 | 671 | 672 | 673 | 1 674 | 0 675 | 0 676 | 1 677 | 1 678 | 4099 679 | 680 | 1 681 | Segger\JL2CM3.dll 682 | 683 | 684 | 685 | 686 | 687 | 0 688 | 689 | 690 | 691 | 0 692 | 1 693 | 1 694 | 1 695 | 1 696 | 1 697 | 1 698 | 1 699 | 0 700 | 1 701 | 1 702 | 0 703 | 1 704 | 1 705 | 0 706 | 0 707 | 1 708 | 1 709 | 1 710 | 1 711 | 1 712 | 1 713 | 1 714 | 1 715 | 1 716 | 0 717 | 0 718 | "Cortex-M0" 719 | 720 | 0 721 | 0 722 | 0 723 | 1 724 | 1 725 | 0 726 | 0 727 | 0 728 | 0 729 | 0 730 | 8 731 | 0 732 | 1 733 | 0 734 | 3 735 | 3 736 | 0 737 | 0 738 | 0 739 | 0 740 | 0 741 | 0 742 | 0 743 | 0 744 | 0 745 | 0 746 | 1 747 | 0 748 | 0 749 | 0 750 | 0 751 | 1 752 | 0 753 | 754 | 755 | 0 756 | 0x0 757 | 0x0 758 | 759 | 760 | 0 761 | 0x0 762 | 0x0 763 | 764 | 765 | 0 766 | 0x0 767 | 0x0 768 | 769 | 770 | 0 771 | 0x0 772 | 0x0 773 | 774 | 775 | 0 776 | 0x0 777 | 0x0 778 | 779 | 780 | 0 781 | 0x0 782 | 0x0 783 | 784 | 785 | 0 786 | 0x20000000 787 | 0x4000 788 | 789 | 790 | 1 791 | 0x0 792 | 0x40000 793 | 794 | 795 | 0 796 | 0x0 797 | 0x0 798 | 799 | 800 | 1 801 | 0x0 802 | 0x0 803 | 804 | 805 | 1 806 | 0x0 807 | 0x0 808 | 809 | 810 | 1 811 | 0x0 812 | 0x0 813 | 814 | 815 | 1 816 | 0x14000 817 | 0xb000 818 | 819 | 820 | 1 821 | 0x0 822 | 0x0 823 | 824 | 825 | 0 826 | 0x0 827 | 0x0 828 | 829 | 830 | 0 831 | 0x0 832 | 0x0 833 | 834 | 835 | 0 836 | 0x0 837 | 0x0 838 | 839 | 840 | 0 841 | 0x20002000 842 | 0x2000 843 | 844 | 845 | 0 846 | 0x0 847 | 0x0 848 | 849 | 850 | 851 | 852 | 853 | 1 854 | 1 855 | 0 856 | 0 857 | 0 858 | 0 859 | 1 860 | 0 861 | 0 862 | 0 863 | 2 864 | 0 865 | 0 866 | 0 867 | 0 868 | 869 | --c99 870 | NRF51 DEBUG_NRF_USER BLE_STACK_SUPPORT_REQD BOARD_PCA10001 871 | 872 | ..;..\..\..\..\..\Include;..\..\..\..\..\Include\app_common;..\..\..\..\..\Include\ble;..\..\..\..\..\Include\ble\ble_services;..\..\..\..\..\Include\s110;..\..\..\..\..\Include\sd_common 873 | 874 | 875 | 876 | 1 877 | 0 878 | 0 879 | 0 880 | 0 881 | 0 882 | 0 883 | 0 884 | 0 885 | 886 | 887 | 888 | 889 | 890 | 891 | 892 | 893 | 1 894 | 0 895 | 0 896 | 0 897 | 1 898 | 0 899 | 0x00000000 900 | 0x20000000 901 | 902 | ..\scatter.sct 903 | 904 | 905 | 906 | 907 | 908 | 909 | 910 | 911 | 912 | 913 | Startup Code 914 | 915 | 916 | system_nrf51.c 917 | 1 918 | ..\..\..\..\components\toolchain\system_nrf51.c 919 | 920 | 921 | arm_startup_nrf51.s 922 | 2 923 | ..\..\..\..\components\toolchain\arm\arm_startup_nrf51.s 924 | 925 | 926 | 927 | 928 | Source Code 929 | 930 | 931 | main.c 932 | 1 933 | .\..\main.c 934 | 935 | 936 | 937 | 938 | Services 939 | 940 | 941 | ble_lbs.c 942 | 1 943 | ..\ble_lbs.c 944 | 945 | 946 | ble_srv_common.c 947 | 1 948 | ..\..\..\..\components\ble\common\ble_srv_common.c 949 | 950 | 951 | 952 | 953 | Libraries 954 | 955 | 956 | ble_error_log.c 957 | 1 958 | ..\..\..\..\components\ble\ble_error_log\ble_error_log.c 959 | 960 | 961 | ble_debug_assert_handler.c 962 | 1 963 | ..\..\..\..\components\ble\ble_debug_assert_handler\ble_debug_assert_handler.c 964 | 965 | 966 | ble_conn_params.c 967 | 1 968 | ..\..\..\..\components\ble\common\ble_conn_params.c 969 | 970 | 971 | softdevice_handler.c 972 | 1 973 | ..\..\..\..\components\softdevice\common\softdevice_handler\softdevice_handler.c 974 | 975 | 976 | app_button.c 977 | 1 978 | ..\..\..\..\components\libraries\button\app_button.c 979 | 980 | 981 | app_scheduler.c 982 | 1 983 | ..\..\..\..\components\libraries\scheduler\app_scheduler.c 984 | 985 | 986 | ble_advdata.c 987 | 1 988 | ..\..\..\..\components\ble\common\ble_advdata.c 989 | 990 | 991 | crc16.c 992 | 1 993 | ..\..\..\..\components\libraries\crc16\crc16.c 994 | 995 | 996 | pstorage.c 997 | 1 998 | ..\..\..\..\components\drivers_nrf\pstorage\pstorage.c 999 | 1000 | 1001 | app_gpiote.c 1002 | 1 1003 | ..\..\..\..\components\libraries\gpiote\app_gpiote.c 1004 | 1005 | 1006 | app_timer.c 1007 | 1 1008 | ..\..\..\..\components\libraries\timer\app_timer.c 1009 | 1010 | 1011 | app_timer_appsh.c 1012 | 1 1013 | ..\..\..\..\components\libraries\timer\app_timer_appsh.c 1014 | 1015 | 1016 | 1017 | 1018 | 1019 | 1020 | 1021 |
1022 | --------------------------------------------------------------------------------