Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add esp32 PSRAM support and little bug fix for lv_arduino #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

simonchen007
Copy link
Contributor

1. add PSRAM support for esp32 with LV_PNG_USE_PSRAM .
2. add LV_LVGL_H_INCLUDE_SIMPLE for png_decoder_test.c

simonchen007 and others added 2 commits December 31, 2020 10:40
2. add LV_LVGL_H_INCLUDE_SIMPLE for png_decoder_test.c
@kisvegabor
Copy link
Member

Hi, I think it'd be better to add a similar pattern than in lvgl. It allows platform-independent configuration. If not defined, we can use malloc/free.

What do you think?

@simonchen007
Copy link
Contributor Author

Hi, I think it'd be better to add a similar pattern than in lvgl. It allows platform-independent configuration. If not defined, we can use malloc/free.

What do you think?

Your suggestion is good if add pattern in lvgl_conf.h but need to separate it with the LVGL malloc/free.
Because we found, once we use PSRAM gobally, the LVGL would goes slower.
So, we need LVGL use IRAM, but lib_png use PSRAM only.

@kisvegabor
Copy link
Member

I meant adding similar defines for PNG. E.g.

#define LV_PNG_MALLOC_INCLUDE <stdlib.h>   /*Header for the dynamic memory function*/
#define LV_PNG_ALLOC   malloc       /*Wrapper to malloc*/
#define LV_PNG_FREE    free           /*Wrapper to free*/

@simonchen007
Copy link
Contributor Author

That should be nice. But lv_lib_png need to be change too.

I meant adding similar defines for PNG. E.g.

#define LV_PNG_MALLOC_INCLUDE <stdlib.h>   /*Header for the dynamic memory function*/
#define LV_PNG_ALLOC   malloc       /*Wrapper to malloc*/
#define LV_PNG_FREE    free           /*Wrapper to free*/

@kisvegabor
Copy link
Member

kisvegabor commented Jan 4, 2021

But lv_lib_png need to be change too.

Yes, that's why we have this PR 😄 Or how do you mean it?

@simonchen007
Copy link
Contributor Author

But lv_lib_png need to be change too.

Yes, that's why we have this PR smile Or how do you mean it?

I'm agree with you.

@kisvegabor
Copy link
Member

Can you update the PR accordingly?

@simonchen007
Copy link
Contributor Author

Can you update the PR accordingly?

To the LVGL main repo ?

@kisvegabor
Copy link
Member

I mean only here by using LV_PNG_MALLOC_INCLUDE/MALLOC/FREE

@yanmowudi
Copy link

I meant adding similar defines for PNG. E.g.

#define LV_PNG_MALLOC_INCLUDE <stdlib.h>   /*Header for the dynamic memory function*/
#define LV_PNG_ALLOC   malloc       /*Wrapper to malloc*/
#define LV_PNG_FREE    free           /*Wrapper to free*/

should we replace malloc,free,realloc with lv_mem_alloc,lv_mem_realloc,lv_mem_free?

@kisvegabor
Copy link
Member

This repo was just merged into the lvgl repo. See https://github.com/lvgl/lvgl/tree/master/src/extra/libs/png
Please open a new issue there to see how these configs fit into lvgl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants