Compiling pic30-gcc on Linux

Some people don’t know, but Microchip uses GCC compiler on their MPLAB, they are using it for more than 15 years and never contributed back to mainline. Even worst: they have some non-free optimization that they don’t release as open-source. But don’t worry, Darwin is implacable, they are losing marketing share year after year (even after spent Billions to buy Atmel).

Now the good news is someone created some script to compile pic30-gcc to Linux (or Cygwin) with the patches that Microchip was obligated to release as open-source because the GPL license and put it here: but it is outdated for about 11 years.

Even so I decided to try to compile it and after some small modifications I succeeded, these are the steps:

$ git clone
$ cd c30-linux
$ git am /path/to/0001-Fix-pic30-linux-compilation-on-Ubuntu-21.10.patch
$ ./configure
$ make
$ sudo make install
$ sudo cp -a /usr/local/pic30/* /usr/local/

I don’t have plans to use it and I suggest you to avoid using it. It is better to use a microcontroller with a well supported GCC compiler from a company that contribute back to the open-source community.

Note: the above patch can be downloaded from here:

Update: PIC24 gcc is also available:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s