:name: Tock on STM32F4
:description: This script runs the Tock cxx_hello sample on STM32F4 Discovery.

using sysbus
$name?="STM32F4_Discovery"
mach create $name
machine LoadPlatformDescription @platforms/boards/stm32f4_discovery-kit.repl

cpu PerformanceInMips 125

$bin?=@https://dl.antmicro.com/projects/renode/stm32f412gdiscovery--tock_kernel.elf-s_3392340-6da12cfcd5c4180b60ce7bf2ad32f019c9e8216e
$app?=@https://dl.antmicro.com/projects/renode/cortex_m4--tock-cxx_hello.tbf-s_16384-2bf6dfc3ffd2894bea56341901beec1e903c3135

showAnalyzer sysbus.usart2

macro reset
"""
    sysbus LoadELF $bin
    sysbus LoadBinary $app 0x08030000
"""

runMacro $reset
