API's for GPIO/I2C/SPI/Serial etc... using Yocto Build

Yocto related software discussions are here

API's for GPIO/I2C/SPI/Serial etc... using Yocto Build

Postby samjith » Thu Jul 31, 2014 3:02 pm

I have been searching hard to find an answer for this. Finally thought this might be the right place.
Background:
I am playing with a wand-board imx6-solo.
built the kernel and BSP's with the help of Yocto project. using meta-fsl-arm bsp's FSL Community BSP
successfully built it with all required packages.
successfully set the cross-compiler on host machine for both eclipse(for non-GUI linux apps) and qt platforms (for GUI linux apps)
I can now cross-compile and remotely debug C/C++ apps from both the platforms - done

Problem:
I would like to play with GPIO/I2C/SPI/Serial on my wandboard solo from user space.

I understand there are two ways to do,
Use file descriptors/handling in C/C++ code to access my sysfs folder to control the GPIO's
Use third party API's to control the peripherals (GPIO/I2C/SPI/...)

Which method is the cleanest to do? and why? I have an understanding that method 2 is clean as you don't mess up with file permissions or even the file in your application code also not a good way to expose those paths and files in your main code.

FYI: I have already tested the working of GPIO's using a simple shell script code.

My final application will use these peripherals to process data and send through serial port.
How do I proceed further? As I read, imx6 SDK documentation that includes all these API's and talks about using LTIB (Linux Target Image builder) to build the u-boot. Can I download and build these API's using Yocto (by adding in to build dir sources and adding path in bblayers.conf) ? --- Just confused

Many thanks for your time!

Sam
samjith
 
Posts: 3
Joined: Wed Jul 30, 2014 8:54 pm

Return to Software - Yocto

Who is online

Users browsing this forum: No registered users and 3 guests