MOD5213 I2C2Serial example for NBEclipse?

Discussion to talk about software related topics only.
Post Reply
barttech
Posts: 135
Joined: Fri Feb 20, 2009 12:59 pm

MOD5213 I2C2Serial example for NBEclipse?

Post by barttech »

I have used the I2C code on the MOD5234 for a while now with no problem. My latest project uses the MOD5213, but I cannot get the I2C to compile. The example was written for DevC I guess, when I create a new 5213 project and import the example main.cpp I get a slew of errors.
Of course I don't need the example, that is just a stepping stone that I stepped back to to try to figure out why NBEclispe cannot find the 5213 version of Master_I2CInit(). I've got the #include <i2cmaster.h> but I get
undefined reference to `Master_I2CInit'
I've checked that the Target Platform is indeed set for MOD5213, which I set when I created the project.
I think I'm missing something simple, but a working NBEclipse example would help.
Sam
User avatar
tod
Posts: 587
Joined: Sat Apr 26, 2008 8:27 am
Location: Southern California
Contact:

Re: MOD5213 I2C2Serial example for NBEclipse?

Post by tod »

This is general advice, I don't have a MOD5213 or use I2C2. However, it sounds like the error you described is a linker error not a compiler error. In other words, it saw your i2cmaster.h file and expected to find the routines promised by that header but did not. You may just need to add a reference to the missing library (see the attached image). I would think you would only need MOD5213.a but it's possible that I2C support is in a different library. You could check your working MOD5234 project and figure it out from there maybe.
Attachments
NetBurnerLibraries.png
NetBurnerLibraries.png (115.75 KiB) Viewed 2973 times
barttech
Posts: 135
Joined: Fri Feb 20, 2009 12:59 pm

Re: MOD5213 I2C2Serial example for NBEclipse?

Post by barttech »

Thanks Tod,
I hadn't checked that but I do have the MOD5213.a in the libraries list.
Must be something else...
Sam
barttech
Posts: 135
Joined: Fri Feb 20, 2009 12:59 pm

Re: MOD5213 I2C2Serial example for NBEclipse?

Post by barttech »

I took a tip from GreenGene and dl'd the beta which solved some of his I2C problems. Then I copied over the MOD5213.a and netburner_nn.a files into my working directory for Rel 23 RC7a. No more linker error! Was there something amiss with my setup? I assume other folks have gotten I2C to work on MOD5213 under Rel 23 RC7a.
I didn't want to use the beta since I'm reluctant to use beta code for production, but have I made things even worse by mixing the beta libraries with the Rel 23 RC7a includes, etc?
User avatar
tod
Posts: 587
Joined: Sat Apr 26, 2008 8:27 am
Location: Southern California
Contact:

Re: MOD5213 I2C2Serial example for NBEclipse?

Post by tod »

This is all just my opinion of course and I don't work for NB, but it seems to me that mixing libraries from one release with the headers from an older release is asking for trouble. Since you're using beta libraries you're basically using the beta release. If you have problems, odds are pretty good you're not going to find anyone else using your combination so you might have non-repeatable issues. IMO, I would just go with the 2.4RC2 release. I usually rename my nburn folder with the release name when I download a new version. That way I can revert to the old release pretty easily if the need arises. (and yes, I'm using 2.4RC2)
Post Reply