GPIO broke a few ARM BSPs

Ketul Shah ketulshah1993 at gmail.com
Sat Aug 15 18:51:17 UTC 2015


Hi,

On 15 August 2015 at 23:57, Joel Sherrill <joel.sherrill at oarcorp.com> wrote:

> Hi
>
> It looks like the gpio addition broke three BSPs:
>
> arm-lpc1768_mbed_ahb_ram_eth
> arm-lpc1768_mbed_ahb_ram
> arm-lpc1768_mbed
>
>
> arm-rtems4.11-gcc --pipe -B../../../../../.././lib/
> -B../../../../../.././lpc1768_mbed_ahb_ram_eth/lib/ -specs bsp_specs
> -qrtems -DHAVE_CONFIG_H
>  -I../../../../../../../../rtems/c/src/lib/libbsp/arm/lpc176x/../../../libcpu/arm/shared/include
>  -march=armv7-m -mthumb -O2 -ggdb3 -Wall -Wmissing-prototypes
> -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -MT
> libbsp_a-timer.o -MD -MP -MF .deps/libbsp_a-timer.Tpo -c -o
> libbsp_a-timer.o `test -f 'timer/timer.c' || echo
> '../../../../../../../../rtems/c/src/lib/libbsp/arm/lpc176x/'`timer/timer.c
> In file included from
> ../../../../../../../../rtems/c/src/lib/libbsp/arm/lpc176x/gpio/gpio.c:25:0:
> ../../../../../.././lpc1768_mbed_ahb_ram_eth/lib/include/bsp/gpio.h:28:4:
> error: #error "BSP_GPIO_PIN_COUNT or BSP_GPIO_PINS_PER_BANK is not defined."
>    #error "BSP_GPIO_PIN_COUNT or BSP_GPIO_PINS_PER_BANK is not defined."
>     ^
> ../../../../../.././lpc1768_mbed_ahb_ram_eth/lib/include/bsp/gpio.h:32:4:
> error: #error "Invalid BSP_GPIO_PIN_COUNT or BSP_GPIO_PINS_PER_BANK."
>    #error "Invalid BSP_GPIO_PIN_COUNT or BSP_GPIO_PINS_PER_BANK."
>     ^
> ../../../../../.././lpc1768_mbed_ahb_ram_eth/lib/include/bsp/gpio.h:41:5:
> error: division by zero in #if
>
>
Certainly !

In /gpio/gpio.c the code
#include <bsp/gpio.h>
Now will point to generic GPIO API rather the bsp specific
(/include/gpio.h) .

And Generic API will generate error if not found certain macros like
 "BSP_GPIO_PIN_COUNT" .

So, I think the solution would be to change the generic gpio api header
file or bsp specific one (which looks not suitable) and give a try.

Best Regards,
Ketul

> --
> -- Joel Sherrill
> Ask me about RTEMS: a free RTOS
> Support and Training Available
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20150816/b76cb2de/attachment-0002.html>


More information about the devel mailing list