Calebe94 / ESPBoy

A portable game console based on ESP32 microcontroller.
35 stars 5 forks source link

Crash on gui #1

Closed pebri86 closed 5 years ago

pebri86 commented 5 years ago

Hai, i tried implement your lvgl ui part on my code hence i highly modified it on my repo (https://github.com/pebri86/esp32-micrones), but sometimes esp crash when i access nvs flash ( it say about accessing disable cache on idf). so i move lv_tick_inc in task, after modified i still experience crash but it less often than before if lv_tick_inc using hooks. do you have any issue with this?

thanks

Calebe94 commented 5 years ago

Hello, I didn't experience this problem yet, I'm I went back to work on this project this week so probably I will face this problem soon. If I manage to solve it I'll share the solution with you. We can work together to finish this project. What do you think?

pebri86 commented 5 years ago

Sure.. i'd like to, i also designed my own hardware based on yours. Still workaround on the problem, based on documentation it's occurred when interrupt while accessing flash, so for simple i just disable all interrupt when accessing flash or for better move them to IRAM. Also disable watchdog task for both core ( for this one just dirty hack since i don't know how to configure watchdog at runtime ), still testing but so far it's never crash again.

pebri86 commented 5 years ago

seems my solution work. i also port gnuboy and everything work fine. thank you

Calebe94 commented 5 years ago

What have you done to solve?

i also port gnuboy

Thats great! I'm working on my GUI right now(Which seems a lot like yours hahaha I've take your GUI and the lvgl demo example as an startup), when a I finish that I'll work on the emulators.

pebri86 commented 5 years ago

What have you done to solve?

I moved lv_tick_inc() from system hooks and use separate task instead.

Thats great! I'm working on my GUI right now(Which seems a lot like yours hahaha I've take your GUI and the lvgl demo example as an startup), when a I finish that I'll work on the emulators.

Great! nice GUI design, but how about your memory footprints? I need to find an efficient way to list all files on sdcard so i can reserved memory for GUI, currently i'm using FATFS with long filename support but it took too much heap.

Calebe94 commented 5 years ago

Great! nice GUI design, but how about your memory footprints? Well, I still don't have a problem with the GUI.(But I still don't have tested GUI+Emulators together)

currently i'm using FATFS with long filename support but it took too much heap

I'm now giving a chance to odroid-go sdcard driver. But I have no clue how to call both LVGL and emulators together.(well, I've a little clue, but in the way I think I'll probably have a heap problem).

Are you calling both LVGL and nesemu together?

Can I email you my friend?

pebri86 commented 5 years ago

lvgl and emulator cannot called together because won't enough memory on the esp, we can use two approach when using lvgl and emulator together. first we can separate launcher and emulator to be different app on different partition and design a logical control to select which partition to boot. or the second ones like i use, call lvgl first to select game or settings then cleanup lvgl to run emulator.

Sure you can email me pebri86@gmail.com

Calebe94 commented 5 years ago

Maybe I will also use the second method. But I'm interested to keep the header with the battery and audio volume info. Maybe I can do this by drawing by hand the icons. With that I don't necessarily need LVGL running. I just need my display working and a function to draw the icon to display.

pebri86 commented 5 years ago

Maybe I will also use the second method. But I'm interested to keep the header with the battery and audio volume info. Maybe I can do this by drawing by hand the icons. With that I don't necessarily need LVGL running. I just need my display working and a function to draw the icon to display.

If you want to keep header i think you can use ugui since it use a little memory footprint, i saw it used on pocketsprite in osd like menu when emulator running, but keep in minds pocketsprite use very small display so it only used few heap for display buffer.

Calebe94 commented 5 years ago

If you want to keep header i think you can use ugui since it use a little memory footprint, i saw it used on pocketsprite in osd like menu when emulator running, but keep in minds pocketsprite use very small display so it only used few heap for display buffer.

That's exactly what I was thinking! To use Ugui as pocketsprite did. But I'll do some tests first.

pebri86 commented 5 years ago

Hi, long time no updates. I'm miss development work from this projects, are u still work on this?

Calebe94 commented 5 years ago

Hello @pebri86! Well... I'm not working in this project right now. I'm almost at the end of my engineering degree and I'm also doing internship at the same time. So I'm a little out of time to update the project. I think I'll come back to work in this project only next year :(