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

Conflicting and incomplete information on running RGB Panel QEMU #115

Open
3 tasks done
Joebeazelman opened this issue Jan 17, 2025 · 1 comment
Open
3 tasks done

Comments

@Joebeazelman
Copy link

Checklist

  • Checked the issue tracker for similar issues to ensure this is not a duplicate
  • Read the documentation to confirm the issue is not addressed there and your configuration is set correctly
  • Tested with the latest version to ensure the issue hasn't been fixed

How often does this bug occurs?

always

Expected behavior

RGB Panel should run under QEMU when following instructions:

https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-guides/tools/qemu.html

Consistent and accurate error messages and documentation.

Actual behavior (suspected bug)

The documentation for running RGB example states the RGB example runs on ESP32-S3. Presumably, it should also work under QEMU with graphics.

I can build the RGB Panel example without issue in VSCode, but when I try to run it under QEMU from VSCode, I get the following error message:

esp32s3 is not supported by Espressif QEMU. Only esp32 or esp32c3 targets are supported.

This message is contradicted by the IDF QEMU Emulator documentation. Oddly enough, the documentation states you should install several pre-built libraries for, including qemu-riscv32. Is it necessary for ESP32-s3, or is this generalized across SOCs?

When I try it from the command-line using idf.py build and idf.py qemu -g, it runs but I get the following message:

I (2286) boot: Loaded app from partition at offset 0x10000
I (2286) boot: Disabling RNG early entropy source...
E (2290) octal_psram: PSRAM ID read error: 0x00000000, PSRAM chip not found or not supported, or wrong PSRAM line mode
E cpu_start: Failed to init external RAM!

Clearly, VSCode and idf.py don't report the same error message. It would be nice if the example documentation included not only the supported SOCs, but a support matrix of QEMU and SOC combination.

Error logs or terminal output

Steps to reproduce the behavior

See actual behavior.

Project release version

5.4

System architecture

ARM 64-bit (Apple M1/M2, Raspberry Pi 4/5)

Operating system

MacOS

Operating system version

Sequoia

Shell

ZSH

Additional context

No response

@github-actions github-actions bot changed the title Unable to run RGB Panel example Unable to run RGB Panel example (QEMU-237) Jan 17, 2025
@Joebeazelman Joebeazelman changed the title Unable to run RGB Panel example (QEMU-237) Conflicting and incomplete information on running RGB Panel QEMU Jan 17, 2025
@igrr
Copy link
Member

igrr commented Jan 18, 2025

Hi @Joebeazelman,

I think you have encountered several issues:

The documentation for running RGB example states the RGB example runs on ESP32-S3. Presumably, it should also work under QEMU with graphics.

This is not clearly stated in the example documentation, but (as many other IDF examples) this example will not run under QEMU. This example uses the esp_lcd_panel_rgb driver, which doesn't support QEMU (or, QEMU doesn't support emulation of the LCD_CAM peripheral in the ESP32-S3`.

QEMU documentation in ESP-IDF states that:

QEMU supports a virtual framebuffer device. This device doesn't exist in the real ESP32-S3 hardware, but it can be used to test graphics applications in QEMU.

and

To use the virtual framebuffer device in your application, you can add the espressif/esp_lcd_qemu_rgb component to your project. This component provides an esp_lcd compatible driver for the virtual framebuffer device.

Therefore the example which can work in QEMU is this one: https://components.espressif.com/components/espressif/esp_lcd_qemu_rgb/versions/1.0.2/examples/lcd_qemu_rgb_panel?language=en.

Please note that if you are using IDF v5.4 and QEMU release esp_develop_9.0.0_20240606 (supplied with ESP-IDF), then this example still won't work on ESP32-S3, since support for virtual LCD framebuffer has only been added in QEMU in commit 6f41181, which hasn't been released yet. As is, the example will work on ESP32 and ESP32-C3.

For this part, we will:

  • make the next release of QEMU, including virtual LCD framebuffer support for ESP32-S3 (6f41181)
  • update examples/peripherals/lcd/rgb_panel example readme file with a note that this example doesn't work in QEMU

but when I try to run it under QEMU from VSCode, I get the following error message:
esp32s3 is not supported by Espressif QEMU. Only esp32 or esp32c3 targets are supported.

I think this issue is that in VS Code extension, the list of targets supported by QEMU has been hard-coded and hasn't been updated when support for ESP32-S3 in QEMU was added. I'll open an issue in VS Code extension repository to get that fixed.

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

No branches or pull requests

3 participants