This is an example of BLE GATT Client, which receives broadcast data from BLE_Server_BME280 ( a GATT server) , then transfers values up to mbed Device Connector (cloud).
Please refer details about BLEClient_mbedDevConn below. https://github.com/soramame21/BLEClient_mbedDevConn
The location of required BLE GATT server, BLE_Server_BME280, is at here. https://developer.mbed.org/users/edamame22/code/BLE_Server_BME280/
mbed-client/get_sizes.sh@2:b894b3508057, 2017-09-05 (annotated)
- Committer:
- Ren Boting
- Date:
- Tue Sep 05 11:56:13 2017 +0900
- Revision:
- 2:b894b3508057
- Parent:
- 0:29983394c6b6
Update all libraries and reform main.cpp
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
edamame22 | 0:29983394c6b6 | 1 | #!/bin/bash |
edamame22 | 0:29983394c6b6 | 2 | # Copyright (c) 2016 ARM Limited. All rights reserved. |
edamame22 | 0:29983394c6b6 | 3 | # SPDX-License-Identifier: Apache-2.0 |
edamame22 | 0:29983394c6b6 | 4 | # Licensed under the Apache License, Version 2.0 (the License); you may |
edamame22 | 0:29983394c6b6 | 5 | # not use this file except in compliance with the License. |
edamame22 | 0:29983394c6b6 | 6 | # You may obtain a copy of the License at |
edamame22 | 0:29983394c6b6 | 7 | # |
edamame22 | 0:29983394c6b6 | 8 | # * http://www.apache.org/licenses/LICENSE-2.0 |
edamame22 | 0:29983394c6b6 | 9 | # |
edamame22 | 0:29983394c6b6 | 10 | # Unless required by applicable law or agreed to in writing, software |
edamame22 | 0:29983394c6b6 | 11 | # distributed under the License is distributed on an AS IS BASIS, WITHOUT |
edamame22 | 0:29983394c6b6 | 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
edamame22 | 0:29983394c6b6 | 13 | # See the License for the specific language governing permissions and |
edamame22 | 0:29983394c6b6 | 14 | # limitations under the License. |
edamame22 | 0:29983394c6b6 | 15 | |
edamame22 | 0:29983394c6b6 | 16 | echo |
edamame22 | 0:29983394c6b6 | 17 | echo "Build mbed Client API for executable size collection" |
edamame22 | 0:29983394c6b6 | 18 | echo |
edamame22 | 0:29983394c6b6 | 19 | |
edamame22 | 0:29983394c6b6 | 20 | BUILD_TARGET="frdm-k64f-armcc" |
edamame22 | 0:29983394c6b6 | 21 | |
edamame22 | 0:29983394c6b6 | 22 | yt target $BUILD_TARGET |
edamame22 | 0:29983394c6b6 | 23 | yt build |
edamame22 | 0:29983394c6b6 | 24 | |
edamame22 | 0:29983394c6b6 | 25 | SIZE_CMD="size --totals" |
edamame22 | 0:29983394c6b6 | 26 | |
edamame22 | 0:29983394c6b6 | 27 | OUTPUT_PATH="results/" |
edamame22 | 0:29983394c6b6 | 28 | OUTPUT_FILE_POSTFIX="_${BUILD_TARGET}_size.txt" |
edamame22 | 0:29983394c6b6 | 29 | |
edamame22 | 0:29983394c6b6 | 30 | MAIN_MODULE_NAME="mbed-client" |
edamame22 | 0:29983394c6b6 | 31 | |
edamame22 | 0:29983394c6b6 | 32 | # yotta dependencies |
edamame22 | 0:29983394c6b6 | 33 | YOTTA_DEPS=( |
edamame22 | 0:29983394c6b6 | 34 | 'cmsis-core' |
edamame22 | 0:29983394c6b6 | 35 | 'cmsis-core-k64f' |
edamame22 | 0:29983394c6b6 | 36 | 'core-util' |
edamame22 | 0:29983394c6b6 | 37 | 'dlmalloc' |
edamame22 | 0:29983394c6b6 | 38 | 'greentea-client' |
edamame22 | 0:29983394c6b6 | 39 | 'mbed-client-c' |
edamame22 | 0:29983394c6b6 | 40 | 'mbed-client-mbed-os' |
edamame22 | 0:29983394c6b6 | 41 | 'mbed-client-mbedtls' |
edamame22 | 0:29983394c6b6 | 42 | 'mbed-drivers' |
edamame22 | 0:29983394c6b6 | 43 | 'mbed-hal' |
edamame22 | 0:29983394c6b6 | 44 | 'mbed-hal-frdm-k64f' |
edamame22 | 0:29983394c6b6 | 45 | 'mbed-hal-k64f' |
edamame22 | 0:29983394c6b6 | 46 | 'mbed-hal-ksdk-mcu' |
edamame22 | 0:29983394c6b6 | 47 | 'mbedtls' |
edamame22 | 0:29983394c6b6 | 48 | 'mbed-trace' |
edamame22 | 0:29983394c6b6 | 49 | 'minar' |
edamame22 | 0:29983394c6b6 | 50 | 'minar-platform-mbed' |
edamame22 | 0:29983394c6b6 | 51 | 'nanostack-libservice' |
edamame22 | 0:29983394c6b6 | 52 | 'sal' |
edamame22 | 0:29983394c6b6 | 53 | 'sal-driver-lwip-k64f-eth' |
edamame22 | 0:29983394c6b6 | 54 | 'sal-iface-eth' |
edamame22 | 0:29983394c6b6 | 55 | 'sal-stack-lwip' |
edamame22 | 0:29983394c6b6 | 56 | 'sockets' |
edamame22 | 0:29983394c6b6 | 57 | 'ualloc' |
edamame22 | 0:29983394c6b6 | 58 | 'uvisor-lib' |
edamame22 | 0:29983394c6b6 | 59 | ) |
edamame22 | 0:29983394c6b6 | 60 | |
edamame22 | 0:29983394c6b6 | 61 | |
edamame22 | 0:29983394c6b6 | 62 | # yotta dummy dependencies, which have different naming |
edamame22 | 0:29983394c6b6 | 63 | YOTTA_DUMMY_DEPS=( |
edamame22 | 0:29983394c6b6 | 64 | 'cmsis-core-freescale' |
edamame22 | 0:29983394c6b6 | 65 | 'compiler-polyfill' |
edamame22 | 0:29983394c6b6 | 66 | 'mbed-hal-freescale' |
edamame22 | 0:29983394c6b6 | 67 | 'minar-platform' |
edamame22 | 0:29983394c6b6 | 68 | ) |
edamame22 | 0:29983394c6b6 | 69 | |
edamame22 | 0:29983394c6b6 | 70 | |
edamame22 | 0:29983394c6b6 | 71 | echo "Writing object file size informations to ${OUTPUT_PATH}" |
edamame22 | 0:29983394c6b6 | 72 | |
edamame22 | 0:29983394c6b6 | 73 | # the "main" module is in build/<target>/source/<module>.ar |
edamame22 | 0:29983394c6b6 | 74 | ${SIZE_CMD} ./build/${BUILD_TARGET}/source/${MAIN_MODULE_NAME}.ar >${OUTPUT_PATH}${MAIN_MODULE_NAME}${OUTPUT_FILE_POSTFIX} |
edamame22 | 0:29983394c6b6 | 75 | |
edamame22 | 0:29983394c6b6 | 76 | # these are the direct deps, found as build/<target>/ym/<module>/source/<module>.ar |
edamame22 | 0:29983394c6b6 | 77 | for MODULE in "${YOTTA_DEPS[@]}" |
edamame22 | 0:29983394c6b6 | 78 | do |
edamame22 | 0:29983394c6b6 | 79 | ${SIZE_CMD} ./build/${BUILD_TARGET}/ym/${MODULE}/source/${MODULE}.ar >${OUTPUT_PATH}${MODULE}${OUTPUT_FILE_POSTFIX} |
edamame22 | 0:29983394c6b6 | 80 | done |
edamame22 | 0:29983394c6b6 | 81 | |
edamame22 | 0:29983394c6b6 | 82 | # dummy libs, which are named with different logic |
edamame22 | 0:29983394c6b6 | 83 | for MODULE in "${YOTTA_DUMMY_DEPS[@]}" |
edamame22 | 0:29983394c6b6 | 84 | do |
edamame22 | 0:29983394c6b6 | 85 | # on paths the "-" char needs to be converted to "_" |
edamame22 | 0:29983394c6b6 | 86 | MODULE_PATH=${MODULE//-/_} |
edamame22 | 0:29983394c6b6 | 87 | ${SIZE_CMD} ./build/${BUILD_TARGET}/ym/${MODULE}/yotta_dummy_lib_${MODULE_PATH}/${MODULE}.ar >${OUTPUT_PATH}${MODULE}${OUTPUT_FILE_POSTFIX} |
edamame22 | 0:29983394c6b6 | 88 | done |