chipKIT® Development Platform

Inspired by Arduino™

MPLAB and libraries

Created Fri, 21 Dec 2012 21:51:28 +0000 by Imolas3


Fri, 21 Dec 2012 21:51:28 +0000


I have been programming micros for a long time and PICs since the days of DOS tools.

I recently started playing with the UNO32 and other similar boards and simply hate the MPIDE idea. This is how I programmed 20+ years ago!! No debugging tools, no single step, no watch windows, no break points, no memory map. Yuk!

I have been using the XC compiler with MPLAB and ICD 3 and it works like a dream.

However, there seems to be a lot of pre-written code out there for various peripherals (SD cards, USB etc.) but they are 'sketches' for MPIDE.

The question is can I use these sketches within MPLAB and XC? Will they compile if added ot a projects? If so, are there any tips, tutorials etc.?

Many thanks


Sat, 22 Dec 2012 12:23:16 +0000

Nope, 'fraid not.

The main reason is that the ChipKit MPIDE (and all its libraries) work in C++, and XC is plain C.

Which reminds me... I must get round to working out how to jemmy the MPIDE compiler into MPLAB-X so I can use C++ in MPLAB-X.

edit: ... although I have just read that XC does C++ (which I didn't know), so yes, there might be a way.

A library is just a header file and C++ file, so including the header file, and compiling the C++ file and linking it with your project might be doable - you'll probably also need to compile/link in all the rest of the core files as well though for the Arduino-esque function calls that there will be.


Mon, 24 Dec 2012 15:10:19 +0000

Thanks Malenko

Might be worth a play then and see if I can integrate the libraries OK