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

boards: mps2_an521: Fix qemu error on Windows #68661

Conversation

michal-smola
Copy link
Contributor

QEMU for mps2_an521 uses tty and pty which is not available on Windows hosts. Running a sample in QEMU on Windows shows an error. Fix it by enabling tty on Unix hosts only.

@zephyrbot zephyrbot added the platform: ARM Arm Limited label Feb 6, 2024
@butok butok requested review from nandojve and butok February 7, 2024 13:32
butok
butok previously approved these changes Feb 9, 2024
Copy link
Contributor

@butok butok left a comment

Choose a reason for hiding this comment

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

Thank you for QEMU support on Windows.

@kartben kartben requested a review from ithinuel March 5, 2024 08:57
Copy link
Collaborator

@ithinuel ithinuel left a comment

Choose a reason for hiding this comment

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

I’m not familiar with QEMU, Do you know what this line does and what makes it unnecessary on Windows?

pty is not available on Windows hosts. Running a sample in Qemu
on Windows shows an error. Fix it by enabling pty on Unix hosts only.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
@michal-smola
Copy link
Contributor Author

The line creates a new pseudo-terminal on the host, connects to it, and redirects the virtual serial port to pseudo-terminal Pseudo-terminal is now available on Windows, it causes QEMU error on Windows.
Updated the PR to reflect changes in the new HW model.

@michal-smola michal-smola requested review from butok and ithinuel March 5, 2024 10:59
@ithinuel
Copy link
Collaborator

ithinuel commented Mar 5, 2024

I understand, thank you.
Does that also mean that on Windows, QEMU does not print the output from that serial port (and that tests cannot be executed with twister) ?

@fabiobaltieri fabiobaltieri merged commit fe38185 into zephyrproject-rtos:main Mar 5, 2024
21 checks passed
@michal-smola
Copy link
Contributor Author

@ithinuel QEMU prints output from serial on Windows, because QEMU still uses options -chardev stdio,id=con,mux=on -serial chardev:con, to connect serial to standard input and output of the QEMU process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: ARM Arm Limited
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants