From dd45a11c7b3352ab9adb01e431fcaebb821ec09b Mon Sep 17 00:00:00 2001 From: tunnell <2406627+tunnell@users.noreply.github.com> Date: Sun, 26 Apr 2026 08:39:01 -0500 Subject: [PATCH] emulation: cast frequency to ulong for Renode v1.16+ compatibility Renode v1.16 changed the LimitTimer constructor signature from `long frequency` to `ulong frequency`. Without this cast, the LiteX_Timer_32 peripheral fails to compile against current Renode versions, causing emulation to exit immediately with a peripheral build failure rather than booting Xous. Tested with Renode v1.16.1.4499 (build 9d55b4e6-202604170227) against the standard emulation/xous-release.resc startup. With the cast, Xous boots through to the main loop. Without it, Renode exits before any boot output appears. --- emulation/peripherals/LiteX_Timer_32.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emulation/peripherals/LiteX_Timer_32.cs b/emulation/peripherals/LiteX_Timer_32.cs index c85124a20..5b2a277f0 100644 --- a/emulation/peripherals/LiteX_Timer_32.cs +++ b/emulation/peripherals/LiteX_Timer_32.cs @@ -20,7 +20,7 @@ namespace Antmicro.Renode.Peripherals.Timers.Betrusted public LiteX_Timer_32(Machine machine, long frequency) : base(machine) { IRQ = new GPIO(); - innerTimer = new LimitTimer(machine.ClockSource, frequency, this, "LiteXTimer32", eventEnabled: true, autoUpdate: true); + innerTimer = new LimitTimer(machine.ClockSource, (ulong)frequency, this, "LiteXTimer32", eventEnabled: true, autoUpdate: true); innerTimer.LimitReached += delegate { this.Log(LogLevel.Noisy, "Limit reached");