cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX error: no declaration matches ERROR

TahaBugraa
Associate II

Hello there, I was working on TouchGFX and when i tried to build my code i got 

error: no declaration matches 'bool TouchGFXHAL::blockCopy(void*, const void*, uint32_t) and same for endFrame and beginFrame. 

But i couldn't solve the problem. 

 

Here is the part from TouchGFXHAL.cpp file.

bool TouchGFXHAL::blockCopy(void* RESTRICT dest, const void* RESTRICT src, uint32_t numBytes)
{
return TouchGFXGeneratedHAL::blockCopy(dest, src, numBytes);
}

/**
* Configures the interrupts relevant for TouchGFX. This primarily entails setting
* the interrupt priorities for the DMA and LCD interrupts.
*/
void TouchGFXHAL::configureInterrupts()
{
// Calling parent implementation of configureInterrupts().
//
// To overwrite the generated implementation, omit call to parent function
// and implemented needed functionality here.

TouchGFXGeneratedHAL::configureInterrupts();
}

/**
* Used for enabling interrupts set in configureInterrupts()
*/
void TouchGFXHAL::enableInterrupts()
{
// Calling parent implementation of enableInterrupts().
//
// To overwrite the generated implementation, omit call to parent function
// and implemented needed functionality here.

TouchGFXGeneratedHAL::enableInterrupts();
}

/**
* Used for disabling interrupts set in configureInterrupts()
*/
void TouchGFXHAL::disableInterrupts()
{
// Calling parent implementation of disableInterrupts().
//
// To overwrite the generated implementation, omit call to parent function
// and implemented needed functionality here.

TouchGFXGeneratedHAL::disableInterrupts();
}

/**
* Configure the LCD controller to fire interrupts at VSYNC. Called automatically
* once TouchGFX initialization has completed.
*/
void TouchGFXHAL::enableLCDControllerInterrupt()
{
// Calling parent implementation of enableLCDControllerInterrupt().
//
// To overwrite the generated implementation, omit call to parent function
// and implemented needed functionality here.

TouchGFXGeneratedHAL::enableLCDControllerInterrupt();
}

bool TouchGFXHAL::beginFrame()
{
return TouchGFXGeneratedHAL::beginFrame();
}

void TouchGFXHAL::endFrame()
{
TouchGFXGeneratedHAL::endFrame();
}

================================================
and this is part from TouchGFXHAL.hpp file.

virtual bool beginFrame();

virtual void endFrame();

/**
* @fn virtual void TouchGFXHAL::flushFrameBuffer();
*
* @brief This function is called whenever the framework has performed a complete draw.
*
* This specialization is only in place to keep compilers happy. Base impl. will call the
* Rect version.
* @see HAL::flushFrameBuffer
*/
virtual void flushFrameBuffer()
{
TouchGFXGeneratedHAL::flushFrameBuffer();
}

/**
* @fn virtual void TouchGFXHAL::flushFrameBuffer(const Rect& rect);
*
* @brief This function is called whenever the framework has performed a partial draw.
*
* This function is called whenever the framework has performed a partial draw.
* On the STM32F7, make sure to clean and invalidate the data cache. This is to
* ensure that LTDC sees correct data when transferring to the display.
*
* @PAram rect The area of the screen that has been drawn, expressed in absolute coordinates.
*
* @see flushFrameBuffer().
*/
virtual void flushFrameBuffer(const touchgfx::Rect& rect);

/**
* @fn virtual bool TouchGFXHAL::blockCopy(void* RESTRICT dest, const void* RESTRICT src, uint32_t numBytes);
*
* @brief This function performs a platform-specific memcpy.
*
* This function performs a platform-specific memcpy, if supported by the hardware.
*
* @PAram [out] dest Pointer to destination memory.
* @PAram [in] src Pointer to source memory.
* @PAram numBytes Number of bytes to copy.
*
* @return true if the copy succeeded, false if copy was not performed.
*/
virtual bool blockCopy(void* RESTRICT dest, const void* RESTRICT src, uint32_t numBytes);

protected:
/**
* @fn virtual uint16_t* TouchGFXHAL::getTFTFrameBuffer() const;
*
* @brief Gets the frame buffer address used by the TFT controller.
*
* Gets the frame buffer address used by the TFT controller.
*
* @return The address of the frame buffer currently being displayed on the TFT.
*/
virtual uint16_t* getTFTFrameBuffer() const;

/**
* @fn virtual void TouchGFXHAL::setTFTFrameBuffer(uint16_t* adr);
*
* @brief Sets the frame buffer address used by the TFT controller.
*
* Sets the frame buffer address used by the TFT controller.
*
* @PAram [in,out] adr New frame buffer address.
*/
virtual void setTFTFrameBuffer(uint16_t* adr);
};

And the exactly error codes is here:

TouchGFXHAL.cpp:156:6: error: no declaration matches 'void TouchGFXHAL::endFrame()'
TouchGFXHAL.cpp:151:6: error: no declaration matches 'bool TouchGFXHAL::beginFrame()'
error: no declaration matches 'bool TouchGFXHAL::blockCopy(void*, const void*, uint32_t)'.

 

 

6 REPLIES 6

Hello @TahaBugraa ,
These functions that you are talking about are generated by TouchGFX, and you can customize them if you prefer. But apparently, the compiler was not able to chain the functions together. 
Have you tried regenerating code from the designer and then compile again?

Mohammad MORADI
ST Software Developer | TouchGFX
TahaBugraa
Associate II

Yes, i tried 3 times in TouchGFx and many times in CubeIDE(clean project then build again). Nothing changed.

I am facing the same issue, did you find any solution to this?

JamshaidUsman_0-1722501806858.png

 

Hello @TahaBugraa and @JamshaidUsman 
I'm really sorry for the late response @TahaBugraa 

Could you please check if the headers are correctly added to the Includes under Paths and Symbols in your project properties -> C/C++ General?

Includes in STM32CubeIDE.png

These two should be available.

Mohammad MORADI
ST Software Developer | TouchGFX
JamshaidUsman
Associate II

I just include the project path to the MCU GCC compiler, and its working fine.

Thanks for your help. 

Glad to hear it works for you now :D

You're very welcome! 

Mohammad MORADI
ST Software Developer | TouchGFX