:name: MIMX8ML8 (i.MX 8M Plus)
:description: This script runs Zephyr Shell Module sample on MIMX8ML8 CortexA53 core

include @platforms/boards/nxp-frdm-imx8mplus.repl
using sysbus.ca53Cluster

$bin?=@https://dl.antmicro.com/projects/renode/imx8mp_evk_mimx8ml8_a53-zephyr-shell_module.elf-s_2097840-5f3475d0fa102070d24789bb6945ed6da79dade5

showAnalyzer uart4

ca53Cluster ForEach IsHalted True

macro reset
"""
    # CPU requires these to be set when running Zephyr RTOS without a bootloader
    gic DisabledSecurity true
    gic AffinityRoutingEnabledSecure true

    sysbus LoadELF $bin
    cpu0 IsHalted False

    # Disable the power-on Watchdog Timer. On hardware this is handled by the bootrom
    wdog1 WriteWord 0x8 0x0
    wdog2 WriteWord 0x8 0x0
    wdog3 WriteWord 0x8 0x0
"""

runMacro $reset
