When you design hardware, you often develop firmware, too. That firmware needs to know which controller pin controls what functionality. So you adapt the firmware to the specific hardware, e.g., with a pin definition C header. What if you didn’t have to do so manually? kicad_firmware_generation is a tool suite for generating (parts of) the firmware based on information from KiCad schematics.