Tuesday 23 March 2021

Generate Bill of Materials (BOM) for a Printed Circuit Board: KiCad Tutorial 1.16


Generate Bill of Materials (BOM)


Generate BOM From Pcbnew







1.     Open Pcbnew and click on File and Fabrication Outputs icon.


2.    It is the icon with the little factory picture and click on the bill of materials or


      BOM File … icon.


3.   It is the icon with the dollar sticking out of the top of a BOM box.


4.   This will generate a .csv BOM file with the name of the project.


5.    In my case it would be LTC 1624Video.csv


6.    Open a folder and name it something like "BOM".


7.     Place the BOM file (my case LTC 1624Video.csv) inside the BOM folder.


8.    The BOM file will look something like shown in figure 1.16A below.


Generated BOM File

                                 Figure 1.16A: Generated Bill of Materials (BOM) File


Generate a BOM or Bill of Materials via Eeschema and ”Command error. Return code 11”






  1.     Open Eeschema or the Schematic Layout Editor (icon with transistor and two resistors).

  2.     Click on Tools and select on Generate Bill of Materials … .

  3.     The Bill of Material window opens.

  4.     Under BOM plugins: select bom2grouped_csv.

  5.     Click Generate.

  6.     In my case, you get the following error message as shown in figure 1.16B below

  7.     That is” Command error. Return code 11”.



Bill of Material Window Indicating Command error. Return code 11.

                    Fig. 1.16B: Bill of Material Window Indicating Command error. Return code 11.


8.     The reason for the error is because there are spaces in my paths. 

9.     In my case I have a space in “LTC 1624Video” and “LTC 1624Video.xml” 

10.   Windows does not like spaces in paths

11.    So we must get rid of the spaces in the paths. 

12.     Click Close

How To Get Rid of the Spaces

1.    The trouble is KiCad does not have a “Save As”. 

2.    First create a copy of everything including the folder. 

3.     In my case it is the folder “LTC 1624Video” by right-clicking on the folder and select copy. 

4.     Paste the contents in a folder for instance named “Duplicate” 

5.     Now rename the folder “LTC 1624Video” to “LTC1624Video” to get rid of the space. 

6.     Now open folder “LTC1624Video”

7.      Open project file “LTC 1624Video.pro” in the right column by double-clicking on it. 

8.      With “LTC 1624Video.pro” open now starting for instance from the top remove the spaces 

        from the name of each file in the left column. 

9.      The spaces are removed by renaming the files. 

10.     To rename the file right click on the file and select Rename File.... 

11.    To begin right click on “LTC 1624Video.csv” and the rename it to “LTC1624Video.csv”. 

12.    Do the same for “LTC 1624Video.kicad_pcb”, “LTC 1624Video.net”, “LTC 1624Video.sch” 

          and “LTC 1624Video-cache.lib”.

Try Again To Generate a BOM or Bill of Materials via Eeschema

1.      Now in the left column double click on “LTC1624Video.sch”. 

2.      Eeschema or the Schematic Layout Editor opens. 

3.     Click on Tools and select on Generate Bill of Materials …

4.     The Bill of Material window opens. 

5.     Under BOM plugins: select bom2grouped_csv. Click Generate

6.     The result should be as in figure 1.16C below indicating “Success”.


Bill of Material Window Indicating "Success"
                                   Fig. 1.16C: Bill of Material Window Indicating "Success"

    1.    Close everything. 

    2.    Open your spreadsheet editor. 

    3.    In my case it is LibreOffice Calc. 

    4.     Open and navigate to your newly created folder. 

    5.     In my case it is “LTC1624Video” 

    6.     Click and open the “LTC1624Video” file. 

    7.    It should look as shown in figure 1.16D below.


Spreadsheet Showing BOM Generated Via Eeschema

                       Fig. 1.16D: Spreadsheet Showing BOM Generated Via Eeschema


8.   You can add further columns such as for price and links on where to buy the component.

Let me know if I have made any mistakes.

Do not hesitate to leave a comment below.