Skip navigation.
Home
The QNX Community Portal

View topic - Programming with i2c and spi sample provided in BSP

Programming with i2c and spi sample provided in BSP

For discussion of realtime and/or embedded programming.

Programming with i2c and spi sample provided in BSP

Postby Ericxx » Mon Dec 20, 2010 3:05 pm

Hello all,

I am now using the 6.5.0 BSP for omap3530. And the BSP includes the src code of both i2c and spi. I would like to have suggestions on how to write my own application with i2c or spi. I tried to include the header file in my project, wrote the app with some functions in the header and set the link library accordingly, but got errors.

Then i copied all the .c and .h in my project, still not working. Look forward to any suggestions.
Many thanks in advance!

Regards,
Eric
Ericxx
Senior Member
 
Posts: 158
Joined: Mon Jun 09, 2008 1:38 pm

RE: Programming with i2c and spi sample provided in BSP

Postby maschoen » Mon Dec 20, 2010 3:47 pm

What kind of application are you writing? GUI, resource manager, data redirection?
What type of errors? Compiler errors? Linker errors? Run time errors? Maybe you should post the error messages.

Just a general comment. Day after day we see similar naive sounding questions here. They usually come in the form of; Something is wrong with my program, can you help me. Since the people who post these have managed to install QNX and write a 'C' or C++ program they are obviously not dumb. So why isn't it obvious that anyone reading the post needs more information?

If you are unsure of what information would be useful, then a suggestion. Try building a very simple version of what you are trying to do. If that doesn't work, then you have something simple to post here. If it does work, then add incrementally until your problem appears. Then you can post whatever it was that didn't work.

BTW, this post is better than most in that at least we know you are using the omap3530 BSP and are having some kind of trouble with i2c and spi.
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

RE: Programming with i2c and spi sample provided in BSP

Postby Ericxx » Tue Dec 21, 2010 2:50 pm

Thanks for your advice. I meant to ask a general question for the usage of BSP source code.

Basically, i am trying to realize the data communication with two omap3530 (gumstix overo fire) via spi or i2c. The omap3530 BSP already includes the source code of spi and i2c. My application is to call the implemented functions in the generated library e.g. spi-omap3530.so after the BSP system built. In other words, i am not sure how to utilize the source code or the generated library in my application.

There are two spi libraries after the BSP built, spi-master.a and spi-omap3530.so.

Now i have managed to build the spi library again seperately with the source code and then it worked fine with my application. Library calls can be called correctly. Just needs to do the hardware wiring to test further.

Thanks,
Eric
Ericxx
Senior Member
 
Posts: 158
Joined: Mon Jun 09, 2008 1:38 pm


Return to Realtime and Embedded

Who is online

Users browsing this forum: No registered users and 2 guests