GPMC and EMMC pins are multiplexed, so if one needs to use GPMC then BBB should be booted from SD Card Only.
cd /opt/scripts
git pull
sudo tools/update_kernel.sh
sudo shutdown -r now
sudo apt update
sudo apt upgrade
sudo apt install linux-headers-$(uname -r) #Needed to directly program FPGA
sudo apt-get install flashrom #Needed to program FPGA using spi method
# Recommended to clone both on host and BBB
git clone https://github.com/BeagleWire/BeagleWire
git checkout testing
git clone https://github.com/BeagleWire/BeagleBoard-DeviceTrees
cd BeagleBoard-DeviceTrees
make
sudo cp src/arm/overlays/BW-ICE40Cape-00A0.dtbo /lib/firmware
sudo cp src/arm/overlays/BW-ICE40Cape-00A0_LKM.dtbo /lib/firmware
# Create dtb backup:
sudo cp /boot/dtbs/4.19*/am335x-boneblack-uboot-univ.dtb am335x-boneblack-uboot-univ.dtb.backup
# Install the new dtb:
cd BeagleBoard-DeviceTrees
sudo cp src/arm/am335x-boneblack-uboot-univ.dtb /boot/dtbs/4.19*/
enable_uboot_cape_universal=1 #Keep Cape Universal Enabled
#disable_uboot_overlay_emmc=1
#disable_uboot_overlay_video=1
#disable_uboot_overlay_audio=1
#disable_uboot_overlay_wireless=1
#disable_uboot_overlay_adc=1
enable_uboot_cape_universal=1 #Keep Cape Universal Enabled
disable_uboot_overlay_emmc=1
disable_uboot_overlay_video=1
disable_uboot_overlay_audio=1
disable_uboot_overlay_wireless=1
disable_uboot_overlay_adc=1
BW-ICE40Cape-00A0.dtbo
is present in /lib/firmware then it will be automatically loaded.cd BeagleWire/EEPROM_Cape/
sudo ./load_eeprom.sh
.bashrc
at the end, so that those scripts can be run from anywhere.vim /home/debian/.bashrc
# To run beaglewire script from anywhere
export PATH=$PATH:/home/debian/BeagleWire/load_fw
cd BeagleWire/bridge_lib
make #Build the memmap and other bridge files
cd BeagleWire/load_fw
make #Builds the lkm
chmod +x * #Make the scripts and spi test executable
sudo su
source .bashrc
bw-spi.sh <bin file to program>
#Example: bw-spi.sh blink.bin
uEnv.txt
sudo vim /boot/uEnv.txt
#Add this overlay line at addr0 place:
#If we had added the overlay at addr4, bbb automatically will add BW-ICE40Cape-00A0.dtbo overlay
#So to override that file we need to add this at addr0
uboot_overlay_addr0=/lib/firmware/BW-ICE40Cape-00A0_LKM.dtbo
#Disable the cape universal
#enable_uboot_cape_universal = 1
#Reboot after this
bw-prog.sh blink.bin