chipKIT® Development Platform

Inspired by Arduino™

Wire library for Chipkit uno32

Created Mon, 17 Mar 2014 12:31:52 +0000 by ajitnayak


ajitnayak

Mon, 17 Mar 2014 12:31:52 +0000

Dear all,

I am looking for wire library for chipkit uno32 . I am using Mpide0023 for windows.Also Let me know Pin configure to Work on RTC.I checked in below link and Change Position and run common wire example from IDE . Which is not working. SO let me know jumper setting and link to download the library function

[url]http://www.digilentinc.com/Data/Products/CHIPKIT-UNO32/chipKITUno32_rm.pdf[/url]


Jacob Christ

Sat, 24 May 2014 05:33:39 +0000

The wire lib is built into mpide. V 0023 is the map to the Arduino release. We tend to use the date like 20140709 to indicate the version on mpide we are using.


tcsaba101

Wed, 28 May 2014 16:21:28 +0000

Hi

I am normally working in Uecide. The code I have written compiles without glitch in Uecide. I have made positive experiment to use Mplab X for debugging on a smaller test code before, and now I try to use on my live project. To do this I have to compile the code in Mpide to link the makefiles to MX.

I have got dozens of error messages compiling in Mpide. Some I have been solved (wire.write vs wire.send etc.).

But now I would need some help to shortcut the remaining faults.

This is the message on the Mpide console:

>>>> AFT_13_08.ino contains unrecognized characters. If this code was created with an older version of Processing, you may need to use Tools -> Fix Encoding & Reload to update the sketch to use UTF-8 encoding. If not, you may need to delete the bad characters to get rid of this warning.

In file included from C:\Users\csaba.TMARKTDOMAIN\Documents_a_14_11_Projektek\Arduino_Pic\Uecide_Pde\libraries\Wire\utility\twi.c:23:0: C:\Users\csaba.TMARKTDOMAIN\Documents_a_14_11_Projektek\Arduino_Pic\Mpide2\mpide-0023-windows-20130715\hardware\pic32\compiler\pic32-tools\bin../lib/gcc/pic32mx/4.5.1/../../../../pic32mx/include/avr/io.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 [www.chipkit.org/forum/viewforum.php?f=7] ******** C:\Users\csaba.TMARKTDOMAIN\Documents_a_14_11_Projektek\Arduino_Pic\Uecide_Pde\libraries\Wire\utility\twi.c:24:27: fatal error: avr/interrupt.h: No such file or directory compilation terminated. >>>>>>.

The first part could be because my native language is Hungarian, I make comment mainly in my language what contains some special characters. I don't use any Hungarian in the code itself. Should I convert the comments also to english characters to get over this fault? Or there could be some other solution?

The "In file included from " part I understand the text, but I don't know what to do. I don't use interrupt in my code. Please advise.

Thanks.


ricklon

Wed, 28 May 2014 18:28:59 +0000

Which RTC library?

It appears something is triggering a call to the avr interupt. This could be hidden in the library.

MPIDE will respond with a compile error any of the avr include libraries. Some environments it's possible to have it fail silently. In our case we removed the message from the compiler to MPIDE.

If you use standard interrupts the message will go away.

-_Rick


tcsaba101

Wed, 28 May 2014 19:41:12 +0000

Currently I don't use RTC and not any interrupt.

I use external devices and libraries: INA219 and MCP4728 those are interrupt free. I also use the Digilent IOshiledOled, what I used before without problem and that is also without interrupt.

Thanks


Jacob Christ

Wed, 28 May 2014 20:28:05 +0000

Rick,

Do you know what is going on with the "UTF-8 encoding" message?

Jacob


majenko

Wed, 28 May 2014 23:00:03 +0000

It looks to me like you have a local copy of the Wire library in your sketch and MPIDE is picking that over the proper one - and that Wire library isn't the right library for a chipKIT board?


tcsaba101

Thu, 29 May 2014 11:34:53 +0000

Yes you are right, this is a different wire library

If I compile the code in uecide (without error) it is using the wire from uecide folder, not from the standrd library.

>>>>>>>>>>>> -IC:\Users\csaba.TMARKTDOMAIN\Documents_a_14_11_Projektek\Arduino_Pic\Uecide_Pde\libraries\Adafruit_INA219 -IC:\Program Files (x86)\Majenko Technologies\UECIDE\Uecide settings\cores\chipKIT\libraries\Wire -IC:\Users\csaba.TMARKTDOMAIN\Documents_a_14_11_Projektek\Arduino_Pic\Uecide_Pde\libraries\mcp4728 -w

>>>>>>>>>>>>>>

Could I copy it to the library for Mpide compilation? Will it work there or it is only for Uecide?

Do yo plan to have a makefile generation in the future in Uecide (ELF, COFF, stb) to link to MplabX simpler?

Thanks, Csaba


majenko

Thu, 29 May 2014 12:00:29 +0000

The latest version of UECIDE would probably do the same thing as MPIDE - i.e., take the library in the sketch folder over the one in the core.

You have to decide which library you want to use, and only have the one - i.e., get rid of the Wire library from the sketch.

Eventually I will get round to rewriting the MPLAB-X export plugin that will make moving from UECIDE to MPLAB-X a doddle.


tcsaba101

Sun, 01 Jun 2014 11:49:53 +0000

My post has been lost on Friday. There should have been some server problem.

I changed the wire library now it works. Compiled without error. Thanks.

Still I have the problem with the characters.

>>>> AFT_13_08.ino contains unrecognized characters. If this code was created with an older version of Processing, you may need to use Tools -> Fix Encoding & Reload to update the sketch to use UTF-8 encoding. If not, you may need to delete the bad characters to get rid of this warning.

When I write in uecide the comments in Hungarian, and I open it in Mpide, the special characters became a simbol: like t�lt�t instead of "töltőt" (the nice thing all character seems to have the same symbol). If I make comment in Mpide, the similar happens in Uecide. I think the special characters codes are starting from 128 in the ASCII table.

Do you know a simple solution? Or I have to make comments in Hunglish.

Eventually I will get round to rewriting the MPLAB-X export plugin that will make moving from UECIDE to MPLAB-X a doddle

Regarding to Mplab X connnection, when do you think to release the version?

Csaba


majenko

Sun, 01 Jun 2014 12:37:54 +0000

My reply to your post also got lost. They changed servers over the weekend (hence the big downtime and lots of strange messages and holding pages), and I guess the database transfer was done early without a re-copy when the transfer was done...

The editor in MPIDE is incredibly basic and can only barely cope with plain english. It can't handle anything other than simple 8-bit ASCII characters, so anything more fancy will make it throw a wobbly.

The compiler doesn't care, and UECIDE's editor can handle full UTF-8 characters. Another reason to ditch MPIDE...


Jacob Christ

Mon, 02 Jun 2014 21:16:30 +0000

My post has been lost on Friday. There should have been some server problem.

There was a server change or something like that for the forum over the weekend. Probably why your post was lost.

Jacob