chipKIT® Development Platform

Inspired by Arduino™

OneWire Library

Created Mon, 30 Jan 2012 20:40:22 +0000 by JanneH


JanneH

Mon, 30 Jan 2012 20:40:22 +0000

I am a newbie that need some help to get going. I try to compile the DS18x20_Temperature example but I got massive amount of errors. I guess it is a similar problem Babaiko describes in the thread: Board index » Community » What are you developing? » OneWire Library

I use Mpide 0023-windows-20111221 and have changed to library version 2.1 described by dangeljs in the same thread as above. When I compile for another board than the chipkit boards everything seems to work ok.

The errors starts with:

In file included from c:\program files (x86)\mpide-0023-windows-20111221\hardware\pic32\compiler\pic32-tools\bin../lib/gcc/pic32mx/4.5.1/../../../../pic32mx/include/peripheral/i2c.h:50:0, from c:\program files (x86)\mpide-0023-windows-20111221\hardware\pic32\compiler\pic32-tools\bin../lib/gcc/pic32mx/4.5.1/../../../../pic32mx/include/plib.h:50, from C:\Program Files (x86)\mpide-0023-windows-20111221.\hardware\pic32\libraries\OneWire/OneWire.h:65,

What to do?


dangeljs

Wed, 01 Feb 2012 22:12:43 +0000

JanneH, I'm not using the most recent version of MPIDE, so it still works for me. I read in the github issues section that there was a problem that required removing the "#include <plib.h>" line. I'm not sure if that is the issue you are having, but if you look in the header file (OneWire.h) around line #65 you should see this include. Try removing it and see if it clears your problems. If it does let me know and I'll update.

Thanks,

Jason


JanneH

Sun, 05 Feb 2012 10:50:42 +0000

Hi Jason and thanks for help,

After removing row 65 "#include <plib.h>" the DS18x20_Temperature example works fine.

I did actually go one step further to find out what in the file is causing the trouble and found out removing following rows from plib.h itself did the same trick:

row 50 "#include <peripheral/i2c.h>" row 64 "#include <peripheral/uart.h>" row 67 "#include <peripheral/CAN.h>"

I guess this means the root cause is to find in these tree files or further down. I will however leave this track for now but as I know I eventually will need to include the CAN library in my project I might have to bring it up again.

Thanks,

Janne