Beispiel #1
0
from testsuite_support.utils import run_tool

run_tool(['-P', 'spec.gpr', '-l', 'link.ld'])
Beispiel #2
0
from testsuite_support.utils import run_tool, contents_of

run_tool(['-s', 'test.out', '-P', 'spec.gpr'])
run_tool(['-s', 'test_no_int.out', '-P', 'spec_no_int.gpr'])

print("with interrupts:")
print(contents_of('test.out'))
print("without interrupts:")
print(contents_of('test_no_int.out'))
Beispiel #3
0
import os
from testsuite_support.utils import run_tool

# If GPR_TOOL is not defined, we should get the default value: startup-gen
run_tool(['-P', 'spec.gpr'])

# Define GPR_TOOL in the environment variables
os.environ["GPR_TOOL"] = "defined_in_env"

# If GPR_TOOL is defined on the command line it should have priority over
# environment variable and default value.
run_tool(['-P', 'spec.gpr', '-XGPR_TOOL=defined_on_cmd_line'])

# If GPR_TOOL is defined in environment variable, but not on the command line
# it should have priority over default value.
run_tool(['-P', 'spec.gpr'])
Beispiel #4
0
from testsuite_support.utils import run_tool, gprbuild, runcross, contents_of

run_tool(['-P', 'prj.gpr', '-s', 'src/crt0.S', '-l', 'src/linker.ld'])

gprbuild(['-f', '-P', 'prj.gpr'])

runcross('riscv64-elf', 'qemu-polarfiresoc', 'obj/main', output='runcross.out')

print(contents_of('runcross.out'))
Beispiel #5
0
from testsuite_support.utils import run_tool, contents_of

run_tool(['-s', 'test.out', '-P', 'spec.gpr', '-XBOOT_MEM=rom'])
print(contents_of('test.out'))

run_tool(['-s', 'test.out', '-P', 'spec.gpr', '-XBOOT_MEM=ram'])
print(contents_of('test.out'))
Beispiel #6
0
from testsuite_support.utils import run_tool

run_tool([])
Beispiel #7
0
from testsuite_support.utils import run_tool, gprbuild, runcross, contents_of


for boot_mem in ['flash', 'sram', 'ccm']:
    for stack_mem in ['sram', 'ccm']:
        print("testing -> boot:%s stack:%s" % (boot_mem, stack_mem))

        run_tool(['-P', 'prj.gpr', '-XBOOT_MEM=%s' % boot_mem,
                  '-XSTACK_MEM=%s' % stack_mem,
                  '-s', 'src/crt0.S', '-l', 'src/linker.ld'])

        gprbuild(['-f', '-P', 'prj.gpr', '-XBOOT_MEM=%s' % boot_mem])

        runcross('arm-elf', 'qemu-stm32', 'obj/main', output='runcross.out')

        print(contents_of('runcross.out'))
Beispiel #8
0
from testsuite_support.utils import run_tool

print(run_tool(['-P', 'spec.gpr', '--print-tags']))
Beispiel #9
0
from testsuite_support.utils import run_tool

run_tool(['-P', 'spec.gpr'])
Beispiel #10
0
from testsuite_support.utils import run_tool

run_tool(['-P', 'invalid.gpr', '-s', 'crt0.S', '-l', 'linker.ld'])
Beispiel #11
0
from testsuite_support.utils import run_tool, contents_of

run_tool(['-s', 'test.out', '-P', 'spec.gpr'])

print(contents_of('test.out'))