This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR2433: DriverLib should not define NDEBUG

Part Number: MSP430FR2433
Other Parts Discussed in Thread: MSP430WARE

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

**Attention** This is a public forum