-
Notifications
You must be signed in to change notification settings - Fork 113
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
Problem to run / build on esp32s3 #98
Comments
Just some additional information: I have seen the Open PR on this project about the S3 and an other issue talking about S3: I've tryed your procedure and it compiles the only difference is that I ran: PROJECT_VER=develop python rg_tool.py --target=esplay-s3 --no-networking build-img launcher Instead of rg_tool.py --target=esplay-s3 --no-networking launcher So I had some warning but, as you said, the compilation ends successfully. But when I upload the img to the S3, I'm facing the same problem of "invalid header...." My S3 is a 16m flash and 8m of SPIRAM can it comes from there? PS: I've tryed to build the code from the PR with idf-v4.4 and I was able to compile, but after uploading the img file, the result is the same |
The missing #include is fixed in the dev branch and I suggest you work on the dev branch because that's where further S3 fixes will go! One thing you could try is to just build the launcher alone like you would any other esp-idf project, bypass the entire rg_tool and image creation process.
I think the author did successfully run it on his device but never finished the PR. And lots of change were made to both retro-go and esp-idf in the mean time, so I have no idea if current runs on S3 or not.
It was likely generated with 4.4 or 5.0, as 4.3 never supported the S3. |
Hello! Thank you, So now everything seems booting well So it crashes because of not correctly configured pins, etc etc (it's full ok for this part, I'll debug it later). in the idf menuconfig I left nearly everything by default, just I had to enable PSRAM, and setup it to OCTAL Mode. how could I go ahead to build something that the launcher would be able to launch ;-) ? Thank youuu |
Little additional information (quite obvious but may be usefull): I tryed to build the launcher with rg-tool as usual (cleaning all before) So the problems seems being in the final image generated, not in the each project build |
That's an interesting crash, I'm not sure why the stack would overflow. But our stack is pretty small, maybe your version of esp-idf has more overhead or just the s3 i2c driver in general? The task is created in If other tasks cause overflow you can search for other calls to
Yeah it's odd, I guess the format changed for the S3 or we're doing something stupid. I'll have to do some testing later! In the mean time you could try creating a partition table yourself. Once the table flashed, rg_tool.py should be fully functional. You'll be able to run https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-guides/partition-tables.html The partitions retro-go expects are listed in rg_config.py and your CSV file would look as follows (untested):
Note: the sizes listed in rg_config.py will likely be too small, S3 builds are bigger, plus your menuconfig isn't as optimized for size than our sdkconfig. I added 128K to all partitions in the above example, but if you have enough flash, I suggest just making all partitions 1M for simplicity! |
Thanks for the info about the image format! I'll push a fix in a few days, it will likely be an environment variable set in env.py like we have for the .fw format. Or maybe I'll check IDF_TARGET. Not sure yet.
Each target has a
SDMMC 1-line is faster than SPI and uses the same amount of pins (or less), I would use that if I were you! (retro-go already has support for it, check how mrgc-g32 or esplay-s3 do it in their config.h)
Sure, I'm always happy to accept new targets :). It would be nice to have a known working S3 target. |
Hello! Thank you very much for all your good and helpfull advices, I finaly get nearly everything works. Remaining to test I2S Dac, not yet plugged, but the rest works fine. For thoses who will need to make work be carefull with pins assignements. Somes are reserved and cannot be used as we need on Esp32s3. So my advice would be to make a kind of grid to choose the right pins, for instance I made this: Also when something doesn't work, try building and uploading a minimal program for the Esp32s3. I had a lot of troubles to make work the SDSPI, so I used the idf example for the sdspi to debug, and find the right pinout. Also be very very carrefull with the power supply. USB from computer may not be the best power suply. My SD card had some troubles and crashed with strange codes (263) when writting or erasing blocks. I tryed with the USB of an other computer and it worked fine. Other point: the sdkconfig file had to be updated mainly for the configuration of SPIRAM, I join to this comment my sdkconfig for the esp32s3 (it was not generated but, its @ducalex version updated) @ducalex As I said, I will clean up a little all my modifications, and I will make a little PR =). I just want to finish all tests and play a litte with this stuff. =) |
I'm not sure. It certainly could be a missing/incorrect command in your init sequence. But in the past we've had similar glitches caused by various other reasons that you could check:
For 2 you can play with RG_SCREEN_SPEED in your target's config.h, try a lower or higher speed like SPI_MASTER_FREQ_80M, SPI_MASTER_FREQ_40M, SPI_MASTER_FREQ_20M For 3 and 4 you can disable these in the options menu. If it's not currently accessible to you, you can set them manually in
I don't notice any flicker with the devices I have, and I don't think anyone reported that issue to me! I know the ILI9341 has a command to control the refresh rate, maybe yours isn't set correctly? It's described on page 155 of the datasheet: https://cdn-shop.adafruit.com/datasheets/ILI9341.pdf . Also I think in the thread about running without PSRAM I told you to remove the line |
Also is your screen resolution 320x240? I've never tried higher res screens, it could be part of the issue. PS: Please base your PR on the dev branch please because I did some changes to accommodate the S3 better that aren't in master yet (moved sdkconfig to the target folder, moved the LCD init sequence to the target config file, the rg_tool.py changes, etc). Edit: Actually I merged the relevant changes to master, you can base on that if you prefer! |
Hello, thank you again for your answers I made my PR and tested all the stuff with your dev branch. And once fixed the issue I repported here #99 the screen seems working much better. I havent yet found what change in your code makes it work better but glitches around the stripes has desapeared. The problem with the pixels overflowing from right side to the begining of the left side has desapeared also. An other improvement I noticed: Before when I enter from launcher in a game, and when I exit from game to main menu, the screen had some buggy frames. Now it passes to black between this changes. it's very clean. For information I'm using a 320x240 screen. The only remaining default is this kind of blinking screen in launcher. But it's not a big deal. I haven't yet played with the spi speeds. I quickly looked at the ili9341 datasheet, but it will take a while to understand everything. Also just for information I had this line |
Everything works nearly fine with devkit32s3. Last dev version is stable and builds / works on S3 So we can close this issue. For the blinking screen in launcher I created a new specific issue. |
Hello,
I am trying to install retro go on an Esp32s3 DevKitC N16R8
So first of all I'm using docker for building and uploading.
I had a lot of problems to build the project. Here how I build:
So it was impossible to build with
espressif/idf:release-v4.3, espressif/idf:v4.3.6, espressif/idf:release-v4.2, espressif/idf:release-v4.1
But I get the idf framework built with:
espressif/idf:release-v4.4
But then I got a retro go code problem: in file components/retro-go/config.h the target esplay-s3 is missing, so I added it:
So with all this I was able to create an img file: retro-go_1.35_esplay-s3.img
But the created img doesn't work at all on my device
Here how I download it:
I got a warning: "Warning: Image file at 0x0 doesn't look like an image file, so not changing any flash settings."
Not sure it's really problematic.
But then when I monitor the output I get:
I tried to see logs excluding the invalid header message, and it gives:
So there is a problem with the generated img.
Could you advice me something? I think there may be a problem with the baseS3.sdkconfig , I suppose it was generated with the idf 4.3 and I'm using 4.4 to build...
By the way did retro-go had been tested qui target=esplay-s3 ? Because with what is missing in config.h file I cannot figure how it could work. :-)
The text was updated successfully, but these errors were encountered: