NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Everything Else » Need help on making Nerdkits function on Ubuntu/Linux

January 22, 2015
by JKITSON
JKITSON's Avatar

Recently I installed Ubuntu-CNC on a pc for a friend. Install was very simple and setup of the CNC software with his board was also easy. So.. I thought this was easy I want one for my Nerdkits. I built up the pc, installed Ubuntu. I have read a lot of forums on installing the avrgcc tool chain etc. I am now about totally lost.

Any body have any ideas or comments?

I have installed WINE and have a few Windows programs working ok. Internet with Google Chrome works very well.

Jim

January 22, 2015
by Noter
Noter's Avatar

It's easy, just download the appropriate linux variety avrgcc & tools from ATMEL and plop it in a directory somewhere. Have to add bin directory to your path but otherwise it's ready to go, just run it. No need to mess with WINE for avr development.

For example, I unpacked the download into my $HOME directory and then added this line to the hidden ".bashrc" file:

export PATH=~/Atmel-AVR-Toolchain-3.4.3/avr8-gnu-toolchain-linux_x86_64/bin:$PATH

"~/Atmel-AVR-Toolchain-3.4.3/avr8-gnu-toolchain-linux_x86_64/bin" is the bin directory.

GEdit is a good/easy wisiwig editor. Install it from the command line with:

sudo apt-get -y install gedit

BTW when looking at your directory in the file manager, <control><H> toggles viewing hidden files.

AvrDude is just as easy although I didn't take the easy route with it because I wanted to run it in debug mode so I downloaded the source and compiled/installed it.

January 22, 2015
by JimFrederickson
JimFrederickson's Avatar

I concur with Noter...

You downloaded/installed Ubuntu on a Computer you built for the Purpose.

Presumably, to get away from Windows or have an Alternative.
(Or maybe just for something different, or learn something different...)

Well keep it different...

The AVR GCC Toolchain can run natively so use that.

There is, although I have not used it "yet", an AVR GCC Toolchain available to
Android too.

I have found "most of the problem with Linux Apps" is getting them installed...

Once they are installed, they are mostly self contained entities at that point so
if you can point to them you can run them...

I, myself, only have 1 Windows PC Left. Everything else has been Ubuntu for some
time.

I really only have that for a few Games I play, and compatibility with work...

January 23, 2015
by Noter
Noter's Avatar

Coming from windows you will probably be happier with LUBUNTU. It has the familiar task bar and similar start type menu layout. It uses the minimal LXDE desktop which will also give better performance on older computers. Might want to give it a try before you get too far along configuring your system.

I've installed LUBUNTU many times now and have made a sort of cheat sheet for setup after the basic install. Not exact instructions but enough to remind me the steps to take to complete a system for what I typically want. Imagine the money you would spend to load up with similar software on windows. Here it is for what it's worth -

sudo apt-get update

sudo apt-get -y purge leafpad
sudo apt-get -y purge sylpheed
sudo apt-get -y purge pidgin
sudo apt-get -y purge abiword
sudo apt-get -y purge gnumeric
sudo apt-get -y purge libreoffice-math

sudo apt-get -y install libreoffice-writer
sudo apt-get -y install libreoffice-calc
sudo apt-get -y install gedit
sudo apt-get -y install speedcrunch
sudo apt-get -y install shotwell
sudo apt-get -y install build-essential
sudo apt-get -y install wallch
sudo apt-get -y install lubuntu-restricted-extras
sudo apt-get -y install libavcodec-extra
sudo /usr/share/doc/libdvdread4/install-css.sh
sudo apt-get -y install vlc
sudo apt-get -y install handbrake
sudo apt-get -y install gimp
sudo apt-get -y install inkscape
sudo apt-get -y install kdenlive
sudo apt-get -y install winff
sudo apt-get -y install filezilla
sudo apt-get -y install bluefish
sudo apt-get -y install gnucash
sudo apt-get -y install audacity
sudo apt-get -y install alsa-tools-gui
sudo apt-get -y install dkms
# follow directions https://wiki.ubuntu.com/Audio/UpgradingAlsa/DKMS
sudo apt-get -y install alacarte        # main menu editor
sudo apt-get -y install compizconfig-settings-manager
# unetbootin for making bootable usb drives
sudo apt-get -y install unetbootin

# add Canonical's to software sources
sudo apt-get update
sudo apt-get -y install skype

sudo apt-get -y install arduino
sudo apt-get -y install gtkterm         # serial terminal
sudo apt-get -y install gerbv           # Gerber file viewer
# Eagle PCB
# Download - http://web.cadsoft.de/ftp/eagle/program/7.2/eagle-lin-7.2.0.run
# sh eagle-lin-7.2.0.run

sudo apt-get -y install lm-sensors      # monitor cpu temp
sudo sensors-detect
sensors
# http://wpitchoune.net/blog/psensor/ubuntu-integration/
sudo apt-add-repository ppa:jfi/ppa
sudo apt-get update
sudo apt-get -y install psensor

# install LAMP server - run tasksel
sudo apt-get -y install tasksel
# https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-ubuntu-14-04
sudo apt-get install phpmyadmin
#For the server selection, choose apache2. Note: If you do not hit "SPACE" to select Apache, 
         the installer will not move the necessary files during installation. 
         Hit "SPACE", "TAB", and then "ENTER" to select Apache.
#Select yes when asked whether to use dbconfig-common to set up the database
#You will be prompted for your database administrator's password
#You will then be asked to choose and confirm a password for the phpMyAdmin application itself
sudo php5enmod mcrypt
sudo service apache2 restart

sudo apt-get update
sudo apt-get install phpmyadmin
sudo php5enmod mcrypt
sudo service apache2 restart
#http://domain_name_or_IP/phpmyadmin

#http://www.webmin.com/deb.html

#Django
sudo apt-get -y install python-pip
sudo pip install virtualenv
sudo pip install Django
#virtualenv source/bin/activate
#django-admin.py startproject

# for hp printers ... http://hplipopensource.com/hplip-web/install/install/index.html
# download - http://prdownloads.sourceforge.net/hplip/hplip-3.14.10.run
# in download folder - sh hplip-3.14.10.run

# Change driver for Brother HL-2140 series printer to:
#      Brother HL-2140 Foomatic/hl1250
#

sudo apt-get -y install samba
# Allow write on $home/public to anyone
# gedit /etc/samba/smb.conf
#       workgroup = FARM
#       name resolve order = bcast host
#       netbios name = HollyzLap1
#       [Public]
#           comment = Public Share
#           browseable = yes
#           path = /home/holly/Public
#           guest ok = yes
#           read only = no
#           create mask = 0755
#testparm
#sudo service nmbd restart
#sudo service smbd restart

# needed to format/reuse raid drive -
# install boot-repair
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair
#
# raid status
sudo dmraid -s
# remove raid metadata
sudo dmraid -r -E /dev/sda
# misc utility
sudo apt-get -y install gpart
sudo apt-get -y install

sudo lshw -C disk
sudo mkfs -t ext3 /dev/sdb1

sudo dd if=/dev/zero of=/dev/sda

# grup optimizer
sudo add-apt-repository ppa:danielrichter2007/grub-customizer

sudo apt-get update
sudo apt-get install grub-customizer
January 23, 2015
by Noter
Noter's Avatar

One more thing, these days I install LUBUNTU 14.04 LTS and that is where I use the cheat sheet.

January 23, 2015
by JKITSON
JKITSON's Avatar

Noter & Jim..

Thanks a heap.. I will print these posts out and see what I can do.

Noter thanks for the "cheat sheet"

I have Ubuntu on there now.. Will look at Lubuntu and may start over..

Thanks again

January 25, 2015
by JKITSON
JKITSON's Avatar

Noter..

Just finished installing LUBUNTU14.10. Then I noticed you said to use 14.04.. Will the 14.10 be ok or do I need to delete & reinstall. Am using the LUBUNTU box for this post. I like the start screen.

On the "cheat sheet" I see some things like Apache server it think. Do I need that?

Thanks for the information & help.

Jim

January 25, 2015
by Noter
Noter's Avatar

There are many things on the cheat sheet that you probably don't need. Apache is the web server so probably you don't need it. Google the apps you don't recognize to see what they are and if you want them or not. You can always install them later too so don't worry about passing on any for now. As an AVR developer, Arduino is one you should install and dig into if you haven't already. You may also want to get gtkterm, gerbv, and eaglePCB now and then skip all the rest unless you want to use your pc for other things like music, pictures, movies, etc. I think python3 comes already installed but if not you might want that too.

I went with 14.04 because it's the current LTS (Long Term Support) version. The LTS versions tend to be more stable and have all of the software available for installation. I think all the cheat sheet stuff will work fine with a newer release although it's possible some will not be available for download/install using apt-get and you would have to download/build them from source to install.

January 25, 2015
by JKITSON
JKITSON's Avatar

Thanks Noter...

I will now start the avrgcc etc. installs. I downloaded Chromium (google chrome) and all my info came up. Nice.

Once I get a little more experience I want to try load & run a windows sign cutting program under WINE. If that works I won't need a Windows PC here in my shop...

Thanks Jim

January 26, 2015
by Noter
Noter's Avatar

I've only one windows program and it's for my MSO-19 logic analyzer. Unfortunately it doesn't work under wine because it wants it's custom windows usb driver. So I had to install XP in VMware Player for it and that works ok but I'd rather have a linux compatible analyzer. Need to list the MSO-19 on eBay but just haven't got around to it yet.

There are several linux based sign cutting programs out there, maybe a good one too. Something to think about if your program isn't so happy under wine.

January 28, 2015
by JKITSON
JKITSON's Avatar

My windows sign cutting program uses a USB dongle & have not been able to make the program see it.

I checked some of the linux sign programs & seems to be some really good ones.

Am having a slow time trying to learn to install programs. I got the gcc-avr tool chain downloaded (I think). Cannot find it anywhere on the hard drive. I read thru the commands on terminal but cannot find anything like the dir command in dos.

I did the sudo thing for gedit. It went thru a long list of stuff then said everythin ok.

I cannot find it either... Looks like I need to go back to kindergarten again...

Jim

January 28, 2015
by Noter
Noter's Avatar

You should be able to find gedit in the start menu or just run it from a command window by typing gedit at the prompt.

Check your Downloads directory for the tool chain file. I'm pretty sure that's the default location.

I like using the file manager windows instead of command prompts to view directories just because I'm more used to that. 'ls' is the command to list directory contents. 'man ls' will show help on the ls command as well as most others. Always try man 'command name' if 'command ?' doesn't work. Many commands will take the ? and give help.

There are many linux tutorials for beginners online and videos in youtube. Might be worthwhile to go through a couple of them. Once you get past some basics using linux gets a lot easier.

January 28, 2015
by JKITSON
JKITSON's Avatar

Thanks Noter will give them a try this evening.

Jim

January 28, 2015
by Noter
Noter's Avatar

There's basically 4 ways to install software on ubuntu and which one you use depends on the particular package. By far the easiest is to use the apt-get install command but it requires the package to be in the ubuntu repository for the particular version of the os you are using. Each version of the os has it's own package repository.

Easy #2 is just download and run like the avr toolchain. Some directions will say to unpack the .tar file (like a windows zip) and move stuff to system directories like /usr/share/.. but I find it's much easier to manage if I just put the unpacked directory into my home directory and then add a new path to .batchrc like I showed above.

The third and most difficult is to download the sources and compile the package to be installed. You'll need to install the build-essential package from the cheat sheet first for the gcc compiler, utilities, and most of the needed libraries although often more libraries will have to be located and installed before a package can be built. But if you want to tweak something or just figure out how it works this is a must have capability. I used this method to learn the internal workings of avrdude as well as fix some problems I was encountering in gtkterm.

And then there's a fourth that is less common but you'll experience if you install EaglePCB and that's download distribution files and run the installation command file that came with it. Usually it's never as smooth as you'd expect and you have to chase down some missing libraries but otherwise it's relatively painless.

Having the most software available via apt-get is a big part of why I tend to stay with the LTS until a new LTS is ready. It wasn't that long ago that I jumped from the 12.04 LTS to the new 14.04 and now I'll stick with it until a new LTS is out.

Post a Reply

Please log in to post a reply.

Did you know that you can adjust most wire strippers to make it easier to strip insulation faster? Learn more...