After some struggle and with the help of fellow Kicad developers I have managed to get a (mostly) integrated build of Kicad on Windows 10 using Eclipse. Similar instructions should work on any Eclipse platform.
Install Msys2 (Download Msys2 http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20161025.exe )
Open a Mingw64 terminal ( msys64/mingw64.exe ) as this only seems to work if you open a mingw64 window.
Answer yes to remove conflicts. Close the window via task manager when done.
This takes a long time. Close the window via task manager when done.
To make sure all is up to date
copy and paste these lines into Mingw64
pacman -S base-devel \
In Windows install Eclipse CDT for Windows 64 bit see https://www.eclipse.org/downloads/packages/release/2019-09/r/eclipse-ide-cc-developers
You need to edit the eclipse.ini file and change the line
This increases the heap for Java so you don’t get out of memory errors.
Save the eclipse.ini and load eclipse to see if it works.
Download and install Kicad Source Files
In the mingw64 terminal and sure you can run mingw32-make.exe. If not, update the dos/windows path until you can.
Note: this assumes you want the development build. If you want a release build, download that, for example kicad-5.1.4.tar.xz and use that name (kicad-5.1.4.tar.xz) insteead of kicad-source-mirror-master.
Download the Kicad source files from https://github.com/KiCad/kicad-source-mirror
Untar or unzip into /home/kicad-source-mirror-master
This will create a local repository directory called kicad-source-mirror
At any time you can update the repository by
git pull origin master
Note that this will leave files which are in kicad-source-mirror but not in the kicad source repository unaffected. *** However *** they will over write your versions of those files! So if you edit cmakelists.txt or any other Kicad source file those edits will be lost.
Create a directory such as c:/home/eclipse-kicad. This will be your build directory.
Copy and paste these lines into Mingw64
cmake -DCMAKE_BUILD_TYPE=Debug \
-G “Eclipse CDT4 – Unix Makefiles” \
This takes a few minutes but you only do it once.
(note: you may have to copy/paste into a text editor instead of from this web page)
Note that the -DCMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT=TRUE switch creates a link between the build and source directories for eclipse. This allows for error highlighting, etc..
You can test the build with
make -j install (Note: the -j means use as many cores as you can and reduces compile time on my system by 70%). This process may take hours: on my gaming laptop it takes about 30 minutes if I use the -j option.
File->Import General->Existing Projects into Workspace Select Root Directory as
Wait for the indexing to complete (this will take some time)
select debug configuration (at the top near the red square)
Right click on project root select Build Targets go to the bottom and select Install.
First time, edit and set make to C:\msys64\usr\bin\make.exe -j then click build.
To rebuild select the project root and hit F9. Note that it you don’t select F9 or Build Targets Install it will not copy the project in the appropriate bin directory.
Note that you can access the source files in Eclipse by clicking [Source Directory] in the Eclipse project and you can rebuild by clicking the (*) Build Targets group.
I have not yet figured out how to integrate the source, build, and debug functions, however I can use the Eclise standalone debugger (see https://wiki.eclipse.org/CDT/StandaloneDebugger ) to debug pretty much any
executable which has been compile with debug info as long as I also have the source files.
I will update this with any corrections or if, as, and when, I figure out integrated debugging.