mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
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:
@@ -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,
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user