ducalex / retro-go

Retro emulation for the ODROID-GO and other ESP32 devices
GNU General Public License v2.0
489 stars 114 forks source link

Requirements not satisfying when trying to build img for esp32s3 #110

Open simplyrohan opened 1 month ago

simplyrohan commented 1 month ago

Describe the bug

While running build-img with rg_tool I am getting an error saying I am not satisfying the packages. In specific, I am running

./rg_tool.py build-img launcher prboom-go --target qtpy-gamer

To Reproduce

  1. Clone retro-go
  2. Run ./rg_tool.py build-img launcher prboom-go --target qtpy-gamer Here is the error I am getting:
    
    === Step: Building ===

Building app 'launcher' Running command: idf.py app -DRG_BUILD_VERSION=1.41-2-g9b53f -DRG_BUILD_TARGET=QTPY_GAMER -DRG_BUILD_TYPE=0 -DRG_ENABLE_PROFILING=0 -DRG_ENABLE_NETWORKING=1 The following Python requirements are not satisfied: Requirement 'cryptography<35,>=2.1.4' was not met. Installed version: 42.0.7 Requirement 'pyparsing<2.4.0,>=2.0.3' was not met. Installed version: 3.1.2 pyelftools>=0.22 idf-component-manager~=1.1 pygdbmi<=0.9.0.2; python_version > "3.10" kconfiglib==13.7.1 Requirement 'reedsolo<=1.5.4,>=1.5.3' was not met. Installed version: 1.7.0 Requirement 'bitstring<4,>=3.1.6' was not met. Installed version: 4.2.2 construct==2.10.54 Please follow the instructions found in the "Set up the tools" section of ESP-IDF Getting Started Guide Diagnostic information: IDF_PYTHON_ENV_PATH: (not set) Python interpreter used: /usr/local/bin/python Warning: python interpreter not running from IDF_PYTHON_ENV_PATH PATH: ...

ESP-IDF v4.3.7-1-g3a71941503

Task failed: Command '['idf.py', 'app', '-DRG_BUILD_VERSION=1.41-2-g9b53f', '-DRG_BUILD_TARGET=QTPY_GAMER', '-DRG_BUILD_TYPE=0', '-DRG_ENABLE_PROFILING=0', '-DRG_ENABLE_NETWORKING=1']' returned non-zero exit status 1.


## Expected behavior ##
According to documentation, `BUILDING.md`, it should make an image for the device.

## Additional context ##
I see that I can resolve these errors by downgrading some packages, but I would really like to avoid doing that because some of them, like `cryptography`, are core package.
ducalex commented 1 month ago

First I think we should confirm that your esp-idf installation is working. If you go to the launcher directory and run idf.py app, does it succeed?

If it fails then it would indicate a problem with your esp-idf installation.

But if it succeeds then I guess we have a compatibility issue with rg_tool.py and your particular setup. I suspect IDF_PYTHON_ENV_PATH: (not set) is a clue, somehow rg_tool.py doesn't pass down all the environment when calling idf.py?

ducalex commented 1 month ago

By the way the qtpy-gamer target is likely broken :(. I've made too many changes since it was introduced and I had no way of ensuring that it kept working. At the very least I'm almost sure that I broke the extended GPIO support.

simplyrohan commented 1 month ago

Sorry for the late reply.

First I think we should confirm that your esp-idf installation is working. If you go to the launcher directory and run idf.py app, does it succeed?

It seems the same dependency issues are happening here.

Here is the error

The following Python requirements are not satisfied:
Requirement 'cryptography<35,>=2.1.4' was not met. Installed version: 42.0.7
Requirement 'pyparsing<2.4.0,>=2.0.3' was not met. Installed version: 3.1.2
pyelftools>=0.22
idf-component-manager~=1.1
pygdbmi<=0.9.0.2; python_version > "3.10"
kconfiglib==13.7.1
Requirement 'reedsolo<=1.5.4,>=1.5.3' was not met. Installed version: 1.7.0
Requirement 'bitstring<4,>=3.1.6' was not met. Installed version: 4.2.2
construct==2.10.54
Please follow the instructions found in the "Set up the tools" section of ESP-IDF Getting Started Guide
Diagnostic information:
    IDF_PYTHON_ENV_PATH: (not set)
    Python interpreter used: /usr/local/bin/python
    Warning: python interpreter not running from IDF_PYTHON_ENV_PATH
    PATH: ...

ESP-IDF v4.3.7-1-g3a71941503

I have installed ESP-IDF according to the docs and got no errors.

Also, I don't really know what the qtpygamer build was for. I want to build this for my QT Py ESP32S3, so should I build it for an ESP32S3? If so, what device would that be? Sorry, but I'm really new to this library 😅

I know this is a separate issue, but I am using an ST7735 TFT display with my QT Py, and it has a custom pin layout. How/Where would I define these? Idealy, I was hoping I could pass the display object (with Adafruit_GFX?)

ducalex commented 1 month ago

For the esp32s3 you will need at least esp-idf 4.4. Also I see that the qtpy-s3 is sold in multiple versions. Retro-Go absolutely needs 2MB of PSRAM or more, if your module doesn't have it then it's futile to continue.

Now to the bad news...

Retro-Go isn't a library, it's an entire operating system. It cannot be embedded in something like an Arduino project unfortunately, nor can it uses Arduino libraries for hardware support. So depending on your hardware, you might have to write drivers or modify existing ones.

If you still want to go ahead I recommend you use esp32s3-devkit-c as your starting point target, likely the closest to what you have. Then you'll have to tweak components/retro-go/targets/esp32s3-devkit-c/config.h to suit your device. It's quite possible you'll also have to patch retro-go to add support for your specific display/input/sound.

Hope you're not too discouraged!

simplyrohan commented 1 month ago

Welp, I have the one with no PSRAM... Thanks for the help though!

simplyrohan commented 1 week ago

@ducalex I got my hands on two QT Py's with 2MB of PSRAM and I'm currently figuring how to use the ESP-IDF