2020-03-18 07:10 PM
I have two questions.
first:
When I add the Line widget to the container widget, a HardFault interrupt occurs.
I confirmed that adding the Line widget to the normal screen worked well.
What is the problem?
second:
When I allocate memory using the "new" operator, the system is showdown.
But I have no problem using the "malloc" function.
How can I solve this?
I have set the Heap memory size enough.
The development environment is as follows.
IDE: STM32CubeIde 1.1
TouchGFX 4.12.3
2020-03-31 08:02 AM
With "Lines" and other canvas widgets you need to enable a cache. or "canvas buffer".
#include <touchgfx/canvas_widget_renderer/CanvasWidgetRenderer.hpp>
#define CANVAS_BUFFER_SIZE (3600)
static uint8_t canvasBuffer[CANVAS_BUFFER_SIZE];
CanvasWidgetRenderer::setupBuffer(canvasBuffer, CANVAS_BUFFER_SIZE);
/Martin