From 556b3c33daa7a41550cb2bbe23d333ba39414be0 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Sat, 11 Jun 2016 17:16:54 -0400 Subject: rework electronics pages --- electronics/fpga-toolchain.page | 185 -------------------------------------- electronics/fpga-toolchain.rst | 185 ++++++++++++++++++++++++++++++++++++++ electronics/microcontrollers.page | 5 +- electronics/misc.page | 47 +++++----- 4 files changed, 207 insertions(+), 215 deletions(-) delete mode 100644 electronics/fpga-toolchain.page create mode 100644 electronics/fpga-toolchain.rst (limited to 'electronics') diff --git a/electronics/fpga-toolchain.page b/electronics/fpga-toolchain.page deleted file mode 100644 index f60062e..0000000 --- a/electronics/fpga-toolchain.page +++ /dev/null @@ -1,185 +0,0 @@ -FPGA Toolchain Notes -========================== - -Setup Xilinx 13.3 WebPack on Ubuntu 11.10 64bit -------------------------------------------------- - -Installer archive is ~5gb, extracted will be about 5gb, install will be about -14gb. You'll probably need root. - -Download the appropriate WebPack ISE archive from the Xilinx website; you'll -need to create an `account `_. While the download is -running, generate a WebPack license file (Xilinx.lic) and save that to your -home folder. - - $ mkdir /tmp/ise_install - $ cd /tmp/ise_install - $ tar xvf ~/Xilinx_ISE_DS_Lin_13.3_O.76xd.1.0.tar - $ cd Xilinx_ISE_DS_Lin_13.3_O.76xd.1.0/ - $ sudo ./xsetup # install as root! - - # agree to license agreements - # - # select WebPack - # - # defaults for license: "Acquire or Manage..." and "Ensure Linux - # System...". "Install Cable Drivers" failed for me. - # - # extract to /opt/Xilinx/13.3 - # - # in the license manager that pops up, go straight to "manage licenses" and - # import the one you generated - # - # done! - -To start the IDE run `/opt/Xilinx/13.3/ISE_DS/ISE/bin/lin64/ise` (set it up as -an alias or with a wrapper script). - -Xilinx Vivado 2014.4 on Debian Wheezy 64bit ---------------------------------------------- - -Download is 5.0GB; unziped installer is 5.2GB. /opt/Xilinx/Vivado/2014.4 is -6.9GB; /opt/Xilinx/SDK/2014.4 is 4.9GB. So in total you'll want more than 22GB -to download and install. - -Run the installer as sudo (no strictly necessary?). Select Vivado WebPACK. -Install Cable Drivers and Software Development Kit (this later is big, another -~5GB unextracted). - -When the install is done and license manager pops up, do the "Save link" thing -(because you are running as root, browser probably won't work), then find that -.html file and open it as your regular user; it will redirect. Select the -Vivado WebPACK and SDK licenses (the ones with no expiration, not the -evaluation ones). - -Create a ~/.profile or ~/.bashrc alias like: - - alias vivadoenv2014.4="source /opt/Xilinx/Vivado/2014.4/settings64.sh" - - -Xilinx Platform Cable USB II Drivers on Debian Wheezy 64-bit -------------------------------------------------------------- - -Follow these directions: - -https://vjordan.info/log/fpga/setting-up-the-xilinx-platform-cable-under-gnulinux-debian-wheezy-74.html - -Use an alias like: - - alias xilinxenv147='source /opt/Xilinx/14.7/ISE_DS/settings64.sh; export LD_LIBRARY_PATH=:/usr/local/lib/libusb-driver.so' - - -Lattice Diamond 3.1 on Debian Linux 64-bit --------------------------------------------- - -Lattice Semi offers no-cost software development tools for their FPGA parts, -called Lattice Diamond. The toolchain is based on Synopsys Synplify Pro for -synthesis and Aldec Active-HDL for simulation, and runs on Linux. The -non-supscription version of the toolchain can target most parts, but not some -of the LatticeECP2 product line, any LatticeECP3 parts, or the -LatticeSC/LatticeSCM devices. - -First you need to register for an account to get a no-cost license, and agree -to a EULA. Doves cry. Generate a free license following a link from the -"Licensing" tab of the Diamond Software page. You won't get the license -immediately, it will be emailed to you (after human approval?). It's a 1.2 GB -download, which is way smaller than Xilinx ISE. The below was tested with -version 3.1 for 64 bit linux. - -The IDE comes as an .rpm file for Fedora/RedHat. To install on debian/ubuntu, -the 'alien' tool can be used to convert this to a .deb. This process can take a -long time (20+ minutes?), particularly at the "debian/rules binary" step. Run:: - - sudo alien --to-deb --scripts diamond_3_1-base_x64-96-x86_64-linux.rpm - -Unfortunately, this won't install as-is because the package will try to use -``uname i`` to determine the architecture type, when it probably should use -``uname -p`` (at least on linux/debian)[0]. So we need to extract, edit, and -re-build the .deb: - - # extract - chown $USER:$USER diamond-3-1-base-x64_3.1-97_amd64.deb - dpkg-deb -x diamond-3-1-base-x64_3.1-97_amd64.deb diamond - dpkg-deb --control diamond-3-1-base-x64_3.1-97_amd64.deb diamond/DEBIAN - - # edit: `uname -i` => `uname -m` - $EDITOR diamond/DEBIAN/preinst - - # rebuild: this is slow - dpkg -b diamond . - -Then (finally) install the package: - - sudo dpkg -i diamond-3-1-base-x64_3.1-97_amd64.deb - -You'll need to add the following to your $PATH (or could have edited the -install prefix above): - - /usr/local/diamond/3.1_x64/bin/lin64 - -Also install the license file which was emailed to you: - - sudo cp license.dat /usr/local/diamond/3.1_x64/license - -Then run ''diamond''. - -Ref: http://effluviaofascatteredmind.blogspot.com/2010/10/lattice-diamond-on-ubuntu-1004-64-bit.html -[0] https://lists.debian.org/debian-user/2013/05/msg01416.html - -Diamond Programmer -~~~~~~~~~~~~~~~~~~~~~~~~ - -The programmer (for uploading bitfiles, eg via an FTDI chip on a breakout -board or a JTAG cable) breaks if the ftdi_sio (FTDI USB-Serial) kernel module -loaded for the bare USB device. This driver will automatically load on most -linux platforms (which is normally the desired behavior), but we need to -disable this to use the Lattice programmer. It's possible to disable the -ftdi_sio driver system-wide using a blacklist entry in /etc/modprobe.d, but -then no other FTDI-based devices (which are extremely common) will work. So -instead we'll use a udev rule to match only on Lattice "upload cables". - -Setup: - - sudo vim /etc/udev/rules.d/10-lattice-diamond - - # Disable "ftdi_sio" driver for Lattice dev boards - SUBSYSTEM=="usb",DRIVER=="ftdi_sio",ATTRS{interface}=="Lattice FTUSB Interface Cable",ATTRS{bInterfaceNumber}=="00",RUN+="/bin/sh -c 'basename %p > /sys/bus/usb/drivers/ftdi_sio/unbind'" - - sudo /etc/init.d/udev restart - -Then you can load the GUI: - - sudo /usr/local/diamond/3.1_x64/bin/lin64/programmer - -or via command line, if you already have a .xcf upload configuration file -generated (NB: this is distinct from the .jed bitfiles which actually get -uploaded, and can be created with the programmer GUI): - - sudo /usr/local/diamond/3.1_x64/bin/lin64/pgrcmd -infile program_breakout_example.xcf -cabletype USB2 - -Troubleshooting Notes -~~~~~~~~~~~~~~~~~~~~~~~~ - -When programming, only the programmer GUI can be open; if the IDE is run at the -same time it will connect to and block the device. Aka, "Another instance of -this program is running". - -Perhaps a better way to handle permissions is with udev rules or a DIY script. -To test udev rules, try: - - sudo udevadm test /dev/bus/usb/###/### - -A permissions problem that comes us is, eg: - - unable to open device '/sys/dev/bus/usb/003/004' - -An error that comes up with the bundled FTDI driver is: - - [122032.033366] pgrcmain[10879]: segfault at 50 ip 00007f4cf1508b5e sp 00007fffb86dc210 error 4 in libftd2xx.so[7f4cf14fe000+2c000] - -Other problems needing solutions: - - Board with FTDI USB Host Chip detected. - - Programming XCF Contents... Connected to Lattice Cable Server. - Failed. diff --git a/electronics/fpga-toolchain.rst b/electronics/fpga-toolchain.rst new file mode 100644 index 0000000..f60062e --- /dev/null +++ b/electronics/fpga-toolchain.rst @@ -0,0 +1,185 @@ +FPGA Toolchain Notes +========================== + +Setup Xilinx 13.3 WebPack on Ubuntu 11.10 64bit +------------------------------------------------- + +Installer archive is ~5gb, extracted will be about 5gb, install will be about +14gb. You'll probably need root. + +Download the appropriate WebPack ISE archive from the Xilinx website; you'll +need to create an `account `_. While the download is +running, generate a WebPack license file (Xilinx.lic) and save that to your +home folder. + + $ mkdir /tmp/ise_install + $ cd /tmp/ise_install + $ tar xvf ~/Xilinx_ISE_DS_Lin_13.3_O.76xd.1.0.tar + $ cd Xilinx_ISE_DS_Lin_13.3_O.76xd.1.0/ + $ sudo ./xsetup # install as root! + + # agree to license agreements + # + # select WebPack + # + # defaults for license: "Acquire or Manage..." and "Ensure Linux + # System...". "Install Cable Drivers" failed for me. + # + # extract to /opt/Xilinx/13.3 + # + # in the license manager that pops up, go straight to "manage licenses" and + # import the one you generated + # + # done! + +To start the IDE run `/opt/Xilinx/13.3/ISE_DS/ISE/bin/lin64/ise` (set it up as +an alias or with a wrapper script). + +Xilinx Vivado 2014.4 on Debian Wheezy 64bit +--------------------------------------------- + +Download is 5.0GB; unziped installer is 5.2GB. /opt/Xilinx/Vivado/2014.4 is +6.9GB; /opt/Xilinx/SDK/2014.4 is 4.9GB. So in total you'll want more than 22GB +to download and install. + +Run the installer as sudo (no strictly necessary?). Select Vivado WebPACK. +Install Cable Drivers and Software Development Kit (this later is big, another +~5GB unextracted). + +When the install is done and license manager pops up, do the "Save link" thing +(because you are running as root, browser probably won't work), then find that +.html file and open it as your regular user; it will redirect. Select the +Vivado WebPACK and SDK licenses (the ones with no expiration, not the +evaluation ones). + +Create a ~/.profile or ~/.bashrc alias like: + + alias vivadoenv2014.4="source /opt/Xilinx/Vivado/2014.4/settings64.sh" + + +Xilinx Platform Cable USB II Drivers on Debian Wheezy 64-bit +------------------------------------------------------------- + +Follow these directions: + +https://vjordan.info/log/fpga/setting-up-the-xilinx-platform-cable-under-gnulinux-debian-wheezy-74.html + +Use an alias like: + + alias xilinxenv147='source /opt/Xilinx/14.7/ISE_DS/settings64.sh; export LD_LIBRARY_PATH=:/usr/local/lib/libusb-driver.so' + + +Lattice Diamond 3.1 on Debian Linux 64-bit +-------------------------------------------- + +Lattice Semi offers no-cost software development tools for their FPGA parts, +called Lattice Diamond. The toolchain is based on Synopsys Synplify Pro for +synthesis and Aldec Active-HDL for simulation, and runs on Linux. The +non-supscription version of the toolchain can target most parts, but not some +of the LatticeECP2 product line, any LatticeECP3 parts, or the +LatticeSC/LatticeSCM devices. + +First you need to register for an account to get a no-cost license, and agree +to a EULA. Doves cry. Generate a free license following a link from the +"Licensing" tab of the Diamond Software page. You won't get the license +immediately, it will be emailed to you (after human approval?). It's a 1.2 GB +download, which is way smaller than Xilinx ISE. The below was tested with +version 3.1 for 64 bit linux. + +The IDE comes as an .rpm file for Fedora/RedHat. To install on debian/ubuntu, +the 'alien' tool can be used to convert this to a .deb. This process can take a +long time (20+ minutes?), particularly at the "debian/rules binary" step. Run:: + + sudo alien --to-deb --scripts diamond_3_1-base_x64-96-x86_64-linux.rpm + +Unfortunately, this won't install as-is because the package will try to use +``uname i`` to determine the architecture type, when it probably should use +``uname -p`` (at least on linux/debian)[0]. So we need to extract, edit, and +re-build the .deb: + + # extract + chown $USER:$USER diamond-3-1-base-x64_3.1-97_amd64.deb + dpkg-deb -x diamond-3-1-base-x64_3.1-97_amd64.deb diamond + dpkg-deb --control diamond-3-1-base-x64_3.1-97_amd64.deb diamond/DEBIAN + + # edit: `uname -i` => `uname -m` + $EDITOR diamond/DEBIAN/preinst + + # rebuild: this is slow + dpkg -b diamond . + +Then (finally) install the package: + + sudo dpkg -i diamond-3-1-base-x64_3.1-97_amd64.deb + +You'll need to add the following to your $PATH (or could have edited the +install prefix above): + + /usr/local/diamond/3.1_x64/bin/lin64 + +Also install the license file which was emailed to you: + + sudo cp license.dat /usr/local/diamond/3.1_x64/license + +Then run ''diamond''. + +Ref: http://effluviaofascatteredmind.blogspot.com/2010/10/lattice-diamond-on-ubuntu-1004-64-bit.html +[0] https://lists.debian.org/debian-user/2013/05/msg01416.html + +Diamond Programmer +~~~~~~~~~~~~~~~~~~~~~~~~ + +The programmer (for uploading bitfiles, eg via an FTDI chip on a breakout +board or a JTAG cable) breaks if the ftdi_sio (FTDI USB-Serial) kernel module +loaded for the bare USB device. This driver will automatically load on most +linux platforms (which is normally the desired behavior), but we need to +disable this to use the Lattice programmer. It's possible to disable the +ftdi_sio driver system-wide using a blacklist entry in /etc/modprobe.d, but +then no other FTDI-based devices (which are extremely common) will work. So +instead we'll use a udev rule to match only on Lattice "upload cables". + +Setup: + + sudo vim /etc/udev/rules.d/10-lattice-diamond + + # Disable "ftdi_sio" driver for Lattice dev boards + SUBSYSTEM=="usb",DRIVER=="ftdi_sio",ATTRS{interface}=="Lattice FTUSB Interface Cable",ATTRS{bInterfaceNumber}=="00",RUN+="/bin/sh -c 'basename %p > /sys/bus/usb/drivers/ftdi_sio/unbind'" + + sudo /etc/init.d/udev restart + +Then you can load the GUI: + + sudo /usr/local/diamond/3.1_x64/bin/lin64/programmer + +or via command line, if you already have a .xcf upload configuration file +generated (NB: this is distinct from the .jed bitfiles which actually get +uploaded, and can be created with the programmer GUI): + + sudo /usr/local/diamond/3.1_x64/bin/lin64/pgrcmd -infile program_breakout_example.xcf -cabletype USB2 + +Troubleshooting Notes +~~~~~~~~~~~~~~~~~~~~~~~~ + +When programming, only the programmer GUI can be open; if the IDE is run at the +same time it will connect to and block the device. Aka, "Another instance of +this program is running". + +Perhaps a better way to handle permissions is with udev rules or a DIY script. +To test udev rules, try: + + sudo udevadm test /dev/bus/usb/###/### + +A permissions problem that comes us is, eg: + + unable to open device '/sys/dev/bus/usb/003/004' + +An error that comes up with the bundled FTDI driver is: + + [122032.033366] pgrcmain[10879]: segfault at 50 ip 00007f4cf1508b5e sp 00007fffb86dc210 error 4 in libftd2xx.so[7f4cf14fe000+2c000] + +Other problems needing solutions: + + Board with FTDI USB Host Chip detected. + + Programming XCF Contents... Connected to Lattice Cable Server. + Failed. diff --git a/electronics/microcontrollers.page b/electronics/microcontrollers.page index 3ddb130..92b91dd 100644 --- a/electronics/microcontrollers.page +++ b/electronics/microcontrollers.page @@ -1,4 +1,3 @@ -=================== Microcontrollers =================== @@ -32,5 +31,5 @@ handling between multiple agents. It was written for robotic research. ARM Cortex-M3/4 Stuff ------------------------- - - http://www.versaloon.com/ - + - + - "STM32/ARM Cortex-M3 HOWTO: Development under Ubuntu (Debian)" (from fun-tech.se: diff --git a/electronics/misc.page b/electronics/misc.page index 45071c5..1484798 100644 --- a/electronics/misc.page +++ b/electronics/misc.page @@ -1,9 +1,9 @@ -Anti-Static --------------- +## Anti-Static -Great video about static disipative and static shielding bagies from EEVblog: - +There is a great +[video](http://www.eevblog.com/2012/02/25/eevblog-247-anti-static-bag-myth-revisted) +about static disipative and static shielding bagies from EEVblog. Summary: "pink" bags and tubes just prevent static buildup (regular bubble or plastic wrap can generate hundreds or thousands of volts pretty easily just by @@ -12,31 +12,24 @@ actually prevent external discharges or shocks from harming ICs inside. If you use a shielding bag, you still need to make sure all the materials inside will not build up a charge. -Random Number Generators ----------------------------- - -- `Wikipedia overview `_ -- `Wikipedia comparison of devices `_ -- `Entropy Key `_: a $50 USB key using avalanche - noise from two P-N junctions; lots of support and features. -- Overview of cheap avalanche technique: http://web.jfet.org/hw-rng.html -- whirlygig CPLD-based source: http://warmcat.com/_wp/whirlygig-rng/ -- a bunch of resources: http://www.cs.berkeley.edu/~daw/rnd/ -- more: http://robertnz.net/rng_rep.htm -- one open design (as a shield): http://1010.co.uk/org/notes.html#45 -- IEEE article: http://spectrum.ieee.org/computing/hardware/behind-intels-new-randomnumber-generator/0 -- basic design: http://www.cryogenius.com/hardware/isarng/ http://www.cryogenius.com/hardware/rng/ +## Random Number Generators + +* [Wikipedia overview](http://en.wikipedia.org/wiki/Hardware_random_number_generator) +* [Wikipedia comparison of devices](http://en.wikipedia.org/wiki/Comparison_of_hardware_random_number_generators) +* [Entropy Key](http://www.entropykey.co.uk): a $50 USB key using avalanche +* noise from two P-N junctions; lots of support and features. +* Overview of cheap avalanche technique: +* whirlygig CPLD-based source: +* a bunch of resources: +* more: +* one open design (as a shield): +* [IEEE article](http://spectrum.ieee.org/computing/hardware/behind-intels-new-randomnumber-generator/0) on Intel's hardware +* basic design on [cryogenius.com](http://www.cryogenius.com/hardware/isarng/ http://www.cryogenius.com/hardware/rng/) Breakdown of the base-emitter junction of a 2N3904 happens at about 6v, -accoding to: http://sentex.ca/~mec1995/tutorial/xtor/xtor6/xtor6.html +accoding to: See also: -- http://en.wikipedia.org/wiki/A_Million_Random_Digits_with_100,000_Normal_Deviates -- http://en.wikipedia.org/wiki/Nothing_up_my_sleeve_number - -STM32 Toolchain Guides -------------------------- - -"STM32/ARM Cortex-M3 HOWTO: Development under Ubuntu (Debian)" (from -fun-tech.se: http://fun-tech.se/stm32/) +- +- -- cgit v1.2.3