gdb: create some automated tests with pytest

gem5 baremetal: use m5exit m5op in exit() so as to not force users to
apply a patch for almost all examples
This commit is contained in:
Ciro Santilli 六四事件 法轮功
2018-11-08 19:00:06 +00:00
parent ed177345af
commit e0dbe2416d
20 changed files with 242 additions and 57 deletions

View File

@@ -11,11 +11,11 @@ class BaremetalComponent(common.Component):
bootloader_obj = os.path.join(common.baremetal_build_lib_dir, 'bootloader{}'.format(common.obj_ext))
common_obj = os.path.join(common.baremetal_build_lib_dir, 'common{}'.format(common.obj_ext))
cflags = [
'-I', common.baremetal_src_lib_dir, common.Newline,
'-O0', common.Newline,
'-ggdb3', common.Newline,
'-mcpu={}'.format(common.mcpu), common.Newline,
'-nostartfiles', common.Newline,
'-O0', common.Newline,
'-I', common.baremetal_src_lib_dir, common.Newline,
]
if args.prebuilt:
gcc = 'arm-none-eabi-gcc'
@@ -31,6 +31,7 @@ class BaremetalComponent(common.Component):
uart_address = 0x10009000
else:
raise Exception('unknown machine: ' + common.machine)
cflags.extend(['-D', 'GEM5'.format(uart_address), common.Newline])
else:
entry_address = 0x40000000
uart_address = 0x09000000
@@ -50,8 +51,7 @@ class BaremetalComponent(common.Component):
cflags +
[
'-c', common.Newline,
'-D', common.Newline,
'UART0_ADDR={:#x}'.format(uart_address), common.Newline,
'-D', 'UART0_ADDR={:#x}'.format(uart_address), common.Newline,
'-o', common_obj, common.Newline,
os.path.join(common.baremetal_src_lib_dir, 'common' + common.c_ext), common.Newline,
]