General Category > Discussion - EVE

How to create a new Host Platform (e.g. Arduino) for EVE Screen Designer

(1/3) > >>

karst.drenth:
Hi All,

I am busy designing a custom board, Arduino MKRzero compatible, which hosts a BT815 to connect to a 480x480 display.

As I am very impressed and pleased with Screen Designer, I'd like to use it for my project.
But... it (of course) cannot generate code for an Arduino platform.

I already managed to define my display and a new "Host Platform"... logically SD will crash when I press the "generate & upload" button.

( see Attachments )

Is there more Info around how to do this ?

As for now my only feasible option looks like choosing RP2040 and manually editing the generated HAL files in my project directory


Greets,
Karst

pauljiao:
ESD will generate the ANSI C code for the selected platform. Arduino is using its own C++ variety language to program.  However, I think it is possible to build C for MCU on the Arduino board.  You may need to modify the code in the HAL of the ESD-generated application. You may refer to this porting guide:

https://brtchip.com/wp-content/uploads/2021/06/ESD-4.10-Exported-Project-Porting-Guide-for-STM32L4-Discovery-Board-and-FreeRTOS.pdf

karst.drenth:
Hi Paul,

Thanks for the link, I will study it and see what's in there for me :)

At first glance, it looks like exactly what I need !  8)

Greets,
Karst

karst.drenth:
Hi,

A little progress-report :)


--- Quote from: pauljiao ---ESD will generate the ANSI C code for the selected platform.
Arduino is using its own C++ variety language to program. 
However, I think it is possible to build C for MCU on the Arduino board. 

--- End quote ---

Yes it is. But it can either have all it's code together with it's INO file or in the libraries folder each library in it's own directory.

So the trick I used is using "Junction-Links" to an MSVC exported version's generated libraries ( see attachment 1 ), then just listing the "main" header files of the ESD generated code in the INO ( see attachment 2 ) .

This will automagically pull-in all the ESD generated code  8) ;D

But... since ESD relies heavily on compile-time defines, the last thing is to take these defines from the MSVC project file and enter them in the Arduino boards.txt definition file as "extra_flags"

Then when it all compiles error free, it will generate a bunch of "undefined references" during link-time. ( only when also "App.h" is also present in the INO )

So...


--- Quote from: pauljiao ---You may need to modify the code in the HAL of the ESD-generated application. You may refer to this porting guide:

--- End quote ---

Yep, better not modify, but write your own HAL_Impl. Which is my next challenge ;)

All the new platform definition stuff is done by editing EVE_Config.h, EVE_util.h, EVE_util.c and EVE_Platform.h ( if anybody is interested, tell me, I'll upload them here ;) )

Greets,
Karst

karst.drenth:
Hi All,

One day further down the road, but for sure really on top of the hill  ;D

It's done and it works  8)

https://youtu.be/kIJu7Trx1sk

In the video you can see first the EVE Screen Designer 4.14.0 in which I designed my Application, then the camera panned to my module.
The first screen is the one from yesterday, coded with Rudolph's library. I still haver a bit of trouble with the touchscreen. Sometimes does not react at all, sometimes it generates "ghost" taps :(
Then after about 5 seconds the generated EVE App takes over.

I built the HAL based upon Rudolph's library routines. Which was pretty straight forward  8)

The first attachment shows the parts which I included in the Arduino sketch's setup() and loop().
The second attachment shows the only mods ( the comments ;) ) to be done in the generated code... not too bad is it ?

Attachment 3 contains the HAL I crafted :P

Greets,
Karst

Navigation

[0] Message Index

[#] Next page

Go to full version