#3352 closed defect (fixed)

Warning in all lpc176x variants

Reported by: Joel Sherrill Owned by: Sebastian Huber
Priority: normal Milestone: 5.1
Component: arch/arm Version: 5
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

bsps/arm/lpc176x/include/bsp.h defines OPERATION_COUNT in an attempt to override the autoconf generated constant. This conflicts and results in this warning:

/home/joel/rtems-work/rtems-testing/rtems/rtems/bsps/arm/lpc176x/include/bsp.h:42:0: warning: "OPERATION_COUNT" redefined

I understand why this is lowered by the BSP but the mechanism used is not good. And if the include file order is different between tests, you could get the BSP value or the autoconf generated value based on the order.

This warning needs to be fixed and a safer mechanism for a BSP to override OPERATION_COUNT defined.

My first suggestion is to use BSP_OPERATION_COUNT and add logic to one of the common test .h files to undef OPERATION_COUNT and redefine it to BSP_OPERATION_COUNT if it is defined.

A safer option might be to change the name of the autoconf generated variable to OPERATION_COUNT_DEFAULT and rely on logic in a common test support .h to define OPERATION_COUNT to OPERATION_COUNT_DEFAULT or BSP_OPERATION_DEFAULT.


Change History (4)

comment:1 Changed on Mar 16, 2018 at 4:51:10 PM by Joel Sherrill

Component: adminarch/arm
Milestone: 5.1
Owner: set to Sebastian Huber
Status: newassigned
Version: 5

comment:2 Changed on Mar 19, 2018 at 6:05:39 AM by Sebastian Huber

This BSP is not from me. It was added with a promise to merge into the lpc24xx BSP. I tend to remove it.

comment:3 Changed on Mar 19, 2018 at 6:11:31 AM by Sebastian Huber

https://lists.rtems.org/pipermail/devel/2014-June/007110.html

Maybe we should just consider this BSP as unmaintained.

comment:4 Changed on Mar 21, 2018 at 6:43:55 AM by Sebastian Huber <sebastian.huber@…>

Resolution: fixed
Status: assignedclosed

In 26623e3/rtems:

bsp/lpc176x: Remove blunt OPERATION_COUNT define

BSP-specific test customization needs a more sophisticated approach.

Close #3352.

Note: See TracTickets for help on using tickets.