$elf_file = "Beyond_v0217.elf"
$crash_file = "cC_tyevideo_proc.txt"
$plugin_file = "freertos_helpers.gdb"
$gdb_path = "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin"

$env:Path = "$env:Path;$gdb_path"

$target_ascii = """set target-charset ASCII"""
$target_remote = """target remote | CrashDebug --elf " + $elf_file + " --dump " + $crash_file + """"

$argslist = $elf_file, "-ex", $target_ascii, "-ex", $target_remote, "-x", $plugin_file

& arm-none-eabi-gdb $argslist