Notice: We have migrated to GitLab launching 2024-05-01 see here:

#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:


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 03/16/18 at 16:51:10 by Joel Sherrill

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

comment:2 Changed on 03/19/18 at 06:05:39 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 03/19/18 at 06:11:31 by Sebastian Huber

Maybe we should just consider this BSP as unmaintained.

comment:4 Changed on 03/21/18 at 06:43:55 by Sebastian Huber <sebastian.huber@…>

Resolution: fixed
Status: assignedclosed

In [changeset:"26623e37fd9051ef17c029fb115988c9959c814c/rtems" 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.