[meta-xilinx] system.bit and fpga.bin
Edward Vidal
vidal.develone at gmail.com
Mon Mar 31 12:41:45 PDT 2014
Hello,
Using meta-topic which uses fpga.bin I now have the slide switches working
with a new
file export_sw and read_sw.
new export_sw
********************************
#!/bin/bash
#This appears to work with fpga.bin loaded
echo "++ Exporting switches "
for i in 0 1 2 3 4 5 6 7;
do
sw=$(($i+65));
echo $sw > /sys/class/gpio/export;
done;
********************************
ls /sys/class/gpio
export gpiochip0 unexport
root at zedboard:~# ./export_sw
++ Exporting switches
root at zedboard:~# ls /sys/class/gpio
export gpio66 gpio68 gpio70 gpio72 unexport
gpio65 gpio67 gpio69 gpio71 gpiochip0
new read_sw
********************************
#!/bin/sh
value=0;
for i in 0 1 2 3 4 5 6 7;
do
sw=$((72-$i));
sw_tmp=`cat /sys/class/gpio/gpio$sw/value`;
value=$(($value*2));
value=$(($value+$sw_tmp));
done;
printf "0x%x %d\n" $value $value;
********************************
ls /sys/class/gpio
export gpio66 gpio68 gpio70 gpio72 unexport
gpio65 gpio67 gpio69 gpio71 gpiochip0
Still no leds working?
The above changes were made based on difference of system.ucf for
ZedBoard_Linux_Design and system.ucf for cf_adv7511_zed.
In export_sw 61 was replaced by 65 and in read_sw 76 was replaced with 72.
I did this by trial an error how do you determine the offset used?
Any and all help is appreciated.
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-xilinx/attachments/20140331/0325a8b9/attachment.html>
More information about the meta-xilinx
mailing list