Skip to content

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

@ghost

Description

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions