Hi,
I’ve been having trouble successfully uploading a bitstream to the Snickerdoodle Rev3 board. Originally I was using my own generated bitstream but wasn’t having success (it would load using the linux method found here, under “Programming the PL through Linux”, however I wasn’t getting any output from the snickerdoodle FPGA pins).
To test that it wasn’t my bitstream that was the issue, I used the Snickerdoodle GPIO example project. Here were my steps and environment:
Using the “Building Bitstream into BOOT.bin” method found on page 9 of “Snickerdoodle Hardware Configuration Guide”
First locate the GPIO bitfile. I pulled it (system.bit) from “snickerdoodle-linux-prebuilt”
My linux environment is running based on the snickerdoodle-linux-prebuilt files, meaning the BOOT.bin and config.txt/uENV.txt file already includes a command to run “system.bin” upon boot up. This is based on if there is a system.bin file located in the SD card, so I put the system.bit file there
After booting up snickerdoodle by plugging it to my computer through USB, I enabled a serial interface to pull up it’s command prompt.
I followed the instructions found in the readme file, and ran the commands found in the readme “examples” to turn those pins high. Using a multimeter, I wasn’t able to get any voltage from those pins
I followed the troubleshoots found in the forum but this didn’t resolve the issue
Using the “Loading Bitstream from Linux” method found in the Hardware Configuration Guide
Using the system.bit file found from Step 1 in my first method above, I followed the instructions to convert the bitstream into a reverse bitstream by using the boot.bif file found here. I imported the .bif file into the Xilinx SDK and adjusted it so that the correct files were being pointed to in my local machine (so system.bit had the correct file path etc).
After creating this .bif file, I ran the
“bootgen -image boot.bif -split bin -o i BOOT.bin”
I then uploaded the “system.bit.bin” file into snickerdoodle using sftp
I ran the commands to upload the reverse bitstream onto the board
cat [path/to/bitstream] > /dev/xdevcfg
and also ran the command that tells if it was successfully loaded (had to adjust the original commands for my environment)
cat /sys/devices/soc0/ambaf80070000.devcfg/prog_done
, which it stated as loaded (gave me “1” which meant correctly loaded)
After confirming the bitstream was loaded, I followed the instructions found in the readme file, and ran the commands found in the readme “examples” to turn the pins high. Using a multimeter, I wasn’t able to get any voltage from those pins
Is there anything I’m doing wrong, maybe my steps are incorrect?
Is it perhaps the fact that I simply copy and pasted the system.bit file from the GPIO file into my SD card (but confirmed that uENV.txt included system.bit upon bootup)? Here are my uENV.txt file
uENV.txt
bootargs=console=ttyPS0,115200 root=/dev/mmcblk0p2 rw rootwait earlyprintk
bootdelay=3
bitstream_image=system.bit
configenv=config.txt
loadconfigenv=load mmc 0 ${loadbootenv_addr} ${configenv}
importconfigenv=echo Importing configuration environment...; env import -t ${loadbootenv_addr} ${filesize}; echo Config set to ${config_dir}
mmc_loadbit=if test -e mmc 0 ${bitstream_image}; then echo Loading bitstream ${bitstream_image} from microSD to RAM... && fatload mmc 0 ${loadbit_addr} ${bitstream_image} && fpga loadb 0 ${loadbit_addr} ${filesize}; fi;
boot_snickerdoodle=mmcinfo; echo Copying Linux system from microSD to RAM...; fatload mmc 0:1 0x3000000 ${kernel_image}; fatload mmc 0:1 0x2FF0000 ${devicetree_image}; bootm 0x3000000 - 0x2FF0000
update_config=if test -e mmc 0 ${configenv}; then if env run loadconfigenv; then run importconfigenv && setenv bitstream_image ${config_dir}${bitstream_image} && setenv devicetree_image ${config_dir}${devicetree_image}; fi; fi;
uenvcmd=run update_config; run mmc_loadbit; run boot_snickerdoodle
source gpiotest.sh JB1.12 1
echo 742 > /sys/class/gpio/export
echo: write error: invalid argument
function export_gpio() { echo $1 > $(GPIO_BASE)/export}