Quantcast
Channel: MSP low-power microcontroller forum - Recent Threads
Viewing all articles
Browse latest Browse all 22174

MSP430FR2433: DriverLib should not define NDEBUG

$
0
0

Part Number:MSP430FR2433

As discussed in the prior thread that is linked to this question ("Driver Lib FR5xx_6xx NDEBUG"),  DriverLib defines NDEBUG macro in the driverlib file hw_memmap.h, and this seems to be non-standard practice.  Non-standard because many (most?) programmers expect NDEBUG not to be defined by default,  and many programmers are trained to define NDEBUG on the command line or in a project specific file. 

So if one includes a header file from DriverLib, it disables any assert() statements (really macros) that follow in the source, and this surprises most programmers.  IOW it violates the principle of least surprise.

To make the asserts in DriverLib disabled by default, IMO DriverLib should use its own mechanism and not use the NDEBUG symbol.

msp430ware_3_80_04_05


Viewing all articles
Browse latest Browse all 22174

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>