• AVR Freaks

AnsweredHot!I2C peripheral library "Does not build on this target"

Author
Maldus
Starting Member
  • Total Posts : 80
  • Reward points : 0
  • Joined: 2016/08/17 09:55:57
  • Location: 0
  • Status: offline
2018/07/30 05:22:30 (permalink)
0

I2C peripheral library "Does not build on this target"

Hello everyone,
I'm starting a simple project on a PIC24FJ64GA702. The PIC is connected to a FTDI converter, receives some data from the UART and writes some stuff to an i2c EEPROM. Simple enough.
I had assumed I could work with the i2c peripheral library, like I have for several other PIC24 MCUs. The compiler however complains that
 

i2c.h:1827:2: warning: #warning "Does not build on this target"

 
when I try to include <i2c.h>.
It would seem that the peripheral library does not support the device in question. I'm just asking for a confirmation, because despite the message being very straightforward I cannot imagine a sensible reason why that should be the case.
The device has two I2C modules like any other in its family. I'm using xc16 v1.33 and MPLABX v4.15
#1
DarioG
Allmächtig.
  • Total Posts : 54081
  • Reward points : 0
  • Joined: 2006/02/25 08:58:22
  • Location: Oesterreich
  • Status: offline
Re: I2C peripheral library "Does not build on this target" 2018/07/30 05:24:16 (permalink) ☼ Best Answerby Maldus 2018/07/30 06:28:45
5 (1)
yes, it happens 'cause the old Peripheral Library was discontinued, and you're adviced to using MCC (by Microchip)
 
By me, I'd adapt old library code to new MCUs Smile as I did in some cases...

GENOVA :D :D ! GODO
#2
RISC
Super Member
  • Total Posts : 5732
  • Reward points : 0
  • Status: online
Re: I2C peripheral library "Does not build on this target" 2018/07/30 06:36:07 (permalink) ☄ Helpfulby Maldus 2018/07/30 07:33:23
5 (1)
Hi,
Did you check MCC ?
MCC replaced MLA and supports many of the recent PICs and dsPICs.
you may find I2C APIs for this device
Just create an MCC based project, add I2C peripheral and set it up :
http://microchipdeveloper.com/mcc:start
Regards
 
#3
Maldus
Starting Member
  • Total Posts : 80
  • Reward points : 0
  • Joined: 2016/08/17 09:55:57
  • Location: 0
  • Status: offline
Re: I2C peripheral library "Does not build on this target" 2018/07/30 06:53:03 (permalink)
3 (1)
Many, many thanks.
 
Just for shits and giggles, where is this supposed to be documented? I am quite convinced I should not know about the de facto tool to operate peripherals from some random (albeit useful) user on the forum.
I really, really think this should be the first result when searching "<insert peripheral here> library microchip" on Google.
#4
Jim Nickerson
User 452
  • Total Posts : 6682
  • Reward points : 0
  • Joined: 2003/11/07 12:35:10
  • Location: San Diego, CA
  • Status: offline
Re: I2C peripheral library "Does not build on this target" 2018/07/30 07:33:32 (permalink)
#5
Jim Nickerson
User 452
  • Total Posts : 6682
  • Reward points : 0
  • Joined: 2003/11/07 12:35:10
  • Location: San Diego, CA
  • Status: offline
Re: I2C peripheral library "Does not build on this target" 2018/08/01 06:27:59 (permalink)
0
Maldus,
The pdf I referenced documents support for PICs in the libs , since you asked where this might be documented.
#6
Charlie E
Senior Member
  • Total Posts : 76
  • Reward points : 0
  • Joined: 2009/08/24 14:20:00
  • Location: 0
  • Status: offline
Re: I2C peripheral library "Does not build on this target" 2020/05/30 11:23:58 (permalink)
5 (1)
I have run into the same problem.  Of course, you can go the MCC route.  My opinion of MCC generated code involves obscenities, profanities and bad language!!!!
 
Looks like we just have to write our own, again.  I really hate it when vendors 'improve' things into total unuseablity!
 
#7
Maldus
Starting Member
  • Total Posts : 80
  • Reward points : 0
  • Joined: 2016/08/17 09:55:57
  • Location: 0
  • Status: offline
Re: I2C peripheral library "Does not build on this target" 2020/05/30 15:39:13 (permalink)
5 (1)
Charlie E
I have run into the same problem.  Of course, you can go the MCC route.  My opinion of MCC generated code involves obscenities, profanities and bad language!!!!
 
Looks like we just have to write our own, again.  I really hate it when vendors 'improve' things into total unuseablity!
 



My experience with Microchip is relatively brief, but I can already tell with confidence that this is the rule when working with their products. I ended up trying MCC, finding out it doesn't work and writing my own library just like you suggested. Looking forward to the moment when my company ditches Microchip products for good, we are very close.
#8
Jump to:
© 2020 APG vNext Commercial Version 4.5