cancel
Showing results for 
Search instead for 
Did you mean: 

Touch GFX dynamic Graph widget crash the application

IB.1
Associate III

Hello Touch GFX Guys.

Hardware: STM32H7B3I development board

Software: Touch GFX designer 4.16

STM Cube IDE 1.5.0

We are trying to experiment with "dynamic graph" widget and experiencing some problems .

After adding widget on the screen follow code is generated

    dataGraph1.setScale(1);
    dataGraph1.setPosition(10, 10, 380, 180);
    dataGraph1.setGraphAreaMargin(0, 0, 0, 0);
    dataGraph1.setGraphAreaPadding(0, 0, 0, 0);
    dataGraph1.setGraphRangeY(0, 100);
 
    dataGraph1Line1.setScale(1);
    dataGraph1Line1Painter.setColor(touchgfx::Color::getColorFrom24BitRGB(20, 151, 197));
    dataGraph1Line1.setPainter(dataGraph1Line1Painter);
    dataGraph1Line1.setLineWidth(2);
    dataGraph1.addGraphElement(dataGraph1Line1);
 
    dataGraph1.addDataPoint(6.40222585735995f);
  ........
    dataGraph1.addDataPoint(15.6299816028386f);
    dataGraph1.addDataPoint(9.83211034085783f);
    dataGraph1.addDataPoint(10.0465691581937f);

Once we run the application code is crushing. if we comment

dataGraph1.addGraphElement(dataGraph1Line1);

and all follow lines:

dataGraph1.addDataPoint(9.83211034085783f);

application is running but obviously no graph 🙂

We do not have any functions in the code to update graph yet...

We tried to set in CANVAS BUFFER "Overwrite default buffer size " to 7200 bytes

but no luck.

Please advise if anything else we can do to overcome this problem, or any other information we can provide.

Thank you for all your help and support

Regards,

i

20 REPLIES 20
Alexandre RENOUX
Principal

Hello IB.1,

Does it crash also on the simulator ?

Where do you write these lines of code ?

Could you share the folder TouchGFX/gui and the .touchgfx file ?

/Alexandre

IB.1
Associate III

Hi Alexandre,

Thank you for the reply.

  1. when I tried to run on simulator I am getting message "failed"
  2. <screenName>ViewBase.cpp
  3. files attached

Thank you,

Regards,

I

IB.1
Associate III

Hi Alexandre,

here the Gui archive

Thank you

Alexandre RENOUX
Principal

Hello IB.1,

In the end what you gave me is not enough. I would need the entire project. BUT before that I would like you to do the following :

  • Enclose the content of the failed message. When you have issues with your project, the first thing you need to do is enclose the actual error so that we can have a better understanding of why it complains.
  • Clean your project by trying to do only the UI without any board (so just the simulator) and see if it works. Then if it works you can switch to the board. But if the simulator is not running, there's a high chance of the board not working either. I see you have several screens. Only keep the necessary ones. It's very important that you narrow the possibilities for us to answer as easily as possible.

/Alexandre

IB.1
Associate III

Hi Alexandre,

Thank you for the hint to use simulator.

I looked at the simulator messages and it comes down that I have added "#include main.h" it triggers follow error:

    gui/src/workingvc_screen/WorkingVCView.cpp:4:10: fatal error: main.h: No such file or directory
 
     #include "main.h"

But, when I compile code using STM32IDE everything compiles like a charm. Therefore question what I have,:

How we can add search path to Touch GFX project?

Thank you

IB

IB.1
Associate III

Hi Alexandre,

I have tried something else:

I have created test project, with single screen.

If I place "text box" I can see text on simulator and "hardware" works fine

Next,

I replaced "text box" with "dynamic graph" simulator works but hardware crashed.

Please advise.

Thank you,

I

Hello IB.1,

You can add additional include paths in the Makefile situated in TouchGFX/simulator/gcc/ folder. The simulator is not linked to any hardware so it does not know about main.c/.h files.

Also, for better coding habits, if not already done, you should encapsulate #include "main.h" like below ?

extern "C"
{
#include "main.h"
}

/Alexandre

Hello IB.1,

Saying "hardware crashed. Please advise" is unfortunately not enough. Please debug and enclose the debug info like the call stack to see where it hangs exactly.

I don't have an H7B3-DK board with me currently but I'll try when I'll get my hands on one.

So you confirm, you simply added a dynamic graph to a single screen UI and this made the board crash ?

Thank you in advance for the precisions,

/Alexandre

IB.1
Associate III

Hi Alexandre,

Thank you for your replay. I did try step debug., and crash happen when executing

 osKernelStart(); Please see screenshot bellow.

Please advise what else we can try.

Than you,

I

0693W000007BZlvQAG.jpg