This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Please provide more asserts in SDK libraries

It would be nice if libraries in the SDK contained more asserts about preconditions and postconditions. For example, since app_timer requires the lfclk running, the app_timer_init() implementation should assert that. Such asserts conventionally compile away if NDEBUG is defined.

You might also provide a version of the SD that contained more asserts.

Parents
  • Hi,

    I have relayed your opinion to the software team. I have asked them about similar requests before and their arguments are resources, manhours, priorities, and flash space. The latter is specifically relevant for the Softdevice which we try to keep as small as possible. It is true that we can compile away the debug printouts, but we still need to implement extra mechanisms in the lower layers to produce the relevant information.

    Not too long ago I also saw someone arguing that we had too many asserts. They would rather handle it themselves. So unfortunately it isn't possible to keep everyone satisfied.

Reply
  • Hi,

    I have relayed your opinion to the software team. I have asked them about similar requests before and their arguments are resources, manhours, priorities, and flash space. The latter is specifically relevant for the Softdevice which we try to keep as small as possible. It is true that we can compile away the debug printouts, but we still need to implement extra mechanisms in the lower layers to produce the relevant information.

    Not too long ago I also saw someone arguing that we had too many asserts. They would rather handle it themselves. So unfortunately it isn't possible to keep everyone satisfied.

Children
No Data
Related