-
Notifications
You must be signed in to change notification settings - Fork 27
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
base: main
Are you sure you want to change the base?
Conversation
@hfudev Hello! This MR has added support for qemu efuse. |
@igrr PTAL, thanks! |
'-global', | ||
f'driver=nvram.{self.app.target}.efuse,property=drive,value=efuse', | ||
'-serial', | ||
f'tcp::{available_port},server,nowait', |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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', |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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.
Closes #269