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

feat: add support for efuse in qemu #291

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

horw
Copy link
Member

@horw horw commented May 11, 2024

Closes #269

@horw horw force-pushed the feat/qemu_efuse branch from d241b47 to 5959de7 Compare May 13, 2024 00:24
@horw horw requested a review from hfudev May 13, 2024 03:44
@horw
Copy link
Member Author

horw commented May 13, 2024

@hfudev Hello! This MR has added support for qemu efuse.

@hfudev hfudev force-pushed the feat/qemu_efuse branch from 5959de7 to afe5548 Compare July 30, 2024 07:32
@hfudev
Copy link
Member

hfudev commented Jul 30, 2024

@igrr PTAL, thanks!

@hfudev hfudev requested a review from igrr July 30, 2024 08:11
@horw horw closed this Dec 29, 2024
'-global',
f'driver=nvram.{self.app.target}.efuse,property=drive,value=efuse',
'-serial',
f'tcp::{available_port},server,nowait',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When launching QEMU and expecting that it should communicate with another application, it is better to use -daemonize flag — as recommended by QEMU documentation. Otherwise there may be a race condition between QEMU getting ready to accept TCP connections and the launch of the other application. It seems child.expect('qemu') aims to work around that, but I am not sure this is reliable enough.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, now that I'm thinking of this... don't you end up with two QEMU processes running at the same time, and accessing the same eFuse file?.. One QEMU process is already launched when dut is created, another one is launched here.

f.write(QEMU_DEFAULT_EFUSE[self.app.target])
qemu_extra_args += [
'-global',
f'driver={self.app.target}.gpio,property=strap_mode,value=0x08',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strap_mode is dependent on the chip target, please search for strap_mode in IDF's qemu_ext.py.

'00000000000000000000000000000000000000000000000000000000000000000000000000000000'
'00000000'
),
'esp32c3': binascii.unhexlify(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also support ESP32-S3 now, please add it as well.

@horw horw reopened this Dec 30, 2024
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.

Add support for running efuse-related tests in pytest-embedded-qemu (RDT-747)
3 participants