[PATCH 11/15] lpc1768_mbed.cfg: Remove -DNDEBUG flag

Gedare Bloom gedare at rtems.org
Tue Mar 10 13:15:00 UTC 2015


We have to be careful what we say. Assert() is generally a useful
construct. We just need to define its use correctly, especially in the
shared code regions.

Gedare

On Mon, Mar 9, 2015 at 3:47 PM, Joel Sherrill <joel.sherrill at oarcorp.com> wrote:
>
>
> On March 9, 2015 2:38:19 PM CDT, "Marcos Díaz" <marcos.diaz at tallertechnologies.com> wrote:
>>Thanks for the answer!
>>
>>I can see that we shouldn't have any asserts in the code, we are
>>submitting some changes and drivers for the lpc1768 soon and will try
>>to delete all the asserts in that code.
>
> I think the rtems assert is ok since it is tied to an RTEMS configure flag and disabled by default.
>
> A BSP fault probably should be a fatal error if it can occur in the field.
>
>>Thanks again!
>>
>>
>>On Mon, Mar 9, 2015 at 4:31 PM, Joel Sherrill
>><joel.sherrill at oarcorp.com> wrote:
>>
>>
>>
>>On March 9, 2015 2:25:29 PM CDT, "Marcos Díaz"
>><marcos.diaz at tallertechnologies.com> wrote:
>>>Hi!
>>>
>>>I wanted to know which warning this raised, and how is the correct way
>>>to set this flag in production code?
>>
>>First, there should be no assert's in cpukit so those there should be
>>fixed. I think the same applies for BSPs.
>>
>>It tripped some warnings for set but not used variables on m68k. I
>>noticed it had -DNDEBUG which it shouldn't have, so I removed them.
>>
>>Adding it to CFLAGS on the configure line is the best way but there
>>shouldn't have been any.
>>
>>There is a ticket for the asserts to be removed.
>>
>>
>>>Thanks!
>>>
>>>
>>>On Mon, Mar 9, 2015 at 2:38 PM, Joel Sherrill
>>><joel.sherrill at oarcorp.com> wrote:
>>>
>>>---
>>> c/src/lib/libbsp/arm/lpc176x/make/custom/lpc1768_mbed.cfg | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>>diff --git a/c/src/lib/libbsp/arm/lpc176x/make/custom/lpc1768_mbed.cfg
>>>b/c/src/lib/libbsp/arm/lpc176x/make/custom/lpc1768_mbed.cfg
>>>index 4cf24c8..a5ed9c6 100644
>>>--- a/c/src/lib/libbsp/arm/lpc176x/make/custom/lpc1768_mbed.cfg
>>>+++ b/c/src/lib/libbsp/arm/lpc176x/make/custom/lpc1768_mbed.cfg
>>>@@ -8,7 +8,7 @@ RTEMS_CPU = arm
>>>
>>> CPU_CFLAGS = -march=armv7-m -mthumb
>>>
>>>-CFLAGS_OPTIMIZE_V = -O2 -ggdb3 -DNDEBUG
>>>+CFLAGS_OPTIMIZE_V = -O2 -ggdb3
>>> BINEXT?=.bin
>>> # This defines the operations performed on the linked executable.
>>> # is currently required.
>>>--
>>>1.9.3
>>>
>>>_______________________________________________
>>>devel mailing list
>>>devel at rtems.org
>>>http://lists.rtems.org/mailman/listinfo/devel
>>>
>>>
>>>
>>>
>>>--
>>>
>>>______________________________
>>>
>>>
>>>
>>>
>>
>>>Marcos Díaz
>>>
>>>Software Engineer
>>>
>>>
>>>San Lorenzo 47, 3rd Floor, Office 5
>>>
>>>Córdoba, Argentina
>>>
>>>
>>>Phone: +54 351 4217888 / +54 351 4218211/ +54 351 7617452
>>>
>>>Skype: markdiaz22
>>
>>--joel
>>
>>
>>
>>
>>--
>>
>>______________________________
>>
>>
>>
>>
>>Marcos Díaz
>>
>>Software Engineer
>>
>>
>>San Lorenzo 47, 3rd Floor, Office 5
>>
>>Córdoba, Argentina
>>
>>
>>Phone: +54 351 4217888 / +54 351 4218211/ +54 351 7617452
>>
>>Skype: markdiaz22
>
> --joel
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel



More information about the devel mailing list