chipKIT® Development Platform

Inspired by Arduino™

Adding new libraries?

Created Sat, 14 Apr 2012 11:05:32 +0000 by Coccon


Sat, 14 Apr 2012 11:05:32 +0000

Hi! I'm new to this and I'm wondering how to add new libraries to the IDE. In arduino i just had to put a new directory and create my header and source file to it, next time restarting the library was ready to use. I tried this in mpide without success. What am i doing wrong?

Many thanks in advance!


Sat, 14 Apr 2012 13:19:12 +0000

There are others who can answer better than I can, but it depends on where you put the library.

For Chipkit like boards, you need to put the new library directory in. For example when I am working with the current test build I put them in: C:\mpide-0023-windows-20120304-test\hardware\pic32\libraries

You need to change the first part to wherever you installed the MPIDE...


Ryan K

Wed, 25 Apr 2012 11:29:51 +0000


You should open MPIDE and go to File -> Preferences and remember the Sketchbook location. In that location you should create a subdirectory called "libraries" and place any new libraries in that location. This will allow you to add new libraries to be tested across MPIDE builds. This is where the contributed libraries should be placed.

Best Regards, Ryan K Digilent


Tue, 01 May 2012 09:42:58 +0000

thank you very much, it's working

best regard


Tue, 01 May 2012 09:46:03 +0000

hi, i want to add to Libray Datetime to use in the Mpide but the Mpide don´t supported the

#include <DateTime.h>


Ryan K

Tue, 01 May 2012 22:19:20 +0000


I can include the DateTime library and have it compile fine in MPIDE. Are you asking for help getting it to compile and seen by MPIDE? or are you asking for a port into chipKIT. I haven't taken too close of a look at the library so I can't say whether or not it is chipKIT compatible at this point in time. Let me know either way.

Best Regards, Ryan K Digilent


Wed, 30 May 2012 22:06:16 +0000

Hi Ryan, please sorry that i answer you so late. I use The Uno 32 and the BASIC I/O Shield and i want to added the Date time Libray but i have some error

In file included from C:\Users\Lionel\Documents\mpide\libraries\DateTimeStrings\DateTimeStrings.cpp:20:0:
c:\users\lionel\downloads\mpide-0023-windows-20111221\hardware\pic32\compiler\pic32-tools\bin\../lib/gcc/pic32mx/4.5.1/../../../../pic32mx/include/avr/pgmspace.h:4:2: error: #error ******** This sketch or library uses AVR-specific code that may not work with the chipKIT platform. See this forum for more information on porting code to chipKIT [] ********
C:\Users\Lionel\Documents\mpide\libraries\DateTimeStrings\DateTimeStrings.cpp:32:18: error: expected initializer before 'PROGMEM'
C:\Users\Lionel\Documents\mpide\libraries\DateTimeStrings\DateTimeStrings.cpp:33:18: error: expected initializer before 'PROGMEM'
C:\Users\Lionel\Documents\mpide\libraries\DateTimeStrings\DateTimeStrings.cpp:34:18: error: expected initializer before 'PROGMEM'
C:\Users\Lionel\Documents\mpide\libraries\DateTimeStrings\DateTimeStrings.cpp:35:18: error: expected initializer before 'PROGMEM'
C:\Users\Lionel\Documents\mpide\libraries\DateTimeStrings\DateTimeStrings.cpp:36:18: error: expected initializer before 'PROGMEM'
C:\Users\Lionel\Documents\mpide\libraries\DateTimeStrings\DateTimeStrings.cpp:37:18: error: expected initializer before 'PROGMEM'
C:\Users\Lionel\Documents\mpide\libraries\DateTimeStrings\DateTimeStrings.cpp:38:18: error: expected initializer before 'PROGMEM'
C:\Users\Lionel\Documents\mpide\libraries\DateTimeStrings\DateTimeStrings.cpp:39:18: error: expected initializer before 'PROGMEM'
C:\Users\Lionel\Documents\mpide\libraries\DateTimeStrings\DateTimeStrings.cpp:40:18: error: expected initializer before 'PROGMEM'
C:\Users\Lionel\Documents\mpide\libraries\DateTimeStrings\DateTimeStrings.cpp:41:18: error: expected initializer before 'PROGMEM'
C:\Users\Lionel\Documents\mpide\libraries\DateTimeStrings\DateTimeStrings.cpp:42:19: error: expected initializer before 'PROGMEM'
C:\Users\Lionel\Documents\mpide\libraries\DateTimeStrings\DateTimeStrings.cpp:43:19: error: expected initializer before 'PROGMEM'
C:\Users\Lionel\Documents\mpide\libraries\DateTimeStrings\DateTimeStrings.cpp:45:1: error: 'PGM_P' does not name a type
C:\Users\Lionel\Documents\mpide\libraries\DateTimeStrings\DateTimeStrings.cpp:56:16: error: expected initializer before 'PROGMEM'
C:\Users\Lionel\Documents\mpide\libraries\DateTimeStrings\DateTimeStrings.cpp:57:16: error: expected initializer before 'PROGMEM'
C:\Users\Lionel\Documents\mpide\libraries\DateTimeStrings\DateTimeStrings.cpp:58:16: error: expected initializer before 'PROGMEM'
C:\Users\Lionel\Documents\mpide\libraries\DateTimeStrings\DateTimeStrings.cpp:59:16: error: expected initializer before 'PROGMEM'
C:\Users\Lionel\Documents\mpide\libraries\DateTimeStrings\DateTimeStrings.cpp:60:16: error: expected initializer before 'PROGMEM'
C:\Users\Lionel\Documents\mpide\libraries\DateTimeStrings\DateTimeStrings.cpp:61:16: error: expected initializer before 'PROGMEM'
C:\Users\Lionel\Documents\mpide\libraries\DateTimeStrings\DateTimeStrings.cpp:62:16: error: expected initializer before 'PROGMEM'
C:\Users\Lionel\Documents\mpide\libraries\DateTimeStrings\DateTimeStrings.cpp:64:1: error: 'PGM_P' does not name a type
C:\Users\Lionel\Documents\mpide\libraries\DateTimeStrings\DateTimeStrings.cpp: In member function 'char* DateTimeStringsClass::monthStr(byte)':
C:\Users\Lionel\Documents\mpide\libraries\DateTimeStrings\DateTimeStrings.cpp:91:23: error: 'PGM_P' was not declared in this scope
C:\Users\Lionel\Documents\mpide\libraries\DateTimeStrings\DateTimeStrings.cpp:91:66: error: 'strcpy_P' was not declared in this scope
C:\Users\Lionel\Documents\mpide\libraries\DateTimeStrings\DateTimeStrings.cpp: In member function 'char* DateTimeStringsClass::dayStr(byte)':
C:\Users\Lionel\Documents\mpide\libraries\DateTimeStrings\DateTimeStrings.cpp:106:23: error: 'PGM_P' was not declared in this scope
C:\Users\Lionel\Documents\mpide\libraries\DateTimeStrings\DateTimeStrings.cpp:106:62: error: 'strcpy_P' was not declared in this scope

Best Regard I hope that you help me


Wed, 21 Nov 2012 10:54:04 +0000

to add library you need to go MPIDE folder -> select hadware->pic32 -> library

paste the library you want it . and start using it


Wed, 21 Nov 2012 11:12:20 +0000

Hello Ryan,,

Could you explain your step by step procedure to adding library and accessing it.

I am using uno32 . I found most of arduino library not working on Uno 32 . like SoftwareSerial/tinyGPS/ds1307/wire . How to add these library in detail.

I tried with replacing library of uno 32 in PIC32 (hardware folder) with lib of arduino. They are not working as expected .Please let me how can avoid those conflicts

i wanna use same arduino library instead of PIC lib . How can make it run



Wed, 21 Nov 2012 11:16:55 +0000

Most libraries written specifically for the Arduino will not work on the ChipKit boards.

The ChipKit boards use a completely different chip to the Arduino boards, and libraries which directly interface with that chip (which is most, because Arduino programmers are stupid), need to be re-written to be able to work on the ChipKit.

You need both intimate knowledge of the library, AND intimate knowledge of Atmel and Microchip chips in order to do it.

It can be a good learning experience for those willing to undertake it, but it's not a job for a novice programmer.


Wed, 21 Nov 2012 11:22:30 +0000

thank you very much, it's working best regard

HI cebalo.

How u made it work. Can you explain step by step procedure to update library. how can make use of Arduino library in PIC32 library using mpide IDE .i wanna use tinygps/ds1307/wire/softwareSerial/time from arduino in PIC . let me know how can achieve this. I tried with pasting library in hardware->pic32->liberary but it is not working

[attachment=1]ardunio[/attachment] [attachment=0][/attachment]


Wed, 21 Nov 2012 11:32:21 +0000

Please stop posting the same message over and over again with the same attachments.

Have you actually read my reply?

Or are you just going to keep whining?