KiCad / KiBot Example (#26)

In this example, I demonstrate how to create useful automation for KiCad hardware projects. The Pipeline can be seen running in

https://codeberg.org/ccoenen/Codeberg-KiCad-KiBot-Example

or in a modified form in

https://codeberg.org/ccoenen/Dustbuster-Communicator

---

The automation uses "KiBot", to generate common production files. KiBot can do much more, but I limited this demo to gerber files (used in PCB manufacturing) ibom (used to know which components to place where) and a schematic PDF. It is very likely that projects will want to heavily modify this part of the config anyway, so I only include a starting point.

This example _also_ demonstrates how to add the resulting files to the "packages" facility.

Co-authored-by: amenthes <opensource@amenthes.de>
Reviewed-on: https://codeberg.org/Codeberg-CI/examples/pulls/26
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: Claudius Coenen <ccoenen@noreply.codeberg.org>
Co-committed-by: Claudius Coenen <ccoenen@noreply.codeberg.org>
This commit is contained in:
Claudius Coenen 2023-04-10 17:27:38 +00:00 committed by 6543
parent 6d5060c967
commit e8bedf044f
7 changed files with 1047 additions and 0 deletions

View File

@ -17,3 +17,4 @@ pipeline:
- woodpecker-cli lint StandardML/
- woodpecker-cli lint tectonic/
- woodpecker-cli lint NodeJS/11ty.yml
- woodpecker-cli lint KiCad/kibot.yml

View File

@ -0,0 +1,177 @@
(kicad_pcb (version 20221018) (generator pcbnew)
(general
(thickness 1.6)
)
(paper "A4")
(layers
(0 "F.Cu" signal)
(31 "B.Cu" signal)
(32 "B.Adhes" user "B.Adhesive")
(33 "F.Adhes" user "F.Adhesive")
(34 "B.Paste" user)
(35 "F.Paste" user)
(36 "B.SilkS" user "B.Silkscreen")
(37 "F.SilkS" user "F.Silkscreen")
(38 "B.Mask" user)
(39 "F.Mask" user)
(40 "Dwgs.User" user "User.Drawings")
(41 "Cmts.User" user "User.Comments")
(42 "Eco1.User" user "User.Eco1")
(43 "Eco2.User" user "User.Eco2")
(44 "Edge.Cuts" user)
(45 "Margin" user)
(46 "B.CrtYd" user "B.Courtyard")
(47 "F.CrtYd" user "F.Courtyard")
(48 "B.Fab" user)
(49 "F.Fab" user)
(50 "User.1" user)
(51 "User.2" user)
(52 "User.3" user)
(53 "User.4" user)
(54 "User.5" user)
(55 "User.6" user)
(56 "User.7" user)
(57 "User.8" user)
(58 "User.9" user)
)
(setup
(pad_to_mask_clearance 0)
(pcbplotparams
(layerselection 0x00010fc_ffffffff)
(plot_on_all_layers_selection 0x0000000_00000000)
(disableapertmacros false)
(usegerberextensions false)
(usegerberattributes true)
(usegerberadvancedattributes true)
(creategerberjobfile true)
(dashed_line_dash_ratio 12.000000)
(dashed_line_gap_ratio 3.000000)
(svgprecision 4)
(plotframeref false)
(viasonmask false)
(mode 1)
(useauxorigin false)
(hpglpennumber 1)
(hpglpenspeed 20)
(hpglpendiameter 15.000000)
(dxfpolygonmode true)
(dxfimperialunits true)
(dxfusepcbnewfont true)
(psnegative false)
(psa4output false)
(plotreference true)
(plotvalue true)
(plotinvisibletext false)
(sketchpadsonfab false)
(subtractmaskfromsilk false)
(outputformat 1)
(mirror false)
(drillshape 1)
(scaleselection 1)
(outputdirectory "")
)
)
(net 0 "")
(net 1 "+5V")
(net 2 "GNDD")
(footprint "Connector_BarrelJack:BarrelJack_Horizontal" (layer "F.Cu")
(tstamp b9ee9335-c765-4978-adc7-c1ff263e38af)
(at 46.18 35.305)
(descr "DC Barrel Jack")
(tags "Power Jack")
(property "Sheetfile" "codeberg-kicad-kibot-example.kicad_sch")
(property "Sheetname" "")
(property "ki_description" "DC Barrel Jack")
(property "ki_keywords" "DC power barrel jack connector")
(path "/6cf979ce-2cc8-49d1-8454-dab2833b6925")
(attr through_hole)
(fp_text reference "J1" (at -8.45 5.75) (layer "F.SilkS")
(effects (font (size 1 1) (thickness 0.15)))
(tstamp 174bae05-97b7-4dce-b6f3-ee89b2286902)
)
(fp_text value "Barrel_Jack" (at -6.2 -5.5) (layer "F.Fab")
(effects (font (size 1 1) (thickness 0.15)))
(tstamp 14492fb6-fbeb-42a7-921b-a1392b12d795)
)
(fp_text user "${REFERENCE}" (at -3 -2.95) (layer "F.Fab")
(effects (font (size 1 1) (thickness 0.15)))
(tstamp b7aa8bfa-c8c1-4854-9431-967e3e95c97a)
)
(fp_line (start -13.8 -4.6) (end 0.9 -4.6)
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 4568da28-67a8-470f-b0f2-deabf3eb0a01))
(fp_line (start -13.8 4.6) (end -13.8 -4.6)
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 810ae4b4-1fbb-4667-85e4-94cebf7822e4))
(fp_line (start -5 4.6) (end -13.8 4.6)
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 7e14449a-99e4-4994-836a-843a50a3439c))
(fp_line (start 0.05 -4.8) (end 1.1 -4.8)
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp f7c42e58-ff1c-4212-a065-82876b0e3ccc))
(fp_line (start 0.9 -4.6) (end 0.9 -2)
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp fa628fd6-8d3c-4998-b47a-5f6ab5381530))
(fp_line (start 0.9 1.9) (end 0.9 4.6)
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 4f3a5a06-104d-4932-8e56-b4eb6047cdb6))
(fp_line (start 0.9 4.6) (end -1 4.6)
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp ab767399-ec61-4652-a186-b007379658e1))
(fp_line (start 1.1 -3.75) (end 1.1 -4.8)
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 334ac96e-a196-488f-a056-d831211a7bd9))
(fp_line (start -14 4.75) (end -14 -4.75)
(stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp e0c6af5c-132d-4f8a-a6b8-8df6c64c78bb))
(fp_line (start -5 4.75) (end -14 4.75)
(stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 0458c09b-4396-40b2-86db-614ce5b5e4ec))
(fp_line (start -5 6.75) (end -5 4.75)
(stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 715fb15f-c689-4936-949e-67730c9312e2))
(fp_line (start -1 4.75) (end -1 6.75)
(stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp d068925b-2efb-482c-ae25-1e069a95144e))
(fp_line (start -1 6.75) (end -5 6.75)
(stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp d8690ec5-9af4-4156-9ad4-542ec600b0bf))
(fp_line (start 1 -4.75) (end -14 -4.75)
(stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 319a98ea-11d5-498c-a32a-bb8dd98f01cb))
(fp_line (start 1 -4.5) (end 1 -4.75)
(stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 31845d9a-0c03-48ea-8d9a-4b4a29b7b3df))
(fp_line (start 1 -4.5) (end 1 -2)
(stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 013e54a0-9c02-47d1-9b31-71b058169ff8))
(fp_line (start 1 -2) (end 2 -2)
(stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 03777462-2130-4e88-bfd5-412fa6b7a350))
(fp_line (start 1 2) (end 1 4.75)
(stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp b9ee8142-a378-40d1-b733-a919c196b8da))
(fp_line (start 1 4.75) (end -1 4.75)
(stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 645d7132-5eac-47ab-9876-d715528478a6))
(fp_line (start 2 -2) (end 2 2)
(stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 9afb100e-238e-4e86-9d7c-e8a0a725e7f8))
(fp_line (start 2 2) (end 1 2)
(stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp d7cf7e84-4d46-47b8-a68d-51c8353d1252))
(fp_line (start -13.7 -4.5) (end -13.7 4.5)
(stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp f21470f0-9cf5-4d1e-b00a-a6fb570db918))
(fp_line (start -13.7 4.5) (end 0.8 4.5)
(stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 2509992c-789e-4444-9ef8-11cc9d00d56e))
(fp_line (start -10.2 -4.5) (end -10.2 4.5)
(stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 8327ca13-7587-4ed0-a448-837baa78c8ba))
(fp_line (start -0.003213 -4.505425) (end 0.8 -3.75)
(stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 64299d5a-b098-471c-85e3-4df7f7ea3f36))
(fp_line (start 0 -4.5) (end -13.7 -4.5)
(stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 07a86bf3-b500-4991-bee7-f7e273226396))
(fp_line (start 0.8 4.5) (end 0.8 -3.75)
(stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp b0a07f8d-30c7-4d8f-8136-f9dbacb8e74a))
(pad "1" thru_hole rect (at 0 0) (size 3.5 3.5) (drill oval 1 3) (layers "*.Cu" "*.Mask")
(net 1 "+5V") (pintype "passive") (tstamp 708945b2-aded-4938-8119-e431837adea2))
(pad "2" thru_hole roundrect (at -6 0) (size 3 3.5) (drill oval 1 3) (layers "*.Cu" "*.Mask") (roundrect_rratio 0.25)
(net 2 "GNDD") (pintype "passive") (tstamp e3b23d1e-9c99-4dfb-afc7-06713af001a0))
(pad "3" thru_hole roundrect (at -3 4.7) (size 3.5 3.5) (drill oval 3 1) (layers "*.Cu" "*.Mask") (roundrect_rratio 0.25) (tstamp 5f8c5fce-ce56-4d11-84ae-c4ca7fd9fbdb))
(model "${KICAD6_3DMODEL_DIR}/Connector_BarrelJack.3dshapes/BarrelJack_Horizontal.wrl"
(offset (xyz 0 0 0))
(scale (xyz 1 1 1))
(rotate (xyz 0 0 0))
)
)
(gr_rect (start 31.75 25.4) (end 69.215 45.085)
(stroke (width 0.1) (type default)) (fill none) (layer "Edge.Cuts") (tstamp 1ca6c9b4-bc60-49c8-b4b0-2b1f259fa548))
(gr_text "Amazing Barrel Jack PCB v1.0 " (at 40.64 28.575) (layer "F.SilkS") (tstamp 5c13eacf-f986-4db9-894a-7954ae68dd46)
(effects (font (size 1 1) (thickness 0.15)) (justify left bottom))
)
)

View File

@ -0,0 +1,477 @@
{
"board": {
"3dviewports": [],
"design_settings": {
"defaults": {
"board_outline_line_width": 0.09999999999999999,
"copper_line_width": 0.19999999999999998,
"copper_text_italic": false,
"copper_text_size_h": 1.5,
"copper_text_size_v": 1.5,
"copper_text_thickness": 0.3,
"copper_text_upright": false,
"courtyard_line_width": 0.049999999999999996,
"dimension_precision": 4,
"dimension_units": 3,
"dimensions": {
"arrow_length": 1270000,
"extension_offset": 500000,
"keep_text_aligned": true,
"suppress_zeroes": false,
"text_position": 0,
"units_format": 1
},
"fab_line_width": 0.09999999999999999,
"fab_text_italic": false,
"fab_text_size_h": 1.0,
"fab_text_size_v": 1.0,
"fab_text_thickness": 0.15,
"fab_text_upright": false,
"other_line_width": 0.15,
"other_text_italic": false,
"other_text_size_h": 1.0,
"other_text_size_v": 1.0,
"other_text_thickness": 0.15,
"other_text_upright": false,
"pads": {
"drill": 0.762,
"height": 1.524,
"width": 1.524
},
"silk_line_width": 0.15,
"silk_text_italic": false,
"silk_text_size_h": 1.0,
"silk_text_size_v": 1.0,
"silk_text_thickness": 0.15,
"silk_text_upright": false,
"zones": {
"min_clearance": 0.5
}
},
"diff_pair_dimensions": [],
"drc_exclusions": [],
"meta": {
"version": 2
},
"rule_severities": {
"annular_width": "error",
"clearance": "error",
"connection_width": "warning",
"copper_edge_clearance": "error",
"copper_sliver": "warning",
"courtyards_overlap": "error",
"diff_pair_gap_out_of_range": "error",
"diff_pair_uncoupled_length_too_long": "error",
"drill_out_of_range": "error",
"duplicate_footprints": "warning",
"extra_footprint": "warning",
"footprint": "error",
"footprint_type_mismatch": "ignore",
"hole_clearance": "error",
"hole_near_hole": "error",
"invalid_outline": "error",
"isolated_copper": "warning",
"item_on_disabled_layer": "error",
"items_not_allowed": "error",
"length_out_of_range": "error",
"lib_footprint_issues": "warning",
"lib_footprint_mismatch": "warning",
"malformed_courtyard": "error",
"microvia_drill_out_of_range": "error",
"missing_courtyard": "ignore",
"missing_footprint": "warning",
"net_conflict": "warning",
"npth_inside_courtyard": "ignore",
"padstack": "warning",
"pth_inside_courtyard": "ignore",
"shorting_items": "error",
"silk_edge_clearance": "warning",
"silk_over_copper": "warning",
"silk_overlap": "warning",
"skew_out_of_range": "error",
"solder_mask_bridge": "error",
"starved_thermal": "error",
"text_height": "warning",
"text_thickness": "warning",
"through_hole_pad_without_hole": "error",
"too_many_vias": "error",
"track_dangling": "warning",
"track_width": "error",
"tracks_crossing": "error",
"unconnected_items": "error",
"unresolved_variable": "error",
"via_dangling": "warning",
"zones_intersect": "error"
},
"rules": {
"max_error": 0.005,
"min_clearance": 0.0,
"min_connection": 0.0,
"min_copper_edge_clearance": 0.0,
"min_hole_clearance": 0.25,
"min_hole_to_hole": 0.25,
"min_microvia_diameter": 0.19999999999999998,
"min_microvia_drill": 0.09999999999999999,
"min_resolved_spokes": 2,
"min_silk_clearance": 0.0,
"min_text_height": 0.7999999999999999,
"min_text_thickness": 0.08,
"min_through_hole_diameter": 0.3,
"min_track_width": 0.0,
"min_via_annular_width": 0.09999999999999999,
"min_via_diameter": 0.5,
"solder_mask_clearance": 0.0,
"solder_mask_min_width": 0.0,
"solder_mask_to_copper_clearance": 0.0,
"use_height_for_length_calcs": true
},
"teardrop_options": [
{
"td_allow_use_two_tracks": true,
"td_curve_segcount": 5,
"td_on_pad_in_zone": false,
"td_onpadsmd": true,
"td_onroundshapesonly": false,
"td_ontrackend": false,
"td_onviapad": true
}
],
"teardrop_parameters": [
{
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_target_name": "td_round_shape",
"td_width_to_size_filter_ratio": 0.9
},
{
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_target_name": "td_rect_shape",
"td_width_to_size_filter_ratio": 0.9
},
{
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_target_name": "td_track_end",
"td_width_to_size_filter_ratio": 0.9
}
],
"track_widths": [],
"via_dimensions": [],
"zones_allow_external_fillets": false
},
"layer_presets": [],
"viewports": []
},
"boards": [],
"cvpcb": {
"equivalence_files": []
},
"erc": {
"erc_exclusions": [],
"meta": {
"version": 0
},
"pin_map": [
[
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
2,
0,
1,
0,
0,
1,
0,
2,
2,
2,
2
],
[
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
1,
2
],
[
0,
1,
0,
0,
0,
0,
1,
1,
2,
1,
1,
2
],
[
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
2
],
[
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
2
],
[
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
2,
1,
2,
0,
0,
1,
0,
2,
2,
2,
2
],
[
0,
2,
0,
1,
0,
0,
1,
0,
2,
0,
0,
2
],
[
0,
2,
1,
1,
0,
0,
1,
0,
2,
0,
0,
2
],
[
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2
]
],
"rule_severities": {
"bus_definition_conflict": "error",
"bus_entry_needed": "error",
"bus_to_bus_conflict": "error",
"bus_to_net_conflict": "error",
"conflicting_netclasses": "error",
"different_unit_footprint": "error",
"different_unit_net": "error",
"duplicate_reference": "error",
"duplicate_sheet_names": "error",
"endpoint_off_grid": "warning",
"extra_units": "error",
"global_label_dangling": "warning",
"hier_label_mismatch": "error",
"label_dangling": "error",
"lib_symbol_issues": "warning",
"missing_bidi_pin": "warning",
"missing_input_pin": "warning",
"missing_power_pin": "error",
"missing_unit": "warning",
"multiple_net_names": "warning",
"net_not_bus_member": "warning",
"no_connect_connected": "warning",
"no_connect_dangling": "warning",
"pin_not_connected": "error",
"pin_not_driven": "error",
"pin_to_pin": "warning",
"power_pin_not_driven": "error",
"similar_labels": "warning",
"simulation_model_issue": "error",
"unannotated": "error",
"unit_value_mismatch": "error",
"unresolved_variable": "error",
"wire_dangling": "error"
}
},
"libraries": {
"pinned_footprint_libs": [],
"pinned_symbol_libs": []
},
"meta": {
"filename": "codeberg-kicad-kibot-example.kicad_pro",
"version": 1
},
"net_settings": {
"classes": [
{
"bus_width": 12,
"clearance": 0.2,
"diff_pair_gap": 0.25,
"diff_pair_via_gap": 0.25,
"diff_pair_width": 0.2,
"line_style": 0,
"microvia_diameter": 0.3,
"microvia_drill": 0.1,
"name": "Default",
"pcb_color": "rgba(0, 0, 0, 0.000)",
"schematic_color": "rgba(0, 0, 0, 0.000)",
"track_width": 0.25,
"via_diameter": 0.8,
"via_drill": 0.4,
"wire_width": 6
}
],
"meta": {
"version": 3
},
"net_colors": null,
"netclass_assignments": null,
"netclass_patterns": []
},
"pcbnew": {
"last_paths": {
"gencad": "",
"idf": "",
"netlist": "",
"specctra_dsn": "",
"step": "",
"vrml": ""
},
"page_layout_descr_file": ""
},
"schematic": {
"annotate_start_num": 0,
"drawing": {
"dashed_lines_dash_length_ratio": 12.0,
"dashed_lines_gap_length_ratio": 3.0,
"default_line_thickness": 6.0,
"default_text_size": 50.0,
"field_names": [],
"intersheets_ref_own_page": false,
"intersheets_ref_prefix": "",
"intersheets_ref_short": false,
"intersheets_ref_show": false,
"intersheets_ref_suffix": "",
"junction_size_choice": 3,
"label_size_ratio": 0.375,
"pin_symbol_size": 25.0,
"text_offset_ratio": 0.15
},
"legacy_lib_dir": "",
"legacy_lib_list": [],
"meta": {
"version": 1
},
"net_format_name": "",
"page_layout_descr_file": "",
"plot_directory": "",
"spice_current_sheet_as_root": false,
"spice_external_command": "spice \"%I\"",
"spice_model_current_sheet_as_root": true,
"spice_save_all_currents": false,
"spice_save_all_voltages": false,
"subpart_first_id": 65,
"subpart_id_separator": 0
},
"sheets": [
[
"3f155b01-ecb6-4430-a1f5-a89fbffe2c4b",
""
]
],
"text_variables": {}
}

View File

@ -0,0 +1,281 @@
(kicad_sch (version 20230121) (generator eeschema)
(uuid 3f155b01-ecb6-4430-a1f5-a89fbffe2c4b)
(paper "A4")
(title_block
(title "Codeberg KiCad KiBot Example")
(date "2023-04-09")
(rev "v1.0")
)
(lib_symbols
(symbol "Connector:Barrel_Jack" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
(property "Reference" "J" (at 0 5.334 0)
(effects (font (size 1.27 1.27)))
)
(property "Value" "Barrel_Jack" (at 0 -5.08 0)
(effects (font (size 1.27 1.27)))
)
(property "Footprint" "" (at 1.27 -1.016 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "~" (at 1.27 -1.016 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_keywords" "DC power barrel jack connector" (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_description" "DC Barrel Jack" (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_fp_filters" "BarrelJack*" (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(symbol "Barrel_Jack_0_1"
(rectangle (start -5.08 3.81) (end 5.08 -3.81)
(stroke (width 0.254) (type default))
(fill (type background))
)
(arc (start -3.302 3.175) (mid -3.9343 2.54) (end -3.302 1.905)
(stroke (width 0.254) (type default))
(fill (type none))
)
(arc (start -3.302 3.175) (mid -3.9343 2.54) (end -3.302 1.905)
(stroke (width 0.254) (type default))
(fill (type outline))
)
(polyline
(pts
(xy 5.08 2.54)
(xy 3.81 2.54)
)
(stroke (width 0.254) (type default))
(fill (type none))
)
(polyline
(pts
(xy -3.81 -2.54)
(xy -2.54 -2.54)
(xy -1.27 -1.27)
(xy 0 -2.54)
(xy 2.54 -2.54)
(xy 5.08 -2.54)
)
(stroke (width 0.254) (type default))
(fill (type none))
)
(rectangle (start 3.683 3.175) (end -3.302 1.905)
(stroke (width 0.254) (type default))
(fill (type outline))
)
)
(symbol "Barrel_Jack_1_1"
(pin passive line (at 7.62 2.54 180) (length 2.54)
(name "~" (effects (font (size 1.27 1.27))))
(number "1" (effects (font (size 1.27 1.27))))
)
(pin passive line (at 7.62 -2.54 180) (length 2.54)
(name "~" (effects (font (size 1.27 1.27))))
(number "2" (effects (font (size 1.27 1.27))))
)
)
)
(symbol "power:+5V" (power) (pin_names (offset 0)) (in_bom yes) (on_board yes)
(property "Reference" "#PWR" (at 0 -3.81 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Value" "+5V" (at 0 3.556 0)
(effects (font (size 1.27 1.27)))
)
(property "Footprint" "" (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_keywords" "global power" (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_description" "Power symbol creates a global label with name \"+5V\"" (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(symbol "+5V_0_1"
(polyline
(pts
(xy -0.762 1.27)
(xy 0 2.54)
)
(stroke (width 0) (type default))
(fill (type none))
)
(polyline
(pts
(xy 0 0)
(xy 0 2.54)
)
(stroke (width 0) (type default))
(fill (type none))
)
(polyline
(pts
(xy 0 2.54)
(xy 0.762 1.27)
)
(stroke (width 0) (type default))
(fill (type none))
)
)
(symbol "+5V_1_1"
(pin power_in line (at 0 0 90) (length 0) hide
(name "+5V" (effects (font (size 1.27 1.27))))
(number "1" (effects (font (size 1.27 1.27))))
)
)
)
(symbol "power:GNDD" (power) (pin_names (offset 0)) (in_bom yes) (on_board yes)
(property "Reference" "#PWR" (at 0 -6.35 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Value" "GNDD" (at 0 -3.175 0)
(effects (font (size 1.27 1.27)))
)
(property "Footprint" "" (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_keywords" "global power" (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_description" "Power symbol creates a global label with name \"GNDD\" , digital ground" (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(symbol "GNDD_0_1"
(rectangle (start -1.27 -1.524) (end 1.27 -2.032)
(stroke (width 0.254) (type default))
(fill (type outline))
)
(polyline
(pts
(xy 0 0)
(xy 0 -1.524)
)
(stroke (width 0) (type default))
(fill (type none))
)
)
(symbol "GNDD_1_1"
(pin power_in line (at 0 0 270) (length 0) hide
(name "GNDD" (effects (font (size 1.27 1.27))))
(number "1" (effects (font (size 1.27 1.27))))
)
)
)
)
(wire (pts (xy 31.75 26.035) (xy 44.45 26.035))
(stroke (width 0) (type default))
(uuid 49fa8bac-4fb0-4ff7-9213-540950189c76)
)
(wire (pts (xy 31.75 31.75) (xy 31.75 31.115))
(stroke (width 0) (type default))
(uuid 5f59b4cb-72f4-4cb9-afaa-f96b69b581da)
)
(wire (pts (xy 31.75 31.115) (xy 44.45 31.115))
(stroke (width 0) (type default))
(uuid bada701f-975b-43ca-a274-4bc3d6f21d60)
)
(wire (pts (xy 31.75 25.4) (xy 31.75 26.035))
(stroke (width 0) (type default))
(uuid e3a51d62-7067-477f-84fe-62e48c2733c1)
)
(text "WOW A BARREL JACK!" (at 34.29 45.72 0)
(effects (font (size 1.27 1.27)) (justify left bottom))
(uuid 99270f99-11a7-4499-a14b-5775c2528f67)
)
(symbol (lib_id "power:+5V") (at 31.75 25.4 0) (unit 1)
(in_bom yes) (on_board yes) (dnp no) (fields_autoplaced)
(uuid 30f170cb-512a-4013-b8f0-53ca7a8fee24)
(property "Reference" "#PWR02" (at 31.75 29.21 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Value" "+5V" (at 31.75 21.59 0)
(effects (font (size 1.27 1.27)))
)
(property "Footprint" "" (at 31.75 25.4 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (at 31.75 25.4 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid 7e892dc3-0d13-427f-ac2c-073ae6f99789))
(instances
(project "codeberg-kicad-kibot-example"
(path "/3f155b01-ecb6-4430-a1f5-a89fbffe2c4b"
(reference "#PWR02") (unit 1)
)
)
)
)
(symbol (lib_id "Connector:Barrel_Jack") (at 52.07 28.575 0) (mirror y) (unit 1)
(in_bom yes) (on_board yes) (dnp no) (fields_autoplaced)
(uuid 6cf979ce-2cc8-49d1-8454-dab2833b6925)
(property "Reference" "J1" (at 58.42 27.94 0)
(effects (font (size 1.27 1.27)) (justify right))
)
(property "Value" "Barrel_Jack" (at 58.42 30.48 0)
(effects (font (size 1.27 1.27)) (justify right))
)
(property "Footprint" "Connector_BarrelJack:BarrelJack_Horizontal" (at 50.8 29.591 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "~" (at 50.8 29.591 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid c17a03ba-1dd8-418a-a02a-133202b9114b))
(pin "2" (uuid efec6bac-c404-4f2a-ac18-18bff249951e))
(instances
(project "codeberg-kicad-kibot-example"
(path "/3f155b01-ecb6-4430-a1f5-a89fbffe2c4b"
(reference "J1") (unit 1)
)
)
)
)
(symbol (lib_id "power:GNDD") (at 31.75 31.75 0) (unit 1)
(in_bom yes) (on_board yes) (dnp no) (fields_autoplaced)
(uuid ab848cb8-f435-44e1-afea-d29e53138f9a)
(property "Reference" "#PWR01" (at 31.75 38.1 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Value" "GNDD" (at 31.75 36.83 0)
(effects (font (size 1.27 1.27)))
)
(property "Footprint" "" (at 31.75 31.75 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (at 31.75 31.75 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid d895b17f-f837-4712-93dd-78663f451f13))
(instances
(project "codeberg-kicad-kibot-example"
(path "/3f155b01-ecb6-4430-a1f5-a89fbffe2c4b"
(reference "#PWR01") (unit 1)
)
)
)
)
(sheet_instances
(path "/" (page "1"))
)
)

View File

@ -0,0 +1,63 @@
# THIS IS NOT A WOODPECKER FILE! IT IS A KIBOT CONFIG AS AN EXAMPLE!
# LOOK AT https://github.com/INTI-CMNB/KiBot/ for details on KiBot
# This really is just a very very short and reduced example!
#
# This files goes into the same place your .kicad_pro / .kicad_sch / .kicad_pcb
# files live in. It is not directly tied to woodpecker and can be used without it.
kibot:
version: 1
preflight:
check_zone_fills: true
# there are various other preflight options,
# you can use this to raise errors in DRC or ERC
outputs:
- name: 'gerbers'
comment: "Gerbers for production"
type: gerber
dir: kibot/gerber
layers:
- "copper"
- "technical"
- name: "gerber-drill"
comment: "Drill positions for production"
type: "gerb_drill"
dir: kibot/gerber
- name: "gerber-compressed"
comment: "compressing the gerbers into one convenient file"
type: compress
dir: kibot
options:
files:
- from_output: "gerbers"
dest: /
- from_output: "gerber-drill"
dest: /
- name: 'ibom'
type: 'ibom'
comment: "ibom for your convenience"
dir: kibot
- name: 'schematic-pdf'
comment: 'schematic for your convenience'
type: 'pdf_sch_print'
dir: kibot
- name: "production-files"
comment: "compressing all the generated files for easy downloading"
type: compress
dir: kibot
options:
files:
- from_output: "gerber-compressed"
dest: /
- from_output: "ibom"
dest: /
- from_output: "schematic-pdf"
dest: /

47
KiCad/kibot.yml Normal file
View File

@ -0,0 +1,47 @@
# KiCad projects on Codeberg
#
# Copy this into your .woodpecker directory, or place it into the root
# directory of your repository and call it .woodpecker.yml
#
# This uses [KiBot](https://github.com/INTI-CMNB/KiBot/) to automate a
# lot of things surrounding electronics projects in KiCad
#
# In this example, I'm assuming you want to generate gerber files
# and a schematic PDF automatically on each push, but KiBot has a vast
# number of options that you can look into!
#
# We will store the files as a single zip file in the "packages" section
# of your project. For this to work, you will need to add two secrets:
# - codeberg_user should contain your username, the way it is used to log in
# - codeberg_token is created in your codeberg account settings and can then
# be copied to the woodpecker secrets. It gives the CI system access to
# your account (we need this to post to "packages")
#
# Packages will show up in your project after you go to your personal packages
# page https://codeberg.org/<your username>/-/packages and associate the
# newly created package with your project. This only has to be done once.
#
# The included `config.kibot.yaml` file is an example KiBot config file, not
# a woodpecker file. Look at the KiBot documentation liked to above to add
# your own tweaks
pipeline:
# kibot creates the files
kibot:
image: ghcr.io/inti-cmnb/kicad7_auto_full:latest
commands:
# you just need to run "kibot". If your pcb is in a
# subdirectory, you can simply `cd` into it here, first.
- cd codeberg-kicad-kibot-example
- kibot
# gitea package stores the resulting file as a package
artifacts:
image: gurken2108/drone-gitea-package
settings:
user:
from_secret: codeberg_user
token:
from_secret: codeberg_token
# the resulting file will be called like your project is called.
file: codeberg-kicad-kibot-example/kibot/codeberg-kicad-kibot-example-production-files.zip

View File

@ -21,6 +21,7 @@ Pull requests are accepted/welcome.
| [StandardML/sml.yml](StandardML) | Standard ML | sml | Simple CI pipeline to run SML files |
| [tectonic/.woodpecker.yml](tectonic/.woodpecker.yml) | LaTeX | Tectonic | Builds a TeX file and pushes the resulting PDF file to a given repository. |
| [NodeJS/11ty.yml](NodeJS/11ty.yml) | JavaScript | NodeJS | CI to build static websites files and publish them to Codeberg Pages with 11ty |
| [KiCad/kibot.yml](KiCad/kibot.yml) | --- | KiBot | Building gerber files, ibom and a pdf schematic as an example for KiBot use |
# More: