ddd = find_program('ddd', required: false) gdb = find_program('gdb', required: false) ocd = find_program('openocd', required: false) objcopy = find_program('objcopy', required: false) ocd_config = configure_file( input: 'openocd.cfg.in', output: 'openocd.cfg', install: false, configuration: {'BOARD': meson.get_external_property('openocd_board')}) gdb_config = configure_file( input: 'gdb.conf.in', output: 'gdb.conf', install: false, configuration: { 'CROSS_NUM_BREAKPOINTS': meson.get_external_property('cross_num_breakpoints'), 'CROSS_NUM_WATCHPOINTS': meson.get_external_property('cross_num_watchpoints')}) ## For use externally ########################################## flash_cmd = configure_file( input: 'flash.sh.in', output: 'flash.sh', install: false, configuration: { 'OBJCOPY': objcopy.full_path(), 'OCD': ocd.full_path(), 'OCDCONF': meson.current_build_dir() / 'openocd.cfg', 'OFFSET': meson.get_external_property('cross_flash_offset')}) gdb_cmd = configure_file( input: 'gdb.sh.in', output: 'gdb.sh', install: false, configuration: { 'OCD': ocd.full_path(), 'OCDCONF': meson.current_build_dir() / 'openocd.cfg', 'GDB': gdb.full_path(), 'GDBCONF': meson.current_build_dir() / 'gdb.conf'}) ddd_cmd = configure_file( input: 'ddd.sh.in', output: 'ddd.sh', install: false, configuration: { 'OCD': ocd.full_path(), 'OCDCONF': meson.current_build_dir() / 'openocd.cfg', 'GDB': gdb.full_path(), 'GDBCONF': meson.current_build_dir() / 'gdb.conf', 'DDD': ddd.full_path()})