code: def main(raw_args=None):
      
  
      multifile_choices = frozenset(['c_files'])
  
      if raw_args is None:
          raw_args = sys.argv[1:]
  
      parser = build_parser()
      args = parser.parse_args(raw_args)
  
      if args.output is None and args.format in multifile_choices:
          print("You must specify an output file with -o, --output when "
                "using a format that produces multiple files (-f %s)" % args.format)
          return 1
  
      desc = TBDescriptor(args.bus_definition)
  
      if args.format == 'json':
          print("JSON output is not yet supported")
          return 1
  
      block = desc.get_block()
  
      template_map = {
          'command_map_c': 'command_map_c.c.tpl',
          'command_map_h': 'command_map_c.h.tpl',
          'config_map_c': 'config_variables_c.c.tpl',
          'config_map_h': 'config_variables_c.h.tpl'
      }
  
      template_name = template_map.get(args.format)
      data = block.render_template(template_name)
      print(data)
  
      return 0
docs: Run the iotile-tbcompile script.
  
      Args:
          raw_args (list): Optional list of command line arguments.  If not
              passed these are pulled from sys.argv.