BRT Community

General Category => Discussion - EVE => Topic started by: diego.barile on October 05, 2020, 10:35:31 AM

Title: ESD 4.8 with custom board and generic MPU
Post by: diego.barile on October 05, 2020, 10:35:31 AM
Hello everybody.

I'm quite newbie about the EVE ecosystem and I need some tips & tricks just to understand if I'm on the right road.
I've one custom MPU board with NXP LPC1768 processor connected through SPI with an FT812.
I’ve one resistive touch panel connected.
This board will be a touch terminal to manage a UX dashboard showing data taken from an external system, connected via CAN bus.
I plan to write a FW based on FreeRTOS that manage the incoming CAN messages and drive the GUI consequently.

Just to begin I've start a new project using EVE Screen Designer 4.8, building one "hello world" single page EVE app.

Then I've export the project as Eclipse solution, getting a big bunch of C files.
Currently I'm trying to compile them in the NXP LPCXpresso solution to achieve a library the should manage the display. Not really easy due several compiling issues, currently under resolution.

First question: is this approach correct?

After the export the system expose to me also the file App.h that contains the following code:

Code: [Select]
ESD_APPLICATION(App, Include = "App.h", Callback)
typedef struct
{
void *Owner;
AppScreen App_Screen;
} App;

void App__Initializer(App *context);

ESD_SLOT(Initialize)
void App_Initialize(App *context);

ESD_SLOT(Start)
void App_Start(App *context);

ESD_SLOT(Update)
void App_Update(App *context);

ESD_SLOT(Render)
void App_Render(App *context);

ESD_SLOT(Idle)
void App_Idle(App *context);

ESD_SLOT(End)
void App_End(App *context);


Second question: exactly which method must be invoked to initialize the App and which method must be (periodically?) called into a FreeRTOS task?
Again is not clear to me how to initialize the struct App *context.

More in general: I haven't found in the FTDI website some examples similar to my environment: generic CPU, FreeRTOS and ESD 4.8.
Most (or all examples) seems not to use the generated code from ESD 4.8 but seems to use raw commands.

Can anyone give me some answers?
I'll appreciate a lot.

Thanks.  :)
Diego.
Title: Re: ESD 4.8 with custom board and generic MPU
Post by: BRT Community on October 07, 2020, 11:18:40 AM
Hello,

Yes this is the correct approach.
We have a porting guide for the previous version of ESD which you can reference:
https://brtchip.com/wp-content/uploads/Support/Documentation/Application_Notes/Modules/EVE/BRT_AN_001-ESD-3.0-Exported-Project-Porting-Guide.pdf (https://brtchip.com/wp-content/uploads/Support/Documentation/Application_Notes/Modules/EVE/BRT_AN_001-ESD-3.0-Exported-Project-Porting-Guide.pdf)

Customers shall look into the function “Esd_Loop” in file “Ft_Esd_Core.c” to see which slots to be called periodically.

You can find the main function which is the entry to the application in the Ft_Esd_Support.c file.

In FreeRTOS, this main function shall be renamed and invoked by a RTOS thread, this should be scheduled to be higher priority to get fast response.

For App structure initialization, please see the attached picture. It is allocated statically in heap while the application is initialized.


Best Regards,
BRT Community
Title: Re: ESD 4.8 with custom board and generic MPU
Post by: diego.barile on October 07, 2020, 02:10:03 PM
Thank you so much.
I will try asap.

Regards.
Diego Barile.