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

How to wait for Renode to exit in Python script #7

Open
shareefj opened this issue Jul 13, 2024 · 0 comments
Open

How to wait for Renode to exit in Python script #7

shareefj opened this issue Jul 13, 2024 · 0 comments

Comments

@shareefj
Copy link

First usage of pyrenode3 here and I was wondering if there's a nicer way of waiting for Renode to exit cleanly other than the following? Initially, without the WaitForExit, I see the Analyzer pop up for a split second before I guess Python exits and kills everytihng.

from pyrenode3.wrappers import Analyzer, Emulation, Monitor
from Antmicro.Renode import Emulator

from pathlib import Path
import argparse

def run_renode(repl: Path, elf: Path) -> None:
    e = Emulation()
    zynq = e.add_mach('zynq')
    zynq.load_repl(repl)
    zynq.load_elf(elf)

    Analyzer(zynq.sysbus.uart1).Show()
    e.StartAll()
    Emulator.WaitForExit()

<snip>
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

No branches or pull requests

1 participant