1:name: Cortex-R52 2:description: This script runs the Zephyr philosophers sample under the Xen hypervisor on a 32-bit ARM Cortex-R52. 3 4$name?="ARM Cortex-R52" 5$xen?=@https://dl.antmicro.com/projects/renode/xen_cortex-r52.bin-s_950280-5abcd07806d4f8d33b370020342470c15bf499b5 6$dtc?=@https://dl.antmicro.com/projects/renode/xen_zephyr_cortex-r52.dtc-s_1961-4e8eefe98742e2860ca28cf82e75ae8d8c6c2a5d 7$zephyr?=@https://dl.antmicro.com/projects/renode/zephyr_philosophers_xen_cortex-r52.bin-s_42884-05ca319e43ca33a124c51f84319229815acc654f 8 9using sysbus 10mach create $name 11 12machine LoadPlatformDescription @platforms/cpus/cortex-r52.repl 13 14python 15""" 16from System.Runtime.CompilerServices import RuntimeHelpers 17from Antmicro.Renode.Peripherals.CPU import RegisterValue 18 19ZEPHYR_IMAGE_BASE = 0xd00080 20ZEPHYR_BASE = 0xb00000 21DTC_BASE = 0xfe00000 22R2_REG = 102 23 24sysbus = self.Machine["sysbus"] 25 26def mc_load_dtc(dtc): 27 sysbus.LoadBinary(dtc, DTC_BASE) 28 dtc_addr = RegisterValue.Create(DTC_BASE, 32) 29 self.Machine["sysbus.cpu"].SetRegister(R2_REG, dtc_addr) 30 31def mc_load_zephyr(zephyr_bin): 32 image_len = System.IO.FileInfo(zephyr_bin).Length 33 sysbus.LoadBinary(zephyr_bin, ZEPHYR_BASE) 34 sysbus.WriteDoubleWord(ZEPHYR_BASE + 0x2c, ZEPHYR_IMAGE_BASE + image_len) 35""" 36 37showAnalyzer uart0 38 39macro reset 40""" 41 sysbus LoadBinary $xen 0x0 42 load_dtc $dtc 43 load_zephyr $zephyr 44""" 45runMacro $reset 46