KiCad needs to know which pin of the symbol represents which footprint pad when creating the connectivity information of the board. See also: What is the difference between footprints and symbols?
The identification is done with the help of the symbols pin numbers and footprints pad numbers. These must agree with each other. (Every symbol pin must have at least one footprint pad where the symbol pin number is the same as the footprint pad number.)
This is easier to see in an example:
Note that it is possible to have more pads in the footprint than in the symbol. These pads will simply be left unconnected.
The other way round will result in an error message. (Do not ignore this message as it is the only check ensuring that layout and schematic are equal.)
Error: Component "[component reference]" pad "[the pin number]" not found in footprint: "[footprint name]"
- As an example assigning a 5 pin connector footprint for a JST B05B-EH-A to a 6 pin symbol (
J3) will result in the following error message:
Error: Component J3 pad 6 not found in footprint Connector_JST:JST_EH_B05B-EH-A_1x05_P2.50mm_Vertical
You will get the same error message if the pin numbers are different than the pad numbers (even if the pin and pad count are equal). The error message is the same no matter if the pin responsible for the missing pad is connected to anything or if it is free floating.
An example of the pin and pad setup within their properties dialogs is shown here:
The footprint can have pads that are not used in the symbol. These will be handled in the same manner as if they appear in the symbol but were left unconnected.
It is possible to assign the same pad number to multiple pads inside the same footprint. KiCad will assign the same net to all of them and force you to connect them within your layout. (If they overlap KiCad will notice that and you will not need to connect them with a trace. This fact is used in the official library to add thermal vias to footprints that need them.)
If you do not want this behavior then you need to assign different pad numbers to these pads and add a pin for each of them in the symbol. (Only makes sense if the pads in question have enough clearance between them.)