Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

Getting access to the SPI interface on am335x Starter Kit using the TI-Android-JB-4.2.2-DevKit-4.1.1_DeveloperGuide

$
0
0

Hi Guys,

I have been at it more than a week now and I can't seem to figure out how to get access to the SPI interface on the am335x Starter Kit using the Jellybean Guide here: http://processors.wiki.ti.com/index.php/TI-Android-JB-4.2.2-DevKit-4.1.1_DeveloperGuide

It has taken me ages to setup as the link to the central tool "repo" is broken and and the link to the devkit sources is dead slow.

Here is what I have done step by step:

1) Install Ubuntu 64bt 12.04 (The first version not 12.04.2!!!) on a 64bit machine with 50G hdd. I am using a Virtualbox setup for this.

2) Prepare the machine by calling 

sudo apt-get install git-core gnupg flex bison gperf build-essential \ zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \ libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \ libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \ python-markdown libxml2-utils xsltproc zlib1g-dev:i386 \ minicom tftpd uboot-mkimage expect libgl1-mesa-dri

sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

4) Install java

chmod a+x jdk-6uXX-linux-x64.bin ./jdk-6uXX-linux-x64.bin sudo mkdir -p /usr/lib/jvm sudo mv jdk1.6.0_XX /usr/lib/jvm/ sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.6.0_XX/bin/java" 1 sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.6.0_XX/bin/javac" 1 sudo update-alternatives --config java sudo update-alternatives --config javac

5) Install ncurses to be able to use menuconfig (required to be able to enable api)

sudo apt-get install ncurses-dev

6) Download the devkit from TI_Android_JB_4.2.2_DevKit_4.1.1.bin and run it. Place the files inside rowboat-android under your home folder.

7) Export path to arm binaries (I unpacked the )

export PATH=$HOME/rowboat-android/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin:$PATH

8) The guide says "To create an SD card image from the fresh android source in single step, execute the following command". That does not work

make TARGET_PRODUCT=am335xevm_sk OMAPES=4.x -j1 sdcard_build

To make it work I need to call a general build first

a) make TARGET_PRODUCT=am335xevm_sk OMAPES=4.x -j1

followed by

b) make TARGET_PRODUCT=am335xevm_sk OMAPES=4.x -j1 sdcard_build

This takes ages but eventually I get an output folder.

9) This folder can be used to create an sd card using:

sudo ./mkmmc-android.sh /dev/sd<sd card mount-point>

10) From here on the process should be that configure the kernel to include the SPIDEV user space driver and edit the layout of the board-am355xevm.c to use the "spidev" driver like this.

static struct spi_board_info am335x_spi0_slave_info[] = {
{
.modalias = "spidev",
//.platform_data = &am335x_spi_flash,
.irq = -1,
.max_speed_hz = 24000000,
.bus_num = 1,
.chip_select = 0,
},
};

static struct spi_board_info am335x_spi1_slave_info[] = {
{
.modalias = "spidev",
//.platform_data = &am335x_spi_flash,
.irq = -1,
.max_speed_hz = 12000000,
.bus_num = 2,
.chip_select = 0,
},
};

But that has not given any positive results yet. 

I find myself wasting many hours trawling forums looking for hints and traces on how to proceed. Each attempt taking hours.

I think an update of the Developer Guide would be in its place as it is broken in its current state. 

Any Ideas on how to proceed is greatly appreciated.

Kind regards

Jesper


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>