ARMmbed / ble-examples

BLE demos using mbed OS 3 and yotta.
Apache License 2.0
24 stars 27 forks source link

BLE_EddystoneService crashes (out of memory?) on startConfigService #28

Closed jacobrosenthal closed 8 years ago

jacobrosenthal commented 8 years ago

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
rgrover commented 8 years ago

FYI, if you are working with the latest yotta targets, you'll find that we print the size of available heap (on the console) at the end of the build. There is also a config option to switch to an S110 softdevice to allow freeing up ~2K of memory.

andresag01 commented 8 years ago

There is note explaining the "out-of-memory" issue in the readme of the example: https://github.com/ARMmbed/ble-examples/blob/master/BLE_EddystoneService/readme.md

jacobrosenthal commented 8 years ago

heh sorry