Can I use LVGL on Infineon/Cypress PSoC6 microcontrollers if there is no official port?

Description

I am going to be working on a project that is using the PSoC6, and I would like to use lvgl. However since the PSoC6 isn’t very well known, I couldn’t find an existing lvgl port for it.

I am still a beginner, and the project has a bit of a tight deadline, so I wanted to ask if it still makes sense to try to use lvgl (for example if there is an existing non-official port, or if its easy for a beginner to port it).

What MCU/Processor/Board and compiler are you using?

Infineon/Cypress PSoC6 The exact model is not decided on yet

What do you want to achieve?

Getting LVGL working on the PSoC6 with Modus toolbox or PSoC Creater

If someone already ported it, I would be very grateful if you could share it with me. If not, I’d just like to ask how big of a task it is to port lvgl onto a new platform, I’d be happy to do it and share it, if it’s within my admittedly limited capabilities.

However, the project starts within the next few weeks, so I need to have it done before then, otherwise my boss will probably want to use the existing emWin library (which seems kinda old-fashioned and cumbersome)

Hi,

I got a project for PSoC5LP prototyping kit using PSoC Creator, I’m using a ILI9341 based display with it. I’m using the standard SPI block to transfer the data (using DMA), the only tricky part I had to sort out is DMA transferring big buffers, I don’t know if you have to handle it the same way in PSoC6.

I will upload the project for you later today, hopefully you can re-use most of it. I’m only handling the display, all the input is done with a rotary switch.

Hi Carlos,

thank you so much for your willingness to share your project, that’s very nice of you! Cypress code seems to be very coherent and cleanly written, so hopefully the difference between PSoC5 and 6 won’t be huge.

Hi,

I’ve uploaded my project here, I didn’t had time to clean it up, let me know if you have any questions.

Here’s the relevant part of the communication with the display, you can see I’m using SPI and DMA.

Thank you so much for sharing it with me! I’ll try my hand at doing something similar with the PSoC6, and will report back if ti works.

Sure, let me know if you have any questions, you may need to adapt the lv_config file for your display.

Hey Carlos, I started porting lvgl to the PSoC6 based on your project. Unfortunately, Cypress completely rewrote their SDK for the PSoC6. They know use the so called Peripheral Driver Library which is written to be compatible with their dual core PSoC6 uCs

This means that I have to rewrite any functional calls from the SDK in your project. It shouldn’t be too complicated, but I’m a little confused as to what part belongs to the PSoC5LP SDK and what part is completely detached from it.

From what I understood so far. the IL9341 and lvgl folder are completely abstracted away from the SDK, whereas as the display_tl are the ones that I would need to rewrite for the PSoC6 , that correct?

Also, excuse my ignorance, but how much of an influence does DMA have on the communication between the uC and the display. Would it theoretically be possible to just port lvgl using SPI only?

Yes, display_tl is the only code you will need to port, and DMA is used to send the pixel data without CPU intervention, you can also send it over SPI using a polling approach.