BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Author Topic: Add code after exporting from Screen Designer  (Read 13575 times)

Vladi

  • Newbie
  • *
  • Posts: 13
    • View Profile
Add code after exporting from Screen Designer
« on: May 26, 2020, 03:44:08 PM »

Hello guys,

I've exported the generated code from the EVE Screen Designer into a eclipse workspace.
I'm wondering that there is no "main.c" in the generated code...

Anyway, I would like to extend the code of the screen designer with my own functions.
For doing this I've just added a "main.c" and simple led function:

int main(void)
{
 "led on"

while (1)
return 0;
}

But I could not compile the code. There was the following error: make***[project_name.elf]

How is it possible to run your own code with the screen designer code parallelly?

It would be great if anyone could answer me this simple question

Edit:
The main-function in the generated code is in the file Ft_Esd_Support.c => there you can add your personal code

And currently there is a bug with debugging the exported code from the ESD into eclipse, because the configuration of debuggin is wrong.
The exported code just has the options "debug or release" and not "FT900_debug or FT900_release"
Next post you see a workaround to overcome the problem.

« Last Edit: May 28, 2020, 10:06:19 AM by Vladi »
Logged

scoprioprise

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Add code after exporting from Screen Designer
« Reply #1 on: May 28, 2020, 08:35:54 AM »

Hi Vladi,
in fact there is not a main.c, you have to find the "main" function, that lies elewhere in the code (that is Ft_Esd_Framework/Ft_Esd_app.c)
But be aware, the "while" loop in ESD architecture is part of Ft_Esd_MainLoop() in Ft_Esd_Framework/Ft_Esd_MainLoop.c
So,to integrate, I suggest creating a "init" stage just before the  Ft_Esd_MainLoop() call in Ft_Esd_app.c file, and then use the already written while loop in the other file to insert your routine.

I had some struggle in that kind of integration at first sight, but if you work with EVE and some versioning tool (a git GUI , for example), you can:
-save yout eclipse project with git;
-export your interface into the eclipse project when needed;
-revert  to the previous ( or simply not commit the new ones ) Ft_Esd_MainLoop.c and Ft_Esd_app.c
-continue editing building and so on.

My two cents.
Logged

Vladi

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Add code after exporting from Screen Designer
« Reply #2 on: May 28, 2020, 10:09:21 AM »

Worarround attached
Logged

Vladi

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Add code after exporting from Screen Designer
« Reply #3 on: May 29, 2020, 01:44:13 PM »

Hello scoprioprise,

thank you for your hints. I will consider this when I'm working on the application.

But actually I can't find your mentioned files: Ft_Esd_Framework/Ft_Esd_app.c ;    Ft_Esd_MainLoop.c
I don´t have these files in the generated project...

I found a main-function in the file "Ft_Esd_Support" as you can see attached.

Would you suggest to implement my own functions before "Esd_Loop(&ec);" or inside this function (which you can see attached)?


Logged

Vladi

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Add code after exporting from Screen Designer
« Reply #4 on: May 29, 2020, 02:09:37 PM »

scoprioprise, could you please help me?

I'm struggeling right now with some things of the screen designer.
In the first attached picture I created a counter inside ESD and connect it to a numeric lable and the ESD_Partial_Ring. That works fine. When a threshold is exceeded the color of the partial ring changes.

But in the second attached picture this color change just doesn't work properly. It is actually the same logic, just the counter signal comes now from an external source (well, it is just a counter in an own function "readSpeed()").

Do you have an idea what could be wrong? I tried several things but I just don´t get it working...

And also: Are there opportunities to start the esd timer automatically at the beginning of the programm? I tried it with the slot-logic-function and connected it to the esd timer but then I even could not see changes at partial ring... Or even better: Are there opportunities to start this condition-logic-functions without timer? I mean another input for the "Do"-field?

I would really appreciate if you have an idea. If you want we could also discuss this via mail :)
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 741
    • View Profile
Re: Add code after exporting from Screen Designer
« Reply #5 on: June 03, 2020, 02:52:18 PM »

Hello Valdi,

Would it be possible for your to provide your project files so I can investigate this behaviour?
If you wish you can email these to support.emea@brtchip.com

Best Regards,
BRT Community
Logged

Vladi

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Add code after exporting from Screen Designer
« Reply #6 on: June 03, 2020, 03:44:21 PM »

Attached you can see the two files of the ESD.
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 741
    • View Profile
Re: Add code after exporting from Screen Designer
« Reply #7 on: June 09, 2020, 02:57:50 PM »

Hello

I was unable to open the project file previously attached.  However, I made a simple test project and it should work
as customer expected. Please give this a try and let me know how you get on.

Best Regards,
BRTCommunity
Logged

Vladi

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Add code after exporting from Screen Designer
« Reply #8 on: June 11, 2020, 02:02:35 PM »

Hello BRT community,

sorry I should have upload a zip file.
Now there is a zip file attached:

It is basically the same project you uploaded.
But I would like to change the color of the Partial Ring when a specific value is exceeded.
I could not fiigure that out yet. Where is the error in the file I attached?
Why the color doesn't change?

I also tried to implement the color change with a timer and a button but even this does not work

Best regards
Vladi

Logged

scoprioprise

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Add code after exporting from Screen Designer
« Reply #9 on: June 12, 2020, 01:22:26 PM »

Hi, sorry for late reply.

I mean, the export from EVE to Eclipse generated the files I was telling about, but as far as I can understand, you are still working under EVE, so you'll never find them....
In my case, changes to every part of the screen have to be applied for each page in the <pagename>_Update() functions.
But in your case I can't help.

Logged