All of lore.kernel.org
 help / color / mirror / Atom feed
* SAMA5D3 header files for C application development
@ 2015-07-01  4:35 SAS NONE
  2015-07-01 13:08 ` Bryan Evenson
  0 siblings, 1 reply; 2+ messages in thread
From: SAS NONE @ 2015-07-01  4:35 UTC (permalink / raw)
  To: yocto@yoctoproject.org

[-- Attachment #1: Type: text/plain, Size: 604 bytes --]

 Hi,
I'm using SAMA5D3-xplained board and built a Linux kernel 3.18 distro for it using the Poky Yocto build directory.  I've also created the sdk and installed it in /opt/poky-atmel/1.7.2.  Ran hello world example in eclipse however I'm trying to find the C header files for the peripherals so I can develop applications using the SPI bus or the i2c bus.  Any help in locating these header files or how to go about developing and cross compiling the C code in eclipse?  I've already looked at the Yocto adt manual for eclipse which is very minimum.
Any help is greatly appreciated.
Thanks,
Sam

[-- Attachment #2: Type: text/html, Size: 980 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: SAMA5D3 header files for C application development
  2015-07-01  4:35 SAMA5D3 header files for C application development SAS NONE
@ 2015-07-01 13:08 ` Bryan Evenson
  0 siblings, 0 replies; 2+ messages in thread
From: Bryan Evenson @ 2015-07-01 13:08 UTC (permalink / raw)
  To: SAS NONE, yocto@yoctoproject.org

Sam,


> From: yocto-bounces@yoctoproject.org [mailto:yocto-bounces@yoctoproject.org] On Behalf Of SAS NONE
> Sent: Wednesday, July 01, 2015 12:36 AM
> To: yocto@yoctoproject.org
> Subject: [yocto] SAMA5D3 header files for C application development
>
> Hi,
>
> I'm using SAMA5D3-xplained board and built a Linux kernel 3.18 distro for it using the Poky Yocto build directory.  I've also created the sdk and installed it in /opt/poky-atmel/1.7.2.  Ran hello world example in eclipse however I'm trying to find the C header files for the peripherals so I can develop applications using the SPI bus or the i2c bus.  Any help in locating these header files or how to go about developing and cross compiling the C code in eclipse?  I've already looked at the Yocto adt manual for eclipse which is very minimum.
> 
> Any help is greatly appreciated.

I'm assuming based on your questions that you are new to the device tree setup for ARM in the Linux kernel and how to make use of it on the kernel side and the userspace side.  If so, I'd suggest you go to http://www.at91.com/linux4sam/bin/view/Linux4SAM/LinuxKernel and read the documentation linked in the "Changes introduced by Device Tree Support section".  Then Atmel has documentation specific to their SPI and I2C with the Linux kernel documentation.  Look under Documentation/devicetree/bindings/spi/spi_atmel.txt and Documentation/devicetree/bindings/i2c/i2c-at91.txt in your kernel source.

In summary, if you are lucky enough that the device you want to communicate with has device tree support, then you would add that device to your device tree files and follow their documentation on how to communicate with it from userspace.  For example, I am using the AD5446 DAC on my hardware, and Analog Devices has excellent documentation of their DAC Linux kernel driver here: http://wiki.analog.com/resources/tools-software/linux-drivers/iio-dac/ad5446.  For this device I open up a file and write a value for the desired output voltage, and then the driver takes care of communicating to the AD5446.  Otherwise I think you can use the generic spidev interface for reading and writing data on the SPI port (and I think there is something similar for I2C?).

Since you have questions that are specific to your hardware, I think you may be able to get better answers on Atmel's AT91 forums or checking for information on Linux kernel driver support for your specific I2C and SPI devices.  If you are having problems building an application with the Eclipse ADT and getting to run on your hardware, then let us know some specific details with the problems you are seeing.

Regards,
Bryan

> 
> Thanks,
> 
> Sam

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-01 13:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-01  4:35 SAMA5D3 header files for C application development SAS NONE
2015-07-01 13:08 ` Bryan Evenson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.