Skip to content

Utility script to create xitem file from board.xml

saikrishnamaddali edited this page May 15, 2019 · 24 revisions

Description

The utility script generate_xitem_json.py is used to create xitem.json file from board.xml file.The script extracts the mandatory fields from board.xml and creates a corresponding xitem.json file.

The following tags are directly inferred from the board.xml file in to xitem.json .

<board schema_version="2.0" vendor="em.avnet.com" name="minized" display_name="MiniZed" url="http://www.minized.org" preset_file="preset.xml" >

<file_version>1.2</file_version> <description>MiniZed is a avnet board</description>

The properties of xitem along with their direct mapping fields in board xml are as follows.

property in xitem Attribute in board xml
name name attribute in board tag
display display_name attribute in board tag
company vendor attribute in board tag
website url attribute in board tag
revision file_version tag
description description tag

The following fields of xitem json are taken from user :

  1. company_display
  2. author
  3. company_url

The following fields of xitem are indirectly inferred from the board.xml:

  1. category in xitem (Based on number of components in board xml of type fpga ).
  2. contributor in xitem (Based on the vendor name in board xml and company url given by user).

Commands :

python generate_xitem_json.py -help (To get the details of arguements for script)

python generate_xitem_json.py --board_file <board_path> --author <author_name> --company_display_name <company_name> --company_url <comapny-url>

Version:

Python Version Supported: 3.3.x

Board Schema File Supported: 2.0

Xitem.json Schema version : 1.0