]> begriffs open source - meson-cross/blob - armv7m/meson.build
Scripts for choice of debuggers
[meson-cross] / armv7m / meson.build
1 ddd = find_program('ddd', required: false)
2 gdb = find_program('gdb', required: false)
3 ocd = find_program('openocd', required: false)
4 objcopy = find_program('objcopy', required: false)
5
6 ocd_config = configure_file(
7   input: 'openocd.cfg.in',
8   output: 'openocd.cfg',
9   install: false,
10   configuration: {'BOARD': meson.get_external_property('openocd_board')})
11
12 gdb_config = configure_file(
13   input: 'gdb.conf.in',
14   output: 'gdb.conf',
15   install: false,
16   configuration: {
17     'CROSS_NUM_BREAKPOINTS': meson.get_external_property('cross_num_breakpoints'),
18     'CROSS_NUM_WATCHPOINTS': meson.get_external_property('cross_num_watchpoints')})
19
20 ## For use externally ##########################################
21
22 flash_cmd = configure_file(
23   input: 'flash.sh.in',
24   output: 'flash.sh',
25   install: false,
26   configuration: {
27     'OBJCOPY': objcopy.full_path(),
28     'OCD': ocd.full_path(),
29     'OCDCONF': meson.current_build_dir() / 'openocd.cfg',
30     'OFFSET': meson.get_external_property('cross_flash_offset')})
31
32 gdb_cmd = configure_file(
33   input: 'gdb.sh.in',
34   output: 'gdb.sh',
35   install: false,
36   configuration: {
37     'OCD': ocd.full_path(),
38     'OCDCONF': meson.current_build_dir() / 'openocd.cfg',
39     'GDB': gdb.full_path(),
40     'GDBCONF': meson.current_build_dir() / 'gdb.conf'})
41
42 ddd_cmd = configure_file(
43   input: 'ddd.sh.in',
44   output: 'ddd.sh',
45   install: false,
46   configuration: {
47     'OCD': ocd.full_path(),
48     'OCDCONF': meson.current_build_dir() / 'openocd.cfg',
49     'GDB': gdb.full_path(),
50     'GDBCONF': meson.current_build_dir() / 'gdb.conf',
51     'DDD': ddd.full_path()})