Page 1 of 1

pal_lld.h strange issue in 3.0 project

Posted: Mon Jul 07, 2014 2:21 pm
by Legath
I continue to port rusEfi project to 3.0 branch
i have found strange issue

Code: Select all

/home/legath/rusefi/port/chibios/os/hal/ports/STM32/LLD/GPIOv2/pal_lld.h:444:10: error: 'GPIO_TypeDef' has no member named 'BSRR'
   ((port)->BSRR.W = ((~(bits) & (mask)) << (16 + (offset))) |               \
          ^
/home/legath/rusefi/port/chibios/os/hal/ports/STM32/LLD/GPIOv2/pal_lld.h:472:42: note: in expansion of macro 'pal_lld_writegroup'
 #define pal_lld_writepad(port, pad, bit) pal_lld_writegroup(port, 1, pad, bit)
                                          ^
/home/legath/rusefi/port/chibios/os/hal/include/pal.h:442:37: note: in expansion of macro 'pal_lld_writepad'
 #define palWritePad(port, pad, bit) pal_lld_writepad(port, pad, bit)
                                     ^
/home/legath/rusefi/port/hw_layer/lcd/lcd_HD44780.c:80:3: note: in expansion of macro 'palWritePad'
   palWritePad(getHwPort(boardConfiguration->HD44780_db7), getHwPin(boardConfiguration->HD44780_db7),
   ^
/home/legath/rusefi/port/chibios/os/hal/ports/STM32/LLD/GPIOv2/pal_lld.h:444:10: error: 'GPIO_TypeDef' has no member named 'BSRR'
   ((port)->BSRR.W = ((~(bits) & (mask)) << (16 + (offset))) |               \
          ^
/home/legath/rusefi/port/chibios/os/hal/ports/STM32/LLD/GPIOv2/pal_lld.h:472:42: note: in expansion of macro 'pal_lld_writegroup'
 #define pal_lld_writepad(port, pad, bit) pal_lld_writegroup(port, 1, pad, bit)
                                          ^
/home/legath/rusefi/port/chibios/os/hal/include/pal.h:442:37: note: in expansion of macro 'pal_lld_writepad'
 #define palWritePad(port, pad, bit) pal_lld_writepad(port, pad, bit)
                                     ^
/home/legath/rusefi/port/hw_layer/lcd/lcd_HD44780.c:82:3: note: in expansion of macro 'palWritePad'
   palWritePad(getHwPort(boardConfiguration->HD44780_db6), getHwPin(boardConfiguration->HD44780_db6),
   ^
/home/legath/rusefi/port/chibios/os/hal/ports/STM32/LLD/GPIOv2/pal_lld.h:444:10: error: 'GPIO_TypeDef' has no member named 'BSRR'
   ((port)->BSRR.W = ((~(bits) & (mask)) << (16 + (offset))) |               \
          ^
/home/legath/rusefi/port/chibios/os/hal/ports/STM32/LLD/GPIOv2/pal_lld.h:472:42: note: in expansion of macro 'pal_lld_writegroup'
 #define pal_lld_writepad(port, pad, bit) pal_lld_writegroup(port, 1, pad, bit)
                                          ^
/home/legath/rusefi/port/chibios/os/hal/include/pal.h:442:37: note: in expansion of macro 'pal_lld_writepad'
 #define palWritePad(port, pad, bit) pal_lld_writepad(port, pad, bit)
                                     ^
/home/legath/rusefi/port/hw_layer/lcd/lcd_HD44780.c:84:3: note: in expansion of macro 'palWritePad'
   palWritePad(getHwPort(boardConfiguration->HD44780_db5), getHwPin(boardConfiguration->HD44780_db5),
   ^
/home/legath/rusefi/port/chibios/os/hal/ports/STM32/LLD/GPIOv2/pal_lld.h:444:10: error: 'GPIO_TypeDef' has no member named 'BSRR'
   ((port)->BSRR.W = ((~(bits) & (mask)) << (16 + (offset))) |               \
          ^
/home/legath/rusefi/port/chibios/os/hal/ports/STM32/LLD/GPIOv2/pal_lld.h:472:42: note: in expansion of macro 'pal_lld_writegroup'
 #define pal_lld_writepad(port, pad, bit) pal_lld_writegroup(port, 1, pad, bit)
                                          ^
/home/legath/rusefi/port/chibios/os/hal/include/pal.h:442:37: note: in expansion of macro 'pal_lld_writepad'
 #define palWritePad(port, pad, bit) pal_lld_writepad(port, pad, bit)
                                     ^
/home/legath/rusefi/port/hw_layer/lcd/lcd_HD44780.c:86:3: note: in expansion of macro 'palWritePad'
   palWritePad(getHwPort(boardConfiguration->HD44780_db4), getHwPin(boardConfiguration->HD44780_db4),
   ^
/home/legath/rusefi/port/chibios/os/hal/ports/STM32/LLD/GPIOv2/pal_lld.h:416:44: error: 'GPIO_TypeDef' has no member named 'BSRR'
 #define pal_lld_setport(port, bits) ((port)->BSRR.H.set = (uint16_t)(bits))
                                            ^
/home/legath/rusefi/port/chibios/os/hal/include/pal.h:283:32: note: in expansion of macro 'pal_lld_setport'
 #define palSetPort(port, bits) pal_lld_setport(port, bits)
                                ^
/home/legath/rusefi/port/chibios/os/hal/include/pal.h:463:30: note: in expansion of macro 'palSetPort'
 #define palSetPad(port, pad) palSetPort(port, PAL_PORT_BIT(pad))
                              ^
/home/legath/rusefi/port/hw_layer/lcd/lcd_HD44780.c:89:3: note: in expansion of macro 'palSetPad'
   palSetPad(getHwPort(boardConfiguration->HD44780_e), getHwPin(boardConfiguration->HD44780_e)); // En high
   ^
/home/legath/rusefi/port/chibios/os/hal/ports/STM32/LLD/GPIOv2/pal_lld.h:428:46: error: 'GPIO_TypeDef' has no member named 'BSRR'
 #define pal_lld_clearport(port, bits) ((port)->BSRR.H.clear = (uint16_t)(bits))
                                              ^
/home/legath/rusefi/port/chibios/os/hal/include/pal.h:306:34: note: in expansion of macro 'pal_lld_clearport'
 #define palClearPort(port, bits) pal_lld_clearport(port, bits)
                                  ^
/home/legath/rusefi/port/chibios/os/hal/include/pal.h:486:32: note: in expansion of macro 'palClearPort'
 #define palClearPad(port, pad) palClearPort(port, PAL_PORT_BIT(pad))


i am not sure that is chibios issue but i want to ask, because i have found that in 2.6 branch GPIO_TypeDef under #if 0 .

Re: pal_lld.h strange issue in 3.0 project

Posted: Mon Jul 07, 2014 4:04 pm
by Giovanni
You are not passing as "port" parameter the GPIOx definitions from pal.h, probably you are including ST headers after hal.h and there are redefined macros.

Giovanni