is this also valid for the BLE examples ?

23 Dec 2016

I'm testing adding the NDEBUG macro to the mbed_app.json of the BLE_Button example and I don't see a big change in the generated code size. In particular the xx_printf() family of functions is still being built.

04 Jan 2017

Yes, should apply too. Some sanity checks:

  1. Are you running a recent version of mbed OS?
  2. Have you set the platform.stdio-flush-at-exit option to 'false' as well?
  3. No left-behind printf() calls in application code? Maybe macro expansion?

If all of those are ticket you should see significant savings in a BLE application too. For some numbers, see this blog post.

06 Jan 2017

Hi Jan,

Thanks for your reply, Here is my mbed_app.json for the BLE_Button example:

/media/uploads/nestico1/mbed_app.json

And I'm at the latest release of mbed-os-example-ble, namely: 4553ceffc8

Which gives me this mbed-os lib: 0789928ee7f2 (5.3.1)

I'm setting NDEBUG=1 and also platform.stdio-flush-at-exit to 'false'

The application code i.e. "main.c" does not contain any evident calls to printf-like functions. Do you have any idea why this is happening ? Are you able to reproduce this behaviour on your side.

Thanks in advance, -nestor

Please log in to post a reply.