cancel
Showing results for 
Search instead for 
Did you mean: 

Header files STM32WB conflict with TouchGFX

MM..1
Chief III

I try add to pnucleo WB55 project touchgfx package and result is

../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h:1084:29: error: expected identifier before '(' token
 1084 | #define LCD                 ((LCD_TypeDef *) LCD_BASE)
      |                             ^
../TouchGFX/target/generated/TouchGFXGeneratedHAL.hpp:44:66: note: in expansion of macro 'LCD'
   44 |     TouchGFXGeneratedHAL(touchgfx::DMA_Interface& dma, touchgfx::LCD& display, touchgfx::TouchController& tc, uint16_t width, uint16_t height) :
      |                                                                  ^~~
../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h:961:31: error: expected ')' before '(' token
  961 | #define LCD_BASE              (APB1PERIPH_BASE + 0x00002400UL)
      |                               ^
../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h:1084:46: note: in expansion of macro 'LCD_BASE'
 1084 | #define LCD                 ((LCD_TypeDef *) LCD_BASE)
      |                                              ^~~~~~~~
../TouchGFX/target/generated/TouchGFXGeneratedHAL.hpp:44:66: note: in expansion of macro 'LCD'
   44 |     TouchGFXGeneratedHAL(touchgfx::DMA_Interface& dma, touchgfx::LCD& display, touchgfx::TouchController& tc, uint16_t width, uint16_t height) :
      |

and next more errors around defined LCD.

Primary colision is in generated files = hard to edit.

Howto solve this ?

    TouchGFXGeneratedHAL(touchgfx::DMA_Interface& dma, touchgfx::LCD& display, touchgfx::TouchController& tc, uint16_t width, uint16_t height) :
        touchgfx::HAL(dma, display, tc, width, height)
    {
    }

1 ACCEPTED SOLUTION

Accepted Solutions

WB 1.12.1, TGFX 4.17.0 , IDE 1.7.0

My solution

#ifndef TouchGFXGeneratedHAL_HPP
#define TouchGFXGeneratedHAL_HPP
 
#include <touchgfx/hal/HAL.hpp>
 
#undef LCD

View solution in original post

2 REPLIES 2
Osman SOYKURT
ST Employee

Hello MM..1,

Can you give more information about your configuration please ?

  • Which version of TouchGFX Designer do you use ?
  • Which version of the board setup do you use ?

This bug was identified before TouchGFX Designer 4.19.0, and have been resolved since.

/Osman

Osman SOYKURT
ST Software Developer | TouchGFX

WB 1.12.1, TGFX 4.17.0 , IDE 1.7.0

My solution

#ifndef TouchGFXGeneratedHAL_HPP
#define TouchGFXGeneratedHAL_HPP
 
#include <touchgfx/hal/HAL.hpp>
 
#undef LCD