Code Monkey home page Code Monkey logo

ble-examples's People

Contributors

iriark01 avatar janjongboom avatar jaustin avatar liyouzhou avatar pan- avatar rgrover avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ble-examples's Issues

add config.json for samples that need to use S110

I have had a few problems with the sample apps and after much bleating pan (Vincent) came to my rescue, is it worth mentioning the S110 config.json setting, more explicitly so others don't have the same problems. My understanding is that the S110 is for peripheral only so seems the more intuitive soft library for most of the sample apps
off topic ; I really do like the jotta build system and mbed os with C++ wrappers for services etc etc its nicely written

Debug not working anymore?

I cant seem to debug anymore.. for simplicity sake Ive come back to one of the ble examples (gapbutton) with the nrf51dk gcc target. Ive upgraded yotta and heres my yt ls, build logs, and debug session

Jacobs-MacBook-Air:BLE_GAPButton jacobrosenthal$ yt ls
ble-gapbutton 0.0.1
┣━ mbed-drivers 1.5.0
┃ ┣━ mbed-hal 1.3.0 yotta_modules/mbed-hal
┃ ┃ ┗━ mbed-hal-nordic 2.1.0 yotta_modules/mbed-hal-nordic
┃ ┃   ┗━ mbed-hal-nrf51822-mcu 2.2.0 yotta_modules/mbed-hal-nrf51822-mcu
┃ ┃     ┣━ nrf51-sdk 2.3.0 yotta_modules/nrf51-sdk
┃ ┃     ┗━ mbed-hal-nrf51dk 2.1.0 yotta_modules/mbed-hal-nrf51dk
┃ ┣━ cmsis-core 1.2.0 yotta_modules/cmsis-core
┃ ┃ ┗━ cmsis-core-nordic 1.1.0 yotta_modules/cmsis-core-nordic
┃ ┃   ┗━ cmsis-core-nrf51822 1.4.0 yotta_modules/cmsis-core-nrf51822
┃ ┣━ ualloc 1.3.0 yotta_modules/ualloc
┃ ┃ ┗━ dlmalloc 1.1.0 yotta_modules/dlmalloc
┃ ┣━ minar 1.3.0 yotta_modules/minar
┃ ┃ ┗━ minar-platform 1.1.0 yotta_modules/minar-platform
┃ ┃   ┗━ minar-platform-mbed 1.3.0 yotta_modules/minar-platform-mbed
┃ ┣━ core-util 1.8.0 yotta_modules/core-util
┃ ┣━ compiler-polyfill 1.3.0 yotta_modules/compiler-polyfill
┃ ┗━ greentea-client 1.1.0 yotta_modules/greentea-client
┗━ ble 2.6.0
  ┗━ ble-nrf51822 2.6.0 yotta_modules/ble-nrf51822

Jacobs-MacBook-Air:BLE_GAPButton jacobrosenthal$ yotta --version
0.16.2
Jacobs-MacBook-Air:BLE_GAPButton jacobrosenthal$ valinor --version
0.0.15
Jacobs-MacBook-Air:BLE_GAPButton jacobrosenthal$ 

Last login: Wed Apr  6 13:03:58 on ttys001
Jacobs-MacBook-Air:BLE_GAPButton jacobrosenthal$ yt clean
Jacobs-MacBook-Air:BLE_GAPButton jacobrosenthal$ yt target nrf51dk-gcc
Jacobs-MacBook-Air:BLE_GAPButton jacobrosenthal$ yt build -d
info: generate for target: nrf51dk-gcc 1.0.0 at /Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_targets/nrf51dk-gcc
GCC version is: 4.8.4
omit frame pointer for bootloader startup asm
suppressing warnings from nrf51-sdk
-- The ASM compiler identification is GNU
-- Found assembler: /usr/local/bin/arm-none-eabi-gcc
suppressing warnings from ble-nrf51822
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/build/nrf51dk-gcc
[16/147] Building C object ym/mbed-drivers/s.../yotta_modules/mbed-drivers/source/error.c.
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/mbed-drivers/source/error.c: In function 'error':
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/mbed-drivers/source/error.c:26:31: warning: unused parameter 'format' [-Wunused-parameter]
 __weak void error(const char* format, ...) {
                               ^
[19/147] Building C object ym/mbed-drivers/s...yotta_modules/mbed-drivers/source/assert.c.
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/mbed-drivers/source/assert.c: In function 'mbed_assert_internal':
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/mbed-drivers/source/assert.c:27:39: warning: unused parameter 'expr' [-Wunused-parameter]
 void mbed_assert_internal(const char *expr, const char *file, int line)
                                       ^
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/mbed-drivers/source/assert.c:27:57: warning: unused parameter 'file' [-Wunused-parameter]
 void mbed_assert_internal(const char *expr, const char *file, int line)
                                                         ^
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/mbed-drivers/source/assert.c:27:67: warning: unused parameter 'line' [-Wunused-parameter]
 void mbed_assert_internal(const char *expr, const char *file, int line)
                                                                   ^
[39/147] Building CXX object ym/mbed-drivers...a_modules/mbed-drivers/source/test_env.cpp.
In file included from /Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/mbed-drivers/source/test_env.cpp:17:0:
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/mbed-drivers/mbed-drivers/test_env.h:20:2: warning: #warning mbed-drivers/test_env.h is deprecated. Please use greentea-client/test_env.h instead. [-Wcpp]
 #warning mbed-drivers/test_env.h is deprecated. Please use greentea-client/test_env.h instead.
  ^
[41/147] Building C object ym/mbed-drivers/s...tta_modules/mbed-drivers/source/rtc_time.c.
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/mbed-drivers/source/rtc_time.c: In function 'set_time':
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/mbed-drivers/source/rtc_time.c:49:22: warning: unused parameter 't' [-Wunused-parameter]
 void set_time(time_t t) {
                      ^
[54/147] Building C object ym/core-util/sour...tta_modules/core-util/source/assert_mbed.c.
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/core-util/source/assert_mbed.c: In function 'core_util_runtime_error_internal':
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/core-util/source/assert_mbed.c:33:51: warning: unused parameter 'file' [-Wunused-parameter]
 void core_util_runtime_error_internal(const char *file, int line, const char* format, ...) {
                                                   ^
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/core-util/source/assert_mbed.c:33:61: warning: unused parameter 'line' [-Wunused-parameter]
 void core_util_runtime_error_internal(const char *file, int line, const char* format, ...) {
                                                             ^
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/core-util/source/assert_mbed.c:33:79: warning: unused parameter 'format' [-Wunused-parameter]
 void core_util_runtime_error_internal(const char *file, int line, const char* format, ...) {
                                                                               ^
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/core-util/source/assert_mbed.c: In function 'core_util_assert_internal':
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/core-util/source/assert_mbed.c:45:44: warning: unused parameter 'expr' [-Wunused-parameter]
 void core_util_assert_internal(const char *expr, const char *file, int line, const char* msg)
                                            ^
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/core-util/source/assert_mbed.c:45:62: warning: unused parameter 'file' [-Wunused-parameter]
 void core_util_assert_internal(const char *expr, const char *file, int line, const char* msg)
                                                              ^
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/core-util/source/assert_mbed.c:45:72: warning: unused parameter 'line' [-Wunused-parameter]
 void core_util_assert_internal(const char *expr, const char *file, int line, const char* msg)
                                                                        ^
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/core-util/source/assert_mbed.c:45:90: warning: unused parameter 'msg' [-Wunused-parameter]
 void core_util_assert_internal(const char *expr, const char *file, int line, const char* msg)
                                                                                          ^
[55/147] Building C object ym/core-util/sour...modules/core-util/source/critical_nordic.c.
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/core-util/source/critical_nordic.c: In function 'core_util_critical_section_enter':
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/core-util/source/critical_nordic.c:53:9: warning: passing argument 1 of 'sd_nvic_critical_region_enter' discards 'volatile' qualifier from pointer target type [enabled by default]
         sd_nvic_critical_region_enter(&_state._sd_state);
         ^
In file included from /Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/nrf51-sdk/source/nordic_sdk/components/softdevice/s130/headers/nrf_soc.h:45:0,
                 from /Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/core-util/source/critical_nordic.c:25:
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/nrf51-sdk/source/nordic_sdk/components/softdevice/s130/headers/nrf_soc.h:495:49: note: expected 'uint8_t *' but argument is of type 'volatile uint8_t *'
 SVCALL(SD_NVIC_CRITICAL_REGION_ENTER, uint32_t, sd_nvic_critical_region_enter(uint8_t * p_is_nested_critical_region));
                                                 ^
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/nrf51-sdk/source/nordic_sdk/components/softdevice/s130/headers/nrf_svc.h:49:45: note: in definition of macro 'SVCALL'
   __attribute__((naked)) static return_type signature \
                                             ^
[84/147] Building C object ym/mbed-hal-nrf51...ed-hal-nrf51822-mcu.dir/source/us_ticker.c.
In file included from /Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/mbed-hal-nrf51822-mcu/source/us_ticker.c:21:0:
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/nrf51-sdk/source/nordic_sdk/components/drivers_nrf/delay/nrf_delay.h:194:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
 static void __INLINE nrf_delay_us(uint32_t volatile number_of_us) __attribute__((always_inline));
 ^
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/nrf51-sdk/source/nordic_sdk/components/drivers_nrf/delay/nrf_delay.h:195:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
 static void __INLINE nrf_delay_us(uint32_t volatile number_of_us)
 ^
[85/147] Building C object ym/mbed-hal-nrf51...d-hal-nrf51822-mcu.dir/source/serial_api.c.
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/mbed-hal-nrf51822-mcu/source/serial_api.c: In function 'serial_baud':
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/mbed-hal-nrf51822-mcu/source/serial_api.c:107:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if (baudrate<acceptedSpeeds[i][0]) {
                     ^
[118/147] Building C object ym/nrf51-sdk/sou...k/components/drivers_nrf/delay/nrf_delay.c.
In file included from /Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/nrf51-sdk/source/nordic_sdk/components/drivers_nrf/delay/nrf_delay.c:36:0:
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/nrf51-sdk/source/nordic_sdk/components/drivers_nrf/delay/nrf_delay.h:194:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
 static void __INLINE nrf_delay_us(uint32_t volatile number_of_us) __attribute__((always_inline));
 ^
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/nrf51-sdk/source/nordic_sdk/components/drivers_nrf/delay/nrf_delay.h:195:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
 static void __INLINE nrf_delay_us(uint32_t volatile number_of_us)
 ^
[123/147] Building C object ym/nrf51-sdk/sou...libraries/bootloader_dfu/dfu_app_handler.c.
In file included from /Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/nrf51-sdk/source/nordic_sdk/components/libraries/bootloader_dfu/dfu_app_handler.c:43:0:
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/nrf51-sdk/source/nordic_sdk/components/drivers_nrf/delay/nrf_delay.h:194:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
 static void __INLINE nrf_delay_us(uint32_t volatile number_of_us) __attribute__((always_inline));
 ^
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/nrf51-sdk/source/nordic_sdk/components/drivers_nrf/delay/nrf_delay.h:195:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
 static void __INLINE nrf_delay_us(uint32_t volatile number_of_us)
 ^
[130/147] Building CXX object ym/ble/source/...modules/ble/source/services/DFUService.cpp.
In file included from /Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/nrf51-sdk/source/nordic_sdk/components/softdevice/s130/headers/ble_l2cap.h:45:0,
                 from /Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/nrf51-sdk/source/nordic_sdk/components/softdevice/s130/headers/ble_gatts.h:44,
                 from /Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/nrf51-sdk/source/nordic_sdk/components/ble/ble_services/ble_dfu/ble_dfu.h:51,
                 from /Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/nrf51-sdk/source/nordic_sdk/components/libraries/bootloader_dfu/dfu_app_handler.h:57,
                 from /Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/ble/ble/services/DFUService.h:26,
                 from /Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/ble/source/services/DFUService.cpp:19:
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/nrf51-sdk/source/nordic_sdk/components/softdevice/s130/headers/ble_l2cap.h:133:45: warning: unused parameter 'cid' [-Wunused-parameter]
 SVCALL(SD_BLE_L2CAP_CID_REGISTER, uint32_t, sd_ble_l2cap_cid_register(uint16_t cid));
                                             ^
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/nrf51-sdk/source/nordic_sdk/components/softdevice/s130/headers/nrf_svc.h:49:45: note: in definition of macro 'SVCALL'
   __attribute__((naked)) static return_type signature \
                                             ^
[146/147] Building CXX object source/CMakeFi...ble-examples/BLE_GAPButton/source/main.cpp.
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/source/main.cpp: In function 'void print_error(ble_error_t, const char*)':
/Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/source/main.cpp:36:11: warning: enumeration value 'BLE_ERROR_INTERNAL_STACK_FAILURE' not handled in switch [-Wswitch]
     switch(error) {
           ^
[147/147] Linking CXX executable source/ble-gapbutton
Memory usage for 'ble-gapbutton'
section              size
.data                 336
.bss                 1820
.heap               18324
.stack               2048
Jacobs-MacBook-Air:BLE_GAPButton jacobrosenthal$ yt debug
info: found ble-gapbutton at source/ble-gapbutton
info: preparing PyOCD gdbserver...
info: finding connected board...
info: DAP SWD MODE initialised
info: 4 hardware breakpoints, 0 literal comparators
info: CPU core is Cortex-M0
info: 2 hardware watchpoints
info: starting PyOCD gdbserver...
info: Telnet: server started on port 4444
info: GDB server started at port:3333
GNU gdb (GNU Tools for ARM Embedded Processors) 7.6.0.20140731-cvs
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-apple-darwin10 --target=arm-none-eabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/build/nrf51dk-gcc/source/ble-gapbutton...done.
info: One client connected!
0x0003dd16 in ?? ()
(gdb) where
#0  0x0003dd16 in ?? ()
#1  <signal handler called>
#2  0x0003c1b0 in ?? ()
#3  0x0003dda2 in ?? ()
#4  0x0003dda2 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) load
Loading section .text, size 0x1f9c4 lma 0x1c000
Loading section .ARM.exidx, size 0x8 lma 0x3b9c4
Loading section .data, size 0x150 lma 0x3b9cc
[====================] 100%
Start address 0x2eeac, load size 129820
Transfer rate: 2 KB/sec, 1909 bytes/write.
(gdb) where
#0  Reset_Handler ()
    at /Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/mbed-hal-nrf51822-mcu/bootstrap_gcc/startup_nRF51822.S:112
(gdb) mon reset halt
(gdb) where
#0  Reset_Handler ()
    at /Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/yotta_modules/mbed-hal-nrf51822-mcu/bootstrap_gcc/startup_nRF51822.S:112
(gdb) info b
No breakpoints or watchpoints.
(gdb) b app_start
Breakpoint 1 at 0x1e186: file /Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/source/main.cpp, line 164.
(gdb) c
Continuing.
Note: automatically using hardware breakpoints for read-only addresses.

Program received signal SIGSEGV, Segmentation fault.
0x000006b0 in ?? ()
(gdb) where
#0  0x000006b0 in ?? ()
#1  <signal handler called>
Cannot access memory at address 0x20007ffc
Cannot access memory at address 0x20007ff8
(gdb) load
Loading section .text, size 0x1f9c4 lma 0x1c000
Loading section .ARM.exidx, size 0x8 lma 0x3b9c4
Loading section .data, size 0x150 lma 0x3b9cc
[====================] 100%
Start address 0x2eeac, load size 129820
Transfer rate: 11 KB/sec, 1909 bytes/write.
(gdb) info b
Num     Type           Disp Enb Address    What
1       breakpoint     keep y   0x0001e186 in app_start(int, char**) 
                                           at /Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/source/main.cpp:164
(gdb) c
Continuing.
^C^CInterrupted while waiting for the program.
Give up (and stop debugging it)? (y or n) y
(gdb) quit
y
info: Telnet: server stopped
info: GDB server thread killed
project files have been generated in: /Users/jacobrosenthal/Downloads/ble-examples/BLE_GAPButton/build/nrf51dk-gcc/source

DFU example

I added dfu service to a heartrate example:
https://github.com/jacobrosenthal/ble-examples/tree/dfu-heartrate

and Im generating the .dat file with a script I mostly cribbed from a Nordic post
https://github.com/jacobrosenthal/redbearlab-nrf51822-gcc/blob/master/scripts/generate_dat.py

Im using the guide here to srec softdevice, application, and bootloader together (do we have a python alternative to srec?)
https://developer.mbed.org/forum/team-63-Bluetooth-Low-Energy-community/topic/5201/
Also, Im using the nrf51822/bootloader/s130_nrf51_1.0.0_bootloader.hex, is that correct?

srec_cat yotta_targets/nordic-nrf51822-16k-gcc/softdevice/s130_nrf51_1.0.0_softdevice.hex -intel build/redbearlab-nrf51822-gcc/source/ble-heartrate.hex -intel \
yotta_modules/ble-nrf51822/bootloader/s130_nrf51_1.0.0_bootloader.hex -intel -exclude 0x3FC00 \
0x3FC20 -generate 0x3FC00 0x3FC04 -l-e-constant 0x01 4 -generate \
0x3FC04 0x3FC08 -l-e-constant 0x00 4 -generate 0x3FC08 0x3FC0C \
-l-e-constant 0xFE 4 -generate 0x3FC0C 0x3FC20 -constant 0x00 -o \
combined.hex -intel

The application runs and I can see the DFU service, but writing to it doesn't ever bring the device back as DFUTarg.

However, if I dont add in the application hex, the bootloader DFUTarg does show up and Im able to write application hex to it, but of course, then the same thing occurs and Its DFU service doesnt allow DFU a second time.

srec_cat yotta_targets/nordic-nrf51822-16k-gcc/softdevice/s130_nrf51_1.0.0_softdevice.hex -intel yotta_modules/ble-nrf51822/bootloader/s130_nrf51_1.0.0_bootloader.hex -intel -exclude 0x3FC00 0x3FC20 -generate 0x3FC00 0x3FC04 -l-e-constant 0x01 4 -generate 0x3FC04 0x3FC08 -l-e-constant 0x00 4 -generate 0x3FC08 0x3FC0C -l-e-constant 0xFE 4 -generate 0x3FC0C 0x3FC20 -constant 0x00 -o combined.hex -intel

Id obviously love to push all this upstream when its working, into an example or a target, or wherever you think it belongs. I have another post here about target inheritance
http://forums.mbed.com/t/post-build-hooks-toolchain-cmake-and-inheriting-from-targets/694

Cannot get DeviceInformationService to work

Just adding the DeviceInformationService seems to crash the examples, and I cant find an example of it being used anywhere.
The crash occurs when a device connects but before device discovery

Connect to BLE_LED using name of device

For the BLE_LEDBlinker example
Currently we require the user to find out the mac address of the BLE_LED device and modify main.cpp
https://github.com/ARMmbed/ble-examples/blob/master/BLE_LEDBlinker/source/main.cpp#L31

It is not always obvious how you can obtain the mac address of a device.
Also as the code is currently written, it is not obvious which bit of the mac address you need to enter.

We can eliminate the complication for the user by just using DEVICE_NAME="LED" to identify the led device. The user can still change it if he wants to uniquely identify his own address, but it saves a lot of trouble for most beginners.

BLE_URIBeacon doesnt work on mkit-gcc

Although most of the examples seem to work just fine, I cant get the URI_Beacon example to do anything sensible, I am using an mbed Nordic nrf51822 board

doesnt build with armcc

problem

stuff builds with gcc, but not arm cc

error message

C:\Users\arm\mbed\oobBeta\ble-examples\BLE_Beacon>yt build
info: generate for target: nrf51dk-armcc 0.0.2 at C:\Users\arm\mbed\oobBeta\ble-examples\BLE_Beacon\yotta_targets\nrf51dk-armcc
-- The ASM compiler identification is ARMCC
-- Found assembler: C:/Users/arm/Downloads/ARMCompiler_5.03_117_Windows/bin64/armcc.exe
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/build/nrf51dk-armcc
[4/129] Building ASM object ym/mbed-hal-nrf51822-mcu/existing/CMakeFiles/mbed-hal-nrf51822-startupcod.dir/bootstrap_armcc/startup_nRF51822.S.o
FAILED: C:\Users\arm\Downloads\ARMCompiler_5.03_117_Windows\bin64\armcc.exe   -DYOTTA_COMPONENT_VERSION=\"0.0.7\" --gnu -c --gnu --split_sections --apcs=interwo
rk --restrict --no_rtti --CPU=Cortex-M0 -D__thumb2__ -O3 -Ospace -g -DNDEBUG -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon -IC:/Users/arm/mbed/oobBeta/ble
-examples/BLE_Beacon/yotta_modules/ble -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/ble-nrf51822 -IC:/Users/arm/mbed/oobBeta/ble-examples/B
LE_Beacon/yotta_modules/mbed-drivers -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/mbed-hal -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Bea
con/yotta_modules/cmsis-core -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/ualloc -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_
modules/minar -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/core-util -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/mbed
-hal-nordic -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/mbed-hal-nrf51822-mcu -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_mo
dules/mbed-hal-nrf51dk -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/cmsis-core-nordic -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/y
otta_modules/cmsis-core-nrf51822 -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/dlmalloc -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/
yotta_modules/compiler-polyfill -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/minar-platform -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Be
acon/yotta_modules/minar-platform-mbed -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/mbed-hal-nrf51822-mcu/mbed-hal-nrf51822-mcu -IC:/Users/
arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/mbed-hal-nrf51822-mcu/mbed-hal-nrf51822-mcu/lib/nordic_sdk/components/libraries/scheduler -IC:/Users/arm/
mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/mbed-hal-nrf51822-mcu/mbed-hal-nrf51822-mcu/lib/nordic_sdk/components/libraries/util -IC:/Users/arm/mbed/oobB
eta/ble-examples/BLE_Beacon/yotta_modules/mbed-hal-nrf51822-mcu/mbed-hal-nrf51822-mcu/lib/nordic_sdk/components/libraries/crc16 -IC:/Users/arm/mbed/oobBeta/ble-
examples/BLE_Beacon/yotta_modules/cmsis-core/cmsis-core -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/ble-nrf51822/source/btle -IC:/Users/ar
m/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/ble-nrf51822/source/btle/custom -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/ble-nrf51
822/source/common -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/ble-nrf51822/source/nordic-sdk/components -IC:/Users/arm/mbed/oobBeta/ble-ex
amples/BLE_Beacon/yotta_modules/ble-nrf51822/source/nordic-sdk/components/libraries -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/ble-nrf518
22/source/nordic-sdk/components/libraries/scheduler -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/ble-nrf51822/source/nordic-sdk/components/
libraries/util -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/ble-nrf51822/source/nordic-sdk/components/libraries/hci -IC:/Users/arm/mbed/oob
Beta/ble-examples/BLE_Beacon/yotta_modules/ble-nrf51822/source/nordic-sdk/components/libraries/bootloader_dfu -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beaco
n/yotta_modules/ble-nrf51822/source/nordic-sdk/components/libraries/bootloader_dfu/hci_transport -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modul
es/ble-nrf51822/source/nordic-sdk/components/libraries/bootloader_dfu/experimental -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/ble-nrf5182
2/source/nordic-sdk/components/libraries/crc16 -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/ble-nrf51822/source/nordic-sdk/components/softd
evice -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/ble-nrf51822/source/nordic-sdk/components/softdevice/s130 -IC:/Users/arm/mbed/oobBeta/bl
e-examples/BLE_Beacon/yotta_modules/ble-nrf51822/source/nordic-sdk/components/softdevice/s130/include -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_
modules/ble-nrf51822/source/nordic-sdk/components/softdevice/s130/doc -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/ble-nrf51822/source/nord
ic-sdk/components/softdevice/common -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/ble-nrf51822/source/nordic-sdk/components/softdevice/commo
n/softdevice_handler -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/ble-nrf51822/source/nordic-sdk/components/drivers_nrf -IC:/Users/arm/mbed
/oobBeta/ble-examples/BLE_Beacon/yotta_modules/ble-nrf51822/source/nordic-sdk/components/drivers_nrf/hal -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yot
ta_modules/ble-nrf51822/source/nordic-sdk/components/drivers_nrf/ble_flash -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/ble-nrf51822/source
/nordic-sdk/components/drivers_nrf/pstorage -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/ble-nrf51822/source/nordic-sdk/components/drivers_
nrf/pstorage/config -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/ble-nrf51822/source/nordic-sdk/components/ble -IC:/Users/arm/mbed/oobBeta/
ble-examples/BLE_Beacon/yotta_modules/ble-nrf51822/source/nordic-sdk/components/ble/ble_radio_notification -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/y
otta_modules/ble-nrf51822/source/nordic-sdk/components/ble/ble_services -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/ble-nrf51822/source/no
rdic-sdk/components/ble/ble_services/ble_dfu -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/ble-nrf51822/source/nordic-sdk/components/ble/com
mon -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/ble-nrf51822/source/nordic-sdk/components/ble/device_manager -IC:/Users/arm/mbed/oobBeta/b
le-examples/BLE_Beacon/yotta_modules/ble-nrf51822/source/nordic-sdk/components/ble/device_manager/config -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yot
ta_modules/mbed-hal-nrf51dk/mbed-hal-nrf51dk -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/mbed-hal/mbed-hal -IC:/Users/arm/mbed/oobBeta/ble
-examples/BLE_Beacon/yotta_modules/mbed-drivers/mbed -IC:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/cmsis-core-nrf51822/cmsis-core-nrf51822
  -DTOOLCHAIN_ARM -DTOOLCHAIN_ARM_STD -DMBED_OPERATORS -DNRF51 -DTARGET_NORDIC -DTARGET_M0 -D__MBED__=1 -DMCU_NORDIC_32K -DTARGET_NRF51822 -DTARGET_MCU_NORDIC_3
2K -D__CORTEX_M0 -DARM_MATH_CM0 --preinclude "C:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/build/nrf51dk-armcc/yotta_config.h" -o ym/mbed-hal-nrf51822-mcu/
existing/CMakeFiles/mbed-hal-nrf51822-startupcod.dir/bootstrap_armcc/startup_nRF51822.S.o C:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/mbed-h
al-nrf51822-mcu/bootstrap_armcc/startup_nRF51822.S
"C:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/mbed-hal-nrf51822-mcu/bootstrap_armcc/startup_nRF51822.S", line 34 (column 8): Error: A1163E: U
nknown opcode TARGET_MCU_NORDIC_16K , expecting opcode or Macro
   34 00000000 #ifdef TARGET_MCU_NORDIC_16K
                      ^
"C:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/mbed-hal-nrf51822-mcu/bootstrap_armcc/startup_nRF51822.S", line 36 (column 7): Error: A1163E: U
nknown opcode defined , expecting opcode or Macro
   36 00000000 #elif defined TARGET_MCU_NORDIC_32K
                     ^
"C:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/mbed-hal-nrf51822-mcu/bootstrap_armcc/startup_nRF51822.S", line 37: Error: A1108E: Multiply def
ined symbol '__initial_sp'
   37 00000000 __initial_sp    EQU     0x20008000
"C:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/mbed-hal-nrf51822-mcu/bootstrap_armcc/startup_nRF51822.S", line 38: Error: A1167E: Invalid line
 start
   38 00000000 #endif
4 Errors, 0 Warnings
[4/129] Building C object ym/dlmalloc/source/CMakeFiles/dlmalloc.dir/C_/Users/...bed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/dlmalloc/source/dlmalloc.c.o
"C:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/dlmalloc/source/dlmalloc.c", line 4715: Warning:  #111-D: statement is unreachable
    return 0;
    ^
C:/Users/arm/mbed/oobBeta/ble-examples/BLE_Beacon/yotta_modules/dlmalloc/source/dlmalloc.c: 1 warning, 0 errors
ninja: build stopped: subcommand failed.
error: command ['ninja'] failed

issues with ASM instructions
target = nrf51dk-armcc

Eddystone implementation should provide a way to advertise more than three frames

The current Eddystone implementation advertises the three frames TLM, URL and UID in the Eddystone specification. However, sometimes is desirable to broadcast additional advertising frames. For instance, if the user wishes to advertise connectable services and Eddystone at the same time. @janjongboom has a more specific use case.

Unfortunately, this is not easy to achieve in the current implementation. It would be desirable to add something like an additional callback where the user can update the advertisement payload at regular intervals.

@pan-

BLE_EddystoneService crashes (out of memory?) on startConfigService

startConfigService doesnt return, but If I directly call startBeaconService It appears to work fine. I dont have good debug support set up yet with softdevice (link to a guide at all?) But it looks like the dynamic allocations crash... if I remove some of first allocations I get a few more allocations down the chain so memory?

Im using a target that inherits from nordic-nrf51822-16k-gcc (its the old nordic pca10000 device)
Has this been tested on 16k?

Jacobs-MacBook-Air:BLE_EddystoneService jacobrosenthal$ yt ls
ble-eddystonebeaconexperimental 0.0.1
┗━ ble 2.0.4
  ┣━ ble-nrf51822 2.0.5 yotta_modules/ble-nrf51822
  ┗━ mbed-drivers 0.11.2 yotta_modules/mbed-drivers
    ┣━ mbed-hal 1.1.0 yotta_modules/mbed-hal
    ┃ ┗━ mbed-hal-nordic 2.0.0 yotta_modules/mbed-hal-nordic
    ┃   ┗━ mbed-hal-nrf51822-mcu 2.0.4 yotta_modules/mbed-hal-nrf51822-mcu
    ┃     ┗━ mbed-hal-mkit 1.0.2 yotta_modules/mbed-hal-mkit
    ┣━ cmsis-core 1.0.3 yotta_modules/cmsis-core
    ┃ ┗━ cmsis-core-nordic 1.0.1 yotta_modules/cmsis-core-nordic
    ┃   ┗━ cmsis-core-nrf51822 1.1.1 yotta_modules/cmsis-core-nrf51822
    ┣━ ualloc 1.0.2 yotta_modules/ualloc
    ┃ ┗━ dlmalloc 1.0.0 yotta_modules/dlmalloc
    ┣━ minar 1.0.1 yotta_modules/minar
    ┃ ┗━ minar-platform 1.0.0 yotta_modules/minar-platform
    ┃   ┗━ minar-platform-mbed 1.0.0 yotta_modules/minar-platform-mbed
    ┣━ core-util 1.0.1 yotta_modules/core-util
    ┗━ compiler-polyfill 1.1.1 yotta_modules/compiler-polyfill

error: ble-nrf51822 does not meet specification

error: ble-nrf51822 does not meet specification ^1.0.0 required by mbed-hal-nrf51822-mcu

indeed, mbed-hal-nrf51822-mcu is 1.0.6 and brings in "ble-nrf51822": "^1.0.0"

Tracking it all through, it seems like mbed-drivers needs to get a bump and trickled all the way through?

ble is bringing in mbed-drivers *
mbed-hal is bringing in mbed-drivers *

mbed-drivers is 0.11.2 and brings in "mbed-hal": "^1.0.0",
mbed-hal is 1.0.5 and brings in "mbed-hal-nordic": "^1.0.0"
mbed-hal-nordic 1.0.0 and brings in "mbed-hal-nrf51822-mcu": "^1.0.0"

Please redirect users to the more up to date BLE examples repo

It would be nice if someone could update this readme... as someone coming to this github repo for the first time (expecting that this master is maintained) it's taken me days to realise that there is actually another mbed repo with more recent examples...

"This repo contains a collection of BLE example applications based on mbed OS 3 and built with yotta. Each example subdirectory contains a separate yotta module meant for building an executable."

How about adding...

for more up-to-date examples please go to: https://github.com/ARMmbed/mbed-os-example-ble

Mention that you should connect to device first

The following Examples
BLE_BatteryLevel
BLE_Beacon
BLE_Button
BLE_EddystoneService
BLE_HeartRate
BLE_LED
BLE_Thermometer

Require connecting to the device before seeing the intended effect. We could mention that in the readme.

Syntax to manually write to a Characteristic

What is the Syntax to manually update the characteristics from the main program loop? I have the following :

ble.updateCharacteristicValue(myChar.getValueHandle(), &hrmCounter, sizeof(hrmCounter));

Which isn't working, what should this be?

Using more than one service doesnt work

Although the HeartRateService and the HelathThermometerService both work just fine, when I enable both then the app crashes on a connection (similar to other issues Ive been seeing).
Does anyone know how I can debug this to find out more information?
Am I supposed to be using this code for new development, there doesn't seem a lot of activity here

I am using a Nordic nrf58122 dev board on windows 10

The mbedtls/* definition in file .mbedignore causes a compile error

I compile BLE_BatteryLevel example for target NUMAKER_PFM_NUC472 but get a error.

The root cause is the NUC472 supports H/W SHA and need to include mbedtls header. Due to the mbedtls/* definition in file .mbedignore, the H/W SHA code cannot find the header and encounters an error. Please remove the mbedtls/* definition to fix this issue.

Below is the compile error message.

......
Scan: mbed
Scan: env
Compile [ 73.6%]: sha1_alt.c
[ERROR] .\mbed-os\targets\TARGET_NUVOTON\TARGET_NUC472\crypto\sha\sha1_alt.c:21:28: fatal error: mbedtls/config.h: No such file or directory
compilation terminated.
[mbed] ERROR: "python" returned error code 1.
[mbed] ERROR: Command "python -u C:\Users\cczhang\mbed\mbed-os-example-ble\BLE_BatteryLevel\mbed-os\tools\make.py -t GCC_ARM -m NUMAKER_PFM_NUC472 --source . --build .\BUILD\NUMAKER_PFM_NUC472\GCC_ARM" in "C:\Users\cczhang\mbed\mbed-os-example-ble\BLE_BatteryLevel"

Eddystone example does not check any errors

Currently the Eddystone example does not check any errors whatsoever. This makes it very difficult for the user to debug if there is a problem (such as a parameter being wrongly set).

Error checking should be introduced throughout the implementation.

Link to nrf app broken

In documentation of each of the examples there is a link to nrf's mobile app. the link is broken due to a missing "?"

ble.gap().onConnection(connectionCallback); crashes app

I created a small application that registers a GattService with a couple of GattCharecteristics.
This all (seems to) works fine, so I added ble.gap().onConnection handler and the app crashes on connection. The handler doesn't actually do anything just registering it seems to cause this behaviour
So identical code without the handler works but uncommenting the ble.gap().onConnection cause the crash

Serial seems to crash app

I tried the ble_heartrate and it works really well - great BUT
I added one line and it crashes on a connection
Serial dbg(p9, p11)
This is on the mkit device

can't install nrf51dk-gcc target as mentioned in the README

~/w/l/s/h/ytest on master ⨯ yotta target nrf51dk-gcc                                                                        
~/w/l/s/h/ytest on master ⨯ yotta install                                              
info: get versions for nrf51dk-gcc
error: could not install target nrf51dk-gcc at * for nrf51dk-gcc
error: nrf51dk-gcc does not exist in the targets registry. Check that the name is correct, and that it has been published.

Missing PLATFORM_SPECIFIC_HAL_LIB

Jacobs-Air:BLE_HeartRate jacobrosenthal$ rm -rf yotta*
Jacobs-Air:BLE_HeartRate jacobrosenthal$ yt target nordic-nrf51822-16k-gcc
info: get versions for nordic-nrf51822-16k-gcc
info: download [email protected] from the public module registry
info: get versions for mbed-gcc
info: download [email protected] from the public module registry
Jacobs-Air:BLE_HeartRate jacobrosenthal$ yt install
info: get versions for ble
info: download [email protected] from the public module registry
info: get versions for ble-nrf51822
info: download [email protected] from the public module registry
info: get versions for mbed-drivers
info: download [email protected] from the public module registry
info: get versions for mbed-hal
info: download [email protected] from the public module registry
info: get versions for cmsis-core
info: download [email protected] from the public module registry
info: get versions for ualloc
info: download [email protected] from the public module registry
info: get versions for minar
info: download [email protected] from the public module registry
info: get versions for core-util
info: download [email protected] from the public module registry
info: get versions for compiler-polyfill
info: download [email protected] from the public module registry
info: get versions for mbed-hal-nordic
info: download [email protected] from the public module registry
info: get versions for mbed-hal-nrf51822-mcu
info: download [email protected] from the public module registry
info: get versions for cmsis-core-nordic
^[[Ainfo: download [email protected] from the public module registry
info: get versions for cmsis-core-nrf51822
info: download [email protected] from the public module registry
info: get versions for dlmalloc
info: download [email protected] from the public module registry
info: get versions for minar-platform
info: download [email protected] from the public module registry
info: get versions for minar-platform-mbed
info: download [email protected] from the public module registry
Jacobs-Air:BLE_HeartRate jacobrosenthal$ yt build
info: generate for target: nordic-nrf51822-16k-gcc 0.1.2 at /Users/jacobrosenthal/Downloads/ble-examples/BLE_HeartRate/yotta_targets/nordic-nrf51822-16k-gcc
GCC version is: 4.8.4
suppressing warnings from ble-nrf51822
CMake Error at /Users/jacobrosenthal/Downloads/ble-examples/BLE_HeartRate/yotta_modules/mbed-hal-nrf51822-mcu/CMakeLists.txt:94 (message):
  Missing PLATFORM_SPECIFIC_HAL_LIB


-- Configuring incomplete, errors occurred!
See also "/Users/jacobrosenthal/Downloads/ble-examples/BLE_HeartRate/build/nordic-nrf51822-16k-gcc/CMakeFiles/CMakeOutput.log".
error: command ['cmake', '-D', 'CMAKE_BUILD_TYPE=RelWithDebInfo', '-G', 'Ninja', '.'] failed
Jacobs-Air:BLE_HeartRate jacobrosenthal$ 

Examples do not compile

neither on master branch nor at the mbedos-techcon-oob2 tag on neither Windows, OS X or Linux neither with gcc nor armcc.

@rgrover @bogdanm

In file included from /Users/username/development/ble-examples/BLE_HeartRate/yotta_modules/mbed-hal-nrf51822-mcu/mbed-hal-nrf51822-mcu/gpio_object.h:19:0,
                 from /Users/username/development/ble-examples/BLE_HeartRate/yotta_modules/mbed-hal-nrf51822-mcu/mbed-hal-nrf51822-mcu/objects.h:84,
                 from /Users/username/development/ble-examples/BLE_HeartRate/yotta_modules/mbed-hal-nrf51dk/mbed-hal-nrf51dk/device.h:57,
                 from /Users/username/development/ble-examples/BLE_HeartRate/yotta_modules/mbed-drivers/mbed/../mbed-drivers/platform.h:21,
                 from /Users/username/development/ble-examples/BLE_HeartRate/yotta_modules/mbed-drivers/mbed/../mbed-drivers/mbed.h:21,
                 from /Users/username/development/ble-examples/BLE_HeartRate/yotta_modules/mbed-drivers/mbed/mbed.h:20,
                 from /Users/username/development/ble-examples/BLE_HeartRate/yotta_modules/ble-nrf51822/source/nRF5xn.cpp:17:
/Users/username/development/ble-examples/BLE_HeartRate/yotta_modules/mbed-drivers/mbed/mbed_assert.h:19:2: warning: #warning mbed/mbed_assert.h is deprecated. Please use mbed-drivers/mbed_assert.h instead. [-Wcpp]
 #warning mbed/mbed_assert.h is deprecated.  Please use mbed-drivers/mbed_assert.h instead.
  ^
In file included from /Users/username/development/ble-examples/BLE_HeartRate/yotta_modules/ble-nrf51822/source/nRF5xn.cpp:18:0:
/Users/username/development/ble-examples/BLE_HeartRate/yotta_modules/ble-nrf51822/source/nRF5xn.h:29:23: error: invalid use of incomplete type 'class BLEInstanceBase'
 class nRF5xn : public BLEInstanceBase
                       ^
In file included from /Users/username/development/ble-examples/BLE_HeartRate/yotta_modules/ble-nrf51822/source/nRF5xn.h:22:0,
                 from /Users/username/development/ble-examples/BLE_HeartRate/yotta_modules/ble-nrf51822/source/nRF5xn.cpp:18:
/Users/username/development/ble-examples/BLE_HeartRate/yotta_modules/ble/ble/BLE.h:32:7: error: forward declaration of 'class BLEInstanceBase'
 class BLEInstanceBase;
       ^
/Users/username/development/ble-examples/BLE_HeartRate/yotta_modules/ble-nrf51822/source/nRF5xn.cpp: In function 'BLEInstanceBase* createBLEInstance()':
/Users/username/development/ble-examples/BLE_HeartRate/yotta_modules/ble-nrf51822/source/nRF5xn.cpp:38:28: error: cannot convert 'nRF5xn*' to 'BLEInstanceBase*' in return
     return (&deviceInstance);
                            ^
/Users/username/development/ble-examples/BLE_HeartRate/yotta_modules/ble-nrf51822/source/nRF5xn.cpp:39:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
 $ yt ls
ble-beacon 0.0.1
┗─ ble 1.1.0
  ┣─ ble-nrf51822 1.0.0 yotta_modules/ble-nrf51822
  ┗─ mbed-drivers 0.11.1 yotta_modules/mbed-drivers
    ┣─ mbed-hal 1.0.3 yotta_modules/mbed-hal
    ┃ ┗─ mbed-hal-nordic 1.0.0 yotta_modules/mbed-hal-nordic
    ┃   ┗─ mbed-hal-nrf51822-mcu 1.0.3 yotta_modules/mbed-hal-nrf51822-mcu
    ┃     ┗─ mbed-hal-nrf51dk 1.0.1 yotta_modules/mbed-hal-nrf51dk
    ┣─ cmsis-core 1.0.1 yotta_modules/cmsis-core
    ┃ ┗─ cmsis-core-nordic 1.0.1 yotta_modules/cmsis-core-nordic
    ┃   ┗─ cmsis-core-nrf51822 1.0.1 yotta_modules/cmsis-core-nrf51822
    ┣─ ualloc 1.0.2 yotta_modules/ualloc
    ┃ ┗─ dlmalloc 1.0.0 yotta_modules/dlmalloc
    ┣─ minar 1.0.1 yotta_modules/minar
    ┃ ┗─ minar-platform 1.0.0 yotta_modules/minar-platform
    ┃   ┗─ minar-platform-mbed 1.0.0 yotta_modules/minar-platform-mbed
    ┣─ core-util 1.0.1 yotta_modules/core-util
    ┗─ compiler-polyfill 1.1.1 yotta_modules/compiler-polyfill

srec_info not installed by default on Ubuntu 14.04

When compiling on Ubuntu 14.04, for the nrf51dk-armcc target, it uses srec_info from the srecord package, which is not installed by default.

sudo apt-get install srecord solves this.

  • Whose responsiblity is this?
  • Is this part of the build system, so the dependencies for yotta should install this?
  • Or is this a dependency specific only to the nrf51dk target?
  • Should you have to manually install this if you want to use this target then?
  • Would you have to read the targets ReadMe first, or should yotta target inform you of that dependency?

@rgrover @autopulated

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.