Controlling a UR3 robot with gestures over a network

Hello everyone!

Thankfully, it didn’t take me a year to write a 2nd post! This time it’s about a part of a project I worked on the last 2-3 months (in parallel to my PhD studies of course :P). The topic is again teleoperation, this time only using hardware (last post was about using a virtual environment) such as the UR3 robotic arm below (looks great doesn’t it?).

UR3

The project I contributed to was demonstrated in Mobile World Congress 2017 in Barcelona at one of the booths of Ericsson. Why Ericsson? Because King’s College London (where I study) and Ericsson collaborate on standardizing 5G. I must say it was a pleasure working with everyone who participated.

Needless to say it was a really tiring week as the event hit a record of 108,000 visitors, but what an experience it was…just epic! I also had the chance to meet and discuss with many interesting and amazing people. For more information there is a CNET article with a bit of a demonstration as well 🙂

Anyway…with the amount of time I had available to learn how to use ROS etc and make the robot move, I could only create a gesture system that receives position commands from a client. The positions the robot could move were pre-defined. I wish I had more time to make a direct control application (with speed and range of motion limiters of course).

The juice

You can download the Python script here. So…to make the robot move we used Linux (Ubuntu 14.04 specifically) with ROS. I said “we” because ROS was not used only for making the robot move. Anyhow, to make the app run you need to:

  1. Create a catkin workspace using ROS.
  2. Download the ROS-Industrial universal robot meta-package.
  3. Download ur_modern_driver and put everything inside the workspace’s src folder.
  4. Compile with catkin_make (yes, you will probably need to install many ROS dependencies).
  5. And then open a terminal to launch ROS with:

    $ source path/to/workspace/devel/setup.sh

    $ roslaunch ur_bringup ur3_bringup.launch robot_ip:=xxx.xxx.xxx.xxx (apply the correct robot IP)

  6. Open another terminal to run the application:

    $ source path/to/workspace/devel/setup.sh

    $ rosrun ur_modern_driver network_move.py

 

Again, as with my previous post…not sure if this is helpful to anyone but it’s good to have it documented somewhere 🙂

MSP430 + Eclipse CDT on Fedora 19

Hello! This is a guide to install Eclipse and everything required to flash your project to a MSP430 board 🙂

First, you need to install Eclipse CDT (the Eclipse version using the C/C++ IDE) and there are three ways:

  1. Go the Eclipse’s website, download and install it yourself
  2. Use Fedora’s “Software” application (which is PackageKit, the GUI of yum) and search for “eclipse-cdt”
  3. Use your terminal, type su, press enter, give your root password and then type yum install eclipse-cdt. Type “y” to install all dependencies required for eclipse-cdt 🙂

After you have successfully installed Eclipse CDT you can continue to the main course. We need a plugin for MSP430 called msp430-eclipse by xPG. Don’t download anything yet. We’ll use Eclipse for that!

Now, open Eclipse go to Help->Install new software and add http://eclipse.xpg.dk as a software source. Use it to install the msp430 plugin.

Next, we need a tool-chain that includes all files to compile, debug etc our code specifically for our MSP430 platform! Visit xPG’s website as mentioned previously. Scroll down and choose the version of the tool-chain for your system.

We will need to install a few packages more though as xPG’s tool-chain is not sufficient (If you try to compile without those packages it will fail to find libmpc.so.2, or something like that). I fixed it by installing five msp430-related packages: msp430-binutils, msp430-gcc, msp430-libc, msp430mcu, mspdebug. Maybe some of them are not really needed but ok it’s only a few Kbytes and in the end everything works well. You can use step 2 or step 3 from above!

If you are confident for your tool-chain and skipped my previous steps, you don’t need to download any package (the next step), you just need to configure Eclipse later on.

Download and extract the package in an appropriate location (like your home folder, or any other folder inside it). Go to Eclipse (with the plugin already installed, like I showed you before) and from Eclipse’s menu click on MSP430 -> Tool Manager. Press  “Add…”, find the tool-package folder, select it and click OK. On the Tool Manager, select the tool-chain and press “Activate”.

If you want to use your own tool-chain, all MSP430 compilation and debug tools can be configured at Window->Preferences->MSP430.

As normal users we don’t have permission to use the USB bus. To fix that, go to Fedora’s “Users and Groups” or system-config-users (if you don’t have that install it like all other packages). Create a group named eg. “usb” and add your user into it (“Users” tab -> select your user-> Properties). Log out and log in again for changes to take effect.

Next, go to a terminal, type “su -” and create a file with the command: gedit /etc/udev/rules.d/71-persistent-msp430.rules . Then, copy, paste and save this:

SUBSYSTEM==”usb”, ATTRS{idVendor}==”0451″, ATTRS{idProduct}==”f432″, MODE=”0660″, GROUP=”usb”

The numbers “0451” and “f432” can be verified if you connect your board and use the command “lsusb”.  Now, go to a terminal for the last time and give these three commands:

systemctl restart systemd-udevd.service

systemctl restart systemd-udev-trigger.service

systemctl restart systemd-udev-settle.service

Now, let’s make a new project and test what we’ve done. This will require a MSP430 board, hopefully supported by the plugin (which is very probable as you will notice). Create a new C/C++ project and select the “Empty project” at the “MSP430 Cross Target Application” folder. Give it a name and then click Finish.

Right-click the project at the “Project Explorer” and choose Properties. Go to the “MSP430” section, select your MCU and debug settings. Next, go to the “C/C++ General” section -> Paths and Symbols, select GNU C at the “Includes” tab and include the path “/home/username/any_directory/msp430-toolchain-linux-amd64-3.0/msp430/include” (same for GNU C++)

Right-click the folder, create a src folder and place a source file into it preferably with a blink.c (a blinking LED example) file for your board such as this one in this blog. Don’t forget to include your board’s header file!

Build the project, then right-click the project and select MSP430->Upload to target (or use the icon for that job at the main bar).

The example should work and this brings us to the end of this tutorial 🙂

DIY Reverb pedal PCB (in Greek)

Λοιπόν guys & girls,

Φτιάχνω ένα κύκλωμα ενός πεταλιού reverb για κιθάρα με ελατήρια [1] Εδώ είναι και το σχηματικό για εκτύπωση [2] Η μέθοδος που χρησιμοποίησα είναι η μέθοδος μεταφοράς του σχηματικού μέσω laser printer!

Η μικρή πλακέτα εκτυπώθηκε στο χαλκό τέλεια!!! Στη μεγάλη μου βγήκε πρόβλημα με το μελάνι (βγήκε ελάχιστο μαζί με το χαρτί αλλά αρκετό ώστε να προκαλέσει αλλοίωση του κυκλώματος)

Τί έκανα (στο 5ο βήμα βγήκε το πρόβλημα της μεθόδου) :

1) Με πράσινο σφουγγάρι κουζίνας (τα πουλάνε και σκέτα όχι μαζί με την κίτρινη πλευρά), έτριψα πολύ καλά τη χάλκινη επιφάνεια της πλακέτας να λάμψει. Καθρέφτιζε λίγο μπορώ να πω.

2) Έπειτα εκτύπωσα (με laser printer) σε γυαλιστερό χαρτί περιοδικού μόδας (όχι το εξώφυλλο, τα μέσα φύλλα και σε λευκή σελίδα που έψαξα και βρήκα) το σχηματικό!

3) Έκοψα την περιοχή που με ενδιέφερε και κόλλησα το χαρτί (με κολλητική ταινία στην ακριανή μεριά της πλακέτας) για να είναι σταθερό και να ακουμπάει όσο γίνεται το χαρτί την πλακέτα χωρίς κενά ενδιάμεσα. Φυσικά η πλευρά του σχεδίου πρέπει να βλέπει το χαλκό.

4) Έβαλα το σίδερο στο φουλ (το προθέρμανα αρχικά) ακούμπησα σε ένα χοντρό κομμάτι ξύλο που έχω την πλακέτα με το χαρτί και πάτησα με το σίδερο (από την πλευρά του χαρτιού) για 45”. Μετά το πρώτο γερό πάτημα τον 45 δευτερολέπτων πίεσα προσεκτικά κάθετα προς την επιφάνεια της πλακέτας με τη μύτη του σίδερου σε αρκετά σημεία της πλακέτας. ΜΗΝ το πάτε πέρα δώθε το μελάνι χυθεί παντού στην πλακέτα.

5) Ξέπλυνα με νερό να φύγει το χαρτί. Έμεινε το μελάνι πάνω στον χαλκό. ΑΛΛΑ!!!!

Μέχρι εδώ το προσπάθησα 3 φορές. Το μελάνι ΔΕΝ έμενε πάντα στις περιοχές που έπρεπε αλλά απλωνόταν και για αυτό αναγκάστηκα να ξύσω προσεκτικά τις περιοχές που δεν ήθελα μελάνι.

Όταν αποκολλήθηκε σε ορισμένα σημεία έφυγε και λίγο μελάνι. Κάτι που είναι σημαντικό διότι καταστρέφει το επιθυμητό κύκλωμα (μετά την αποχάλκωση). Έτσι μια πρόχειρη λύση που βρήκα ήταν να βάψω αυτά τα σημεία με ανεξίτηλο μαρκαδόρο και εν μέρη δούλεψε!

6) Στην αποχάλκωση δεν πείρα έτοιμο αποχαλκωτικό. Έφτιαξα το δικό μου και δούλεψε σούπερ! Το έκανα δυστυχώς περίπου με το μάτι (σύγκρινα παρόμοια δοχεία, τεσπά πατέντα της στιγμής) αλλά σε 4 λεπτά έφυγε ο χαλκός!!!

130 ml HCl υδροχλωρικό οξύ (6-12% περιεκτικότητα, πείρα τηλέφωνο τον Έλλην κατασκευαστή και αυτό μου απάντησαν) και 3 σφυνάκια perhydrol (περιεκτικότητα 50% Η2Ο2, το κοινό οξυζενέ του φαρμακείου μου είχε 3% περιεκτικότιτα).  Περίπου αναλογία  5:1. Πρώτο το HCl μετά λίγο λίγο το perhydrol. Βούτιξα την πλακέτα με προσοχή (φορούσα γάντια, γυαλιά και δεν άφησα εκτεθημένο σημείο του σώματος μου). Το μείγμα αυτό είναι ΚΑΥΣΤΙΚΌ και ΤΟΞΙΚΌ!!! Δεν χρησιμοποιούμε μεταλλικά σκεύη. Μονάχα πλαστικά ή γυάλινα.

Με το που έβαλα την πλακέτα άφρισε, έβγαλε καπνούς (είναι τοξικοί) και έγινε γαλαζοπράσινο. Ο χαλκός έφυγε σε 4 λεπτά.

Είμαι σε αυτό το βήμα αυτή τη στιγμή και το αποτέλεσμα είναι αυτό [3]

Θα δοκιμάσω τώρα να βγάλω το μελάνι με ακετόνη (το ασετόν που είχα και ήταν για νύχια είχε έλαια κτλ δεν έκανε τίποτα σχεδόν όπως θα δείτε). Θα ακολουθήσουν και άλλα posts όπως καταλαβαίνετε!

[1] http://www.solorb.com/elect/musiccirc/reverb2/index.html

[2] http://gaussmarkov.net/layouts/springrev/project.pdf

[3] https://picasaweb.google.com/lh/photo/E3ti09J6kqIqDvSFrDv5hg?feat=directlink

My Fedora 15 tweaks for an SSD

NOTE: Same things apply even on Fedora 17/18/19 🙂

====== In English / Αγγλικά ======

Hello! I am going to share how I tweaked my Linux system using Fedora 15!

I did a bit of searching and found some interesting proposals on how to do it. To be honest there isn’t one specific way of doing it. It depends on how much you love your data, how much you want your SSD to live and of course what’s your hardware (eg. my SSD supports TRIM, I have enabled the RAID option and I have 8 GBs of RAM). In short, what I will do is make the system use the TRIM command (which is essential) and put the temporary folders in RAM.

tip: if you have other OSs installed and change to RAID mode (with one ssd it’s like AHCI), they might not work (there are guides to avoid re-installation)…Linux will work though 🙂

One great source was this one [1].

First of all, we will use the ext4 filesytem (no swap partition for me). There is one thing to know! Writing on your SSD without reason or moving/writing data is harming its life expectancy. SSDs have endurance due to the MLC technology [2] (approximately 10.000 writes per memory block [3]) which is cheaper, but in the end we also want our SSD to live!

Now, apart from my SSD, I also have my old HDD plugged in my computer. It’s SATA so I didn’t have any other problems to set it up. During the installation process, I created my partitions manually. You know: create some free space and then create new partitions with the appropriate mount points. I used “/” ,obviously for a partition for the root directory, and also “/home” to place my data and program configuration on a different partition (and disc). To store “/home” folder, I used the HDD, just because I want to download stuff and save my media files there! Remember that it’s bad for your SSD writing again and again to it.

After you install Fedora 15, to check if your SSD supports the TRIM command (supposing your disc is  /dev/sda) :

hdparm -I /dev/sda | grep TRIM

(grep will search and find the lines where the word “TRIM” exists in the output of the command before the “|” symbol)

Now, you must edit the “/etc/fstab” file, it’s the filesystem table.You can create a copy of this file in case you feel it won’t work (but, hey, it will) or something else goes wrong:

cp /etc/fstab /etc/fstab.bakup

How did I edit it? “su -” , give your password and then “gedit /etc/fstab”. Now, visit the second page [4] of the guide at step 2! TRIM command support (if your drive supports it of course) ! You absolutely need to do this! Now that you opened “fstab” you need to add the “discard” parameter next to the defaults parameter for the root directory! As you will see at the link it’s something like that:

/dev/sda1 / ext4 defaults

That will change to something like that:

/dev/sda1 / ext4 discard,defaults

Now, it’s up to you if you want to add one other parameter! Tweaking might mean less reliability and data integrity but that’s why I moved my precious data on my HDD 😉 You can also add the “noatime” parameter (just like discard)  and, hey(!), Linus Torvalds also suggests it [5]

What’s next? Moving our temporary folders to RAM. I have 8 GBs of RAM and I am not afraid to “use” them! By “temporary folders” I mean “/tmp”, “/var/tmp” and “/var/log”. For that, you need to add three lines (each one for every folder) at the “/etc/fstab” file. It’s step 6 at the guide. One line (for /tmp) will look like this:

none /tmp tmpfs defaults 0 0

Don’t worry about “none” (it’s just a name) it helps the folders stand out so that we will find them easier later. Next thing you can do is to also move the Mozilla Firefox cache there (as proposed in the guide)!

To check if everything is working just run the command “df” and it will show you what are you partitions doing!

OK, how can we optimize our system even more? Disabling journaling of ext4 (making it unable to keep track of data, meaning unreliable). BUT! This is as far as I will tweak my SSD. Furethermore, we allready changed “noatime”. I have the life expectancy I need and also a high speed disk, having in mind that I want my data uncorrupted as much as possible.

[1] http://cptl.org/wp/index.php/2010/03/30/tuning-solid-state-drives-in-linux/

[2] http://en.wikipedia.org/wiki/Multi-level_cell

[3] http://www.laptopmag.com/advice/expert/are-ssds-worth-the-money.aspx?page=3

[4] http://cptl.org/wp/index.php/2010/03/30/tuning-solid-state-drives-in-linux/2/

[5] http://kerneltrap.org/node/14148

======= In Greek / Ελληνικά =======

Για να λειτουργήσετε τον SSD σας ώστε να “ζήσει” και να λειτουργεί στην μέγιστη απόδοση, δεν υπάρχει μόνο ένας τρόπος. Ανάλογα με το hardware του υπολογιστή σας (ο δικός μου υποστηρίζει την εντολή TRIM , έχω ενεργοποιήσει το RAID mode και έχω 8GB RAM),και το πόσο χρειάζεστε την ασφάλεια των δεδομένων σας πρέπει να επιλέξετε εσείς τί αλλαγές θα κάνετε. Αυτό που είναι σίγουρο πως πρέπει να κάνετε είναι να ενεργοποιήσετε τη λειτουργεία TRIM του λειτουργικού. Εγώ επέλεξα και να μεταφέρω τους φακέλους “/tmp”, “/var/tmp /” και “/var/log” στη RAM, όπως επίσης εφτιαξα ένα partition για το  “/home” στον HDD δίσκο που μου ξέμεινε από το προηγούμενό μου PC.

συμβουλή: αν έχετε εγκαταστήσει ήδη κάποιο άλλο λειτουργικό εκτός του Linux και αλλάξετε το IDE mode σε RAID mode θα έχετε πρόβλημα το οποίο λύνεται και χωρίς format. Απλά ψάξτε το λίγο.

Ένα καλό site που συμβουλεύτικα για όσα έκανα στο δίσκο είναι αυτό εδώ [1] (δείτε τα links πάνω)

Καταρχήν, χρησιμοποιό το ext4 filesystem. Χωρίς swap. Πρέπει να γνωρίζετε ότι όσο περισσότερο γράφουμε στον δίσκο τόσο πιο γρήγορα θα σταματήσει να λειτουργεί στο επιθυμητό επίπεδο. Τόσο πιο γρήγορα θα πρέπει να πάρουμε καινούριο.

Λοιπόν, έφτιαξα ένα partition με το φάκελο root (“/”) στον SSD μου και ένα με το φάκελο “/home” HDD επειδή κατεβάζω και δημιουργώ συνέχεια αρχεία σε αυτόν τον φάκελο!

Έχοντας εγκαταστήσει το Fedora 15, για να δούμε, άραγε ο SSD σας υποστηρίζει το TRIM; (υποθέτως πως είναι ο  /dev/sda) :

hdparm -I /dev/sda | grep TRIM

(το grep θα ψάξει και θα βρει που βρίσκεται στην έξοδο της εντολής πριν το σύμβολο “|” η λέξη “TRIM”)

Τώρα θα επεξεργαστούμε το αρχείο “/etc/fstab”, είναι ο πίνακας για τα filesystems. Μπορείτε να δημιουργήσετε ένα αντίγραφω, μην πάει κάτι στραβά:

cp /etc/fstab /etc/fstab.bakup

Πως να το επεξεργαστείτε τώρα; Με το “su -” , δίνοντας τον κωδικό του root (administrator) και έπειτα με “gedit /etc/fstab” θα σας το ανοίξει με τον επεξεργαστή κειμένου. Τώρα, πηγαίνετε στη 2η σελίδα [4] του οδηγού, στο βήμα 2 (είναι στα αγγλικά)! Αφορά την υποστήριξη του TRIM command (αν το υποστηρίζει ο δίσκος) ! Πρέπει να το κάνετε! Απλά πρέπει να πάτε στο αρχείο που μόλις ανοιξαμε και να προσθέσετε την παράμετρο “discard” στο partition που εγκαταστήσαμε το root directory (το “/” δηλαδή”)! Πρέπει από κάπως έτσιt:

/dev/sda1 / ext4 defaults

Να γίνει  κάπως έτσι:

/dev/sda1 / ext4 discard,defaults

Αν θέλετε να πειράξετε κάτι άλλο εξαρτάται από εσας, για μέγιστη απόδοση φτάνει και αυτό. Μπορείτε (με ρίσκο για τα δεδομένα σας να προσθέσετε και την παράμετρο “noatime“(εγώ την έβαλα καθώς τα δεδομένα που με ενδιαφέρουν βρίσκονται στον HDD μου) Πάντως το συστήνει και ο Linus Torvalds [5].

Επόμενο! Έχω  8 GB RAM και δεν φοβάμαι να τα χρησιμοποιήσω όποτε είπα να μεταφέρω τους προσωρινούς φακέλους μου εκεί. Συγκεκριμένα τους “/tmp”, “/var/tmp” and “/var/log”. Πάλι στο “/etc/fstab” πρέπει να προσθέσουμε μερικές γραμμες (το βήμα 6 στον οδηγό). Μία από τις γραμμές που πρέπει να προστειούν στο τέλος του αρχείου είναι πχ. έτσι (για τον φάκελο /tmp):

none /tmp tmpfs defaults 0 0

Το “none” είναι απλά ένα όνομα, θα βοηθήσει μετά για να ξεχωρίζει από τα άλλα.

Μπορούμε επίσης να μεταφέρουμε και την cache του Mozilla Firefox cache σε αυτό το partition (όπως λέει και ο οδηγός)!

Για να δείτε αν δουλεύουν όλα ρολόι εκτελέστε την εντολή “df” και θα σας δείξει τί κάνουν τα partitions σας!

OK, τώρα αν θέλετε και κάτι παραπάνω (με δικόσας ρίσκο πάντα) μπορείτε να απενεργοποιήσετε το journaling του ext4. Αλλά! Δεν πρόκειται να πω άλλα καθώς δεν έχω πειράξει άλλο το δίσκο μου. Επιπροσθέτως ήδη προσέθεσα τη παράμετρο “noatime”. Ήδη έχω μεγαλώσει το προσδόκιμο ζωής του δίσκου μου. Μήπως τους κρατάμε και για πολύ;

FossComm 2011 and OpenFest 2011 review

This is my review from 2 events I attended and participated in. I will just report with few words what happened and what I did there. Of course I wasn’t alone. As always Fedora rocked with his presence (I will explain later). But! I didn’t only participate with Fedora. You know, I am basically a hardware guy, I study electronics (currently at my last semester, yeah!)

====OpenFest 2011===

OK! Since OpenFest 2011 was first I will start with this event! It was organized by students of the department of Computer Systems at the TEI of Pireaus. I think the Fedora booth was exemplar and with a lot of people helping! We had one bad comment though…few people really wanted the Fedora cheat cubes again on our booth table. I also believe it’s a very cool swag and it’s just a piece of paper! So, people should just wait for our next event 🙂

At OpenFest I made a presentation on Fedora 15 (mentioning and showing a bit of Gnome 3 magic). Pierros and Nikos did a very cool workshop on how to survive with Gnome 3 too!

I also co-presented a workshop with Pierros and Konstantinos concerning Arduino. While it was introductory, we had to repeat it for 2 times more! The room had about 35 seats I think, but at the first 2 presentations people were even standing outside the windows to watch (not to mention that the door was open and people were trying to listen from outside. The 3rd presentation was made in a bigger room the next day.

Photos (thanks to Thalia and Dimitris):

https://picasaweb.google.com/saliyath/OpenFest2011#

https://picasaweb.google.com/dimitrisglaros/Openfest2011#

===FossComm 2011===

Last but not least, the major open source event in Greece. This time at the Univercity of Patras, organized by the Department of Computer Engineering and Informatics. What I really need to mention is that the schedule of FossComm 2011 tried to cover the needs of everyone and I think it did. We enjoyed a lot of good presentations and workshops!

I need to mention that while the Fedora booth was represented well by all the Ambassadors who came to support, Fedora made the difference in the event’s schedule. We had good and many presentations. Not any community can do that 🙂

Of course the swag was there on both booths (Fedora and Mozilla).  But not always there. Visitors, hosts, everyone took everything 🙂

Together with Pierros Papadeas (also made presentations on Fedora and Mozilla at FossComm 2011 ) we did again, as in OpenFest 2011, an introductory Arduino presentation. If I could only have the time to show more code! People were starving for code! Something that we kind of did at OpenFest 2011 🙂 I wanted to talk to people about how useful a library and how Arduino is part of the “Internet of things” nowadays, showing Pachube and the completely opensource Thingspeak.

Presentations I attended:

  • Melissi project by Giorgos Logiotatidis (If you are looking for cloud/python stuff please please check it out and ask)
  • Building a platform-agnostic wireless network of interconnected smart objects using open source tools
    by Anastasia Protopapa and Basilios Georgitzikis (who I thank for his hospitality!). Interconnecting different Zigbee nodes? Sounds like the future to me!
  • hackerspace.gr – hackerspace αλα ελληνικά (I will post more details when hackerspace.gr will be completely ready, but you can follow us on the wiki, the mailing list, identi.ca , twitter or even facebook. We want to share the news everywhere.)

I think I didn’t fully attend something else, but I watch the work of many of the people that presented and I am fully aware of what they do and still wish the best for them. One example is the work of the foss.ntua team Consuela a very handy arduino project for controlling lights with a simple web client setup.

Photos (thanks to Thalia, and Dimitris) :

https://picasaweb.google.com/saliyath/Fosscomm2011Patras02#

https://picasaweb.google.com/dimitrisglaros/Fosscomm2011#

Once again, a big thank you to the hosts and organizers of the events. Another thank you to those who helped!

MSP430 (ez430) on Fedora

For learning purposes I currently have on my hands a EZ430-F2013 Development Kit (We all should also use Arduino 🙂 ). This kit comes with a CD containing proprietary software (an IDE) in order to program and debug the MSP430 microcontroller. So, I took the chance to run it on Fedora using Linux tools and a few resources on the internet. In this post I will write down how you can program and debug your ez430 using Fedora 13 and your terminal.

First, I plugged in the ez430 and opened a terminal (yes we will work only this way for now). Write down lsusb and hit enter. Then you should get some lines containing this one:

Bus 005 Device 003: ID 0451:f430 Texas Instruments, Inc. MSP-FET430UIF JTAG Tool

That means that by default your system recognises the device and you can actually communicate with it.

Next, we need our tools! Go to System ->Administration-> Add/Remove Software (or use yum install etc.). The software we need is (actually not sure if everything is needed):

  • latest version of gcc, texinfo, patch, ncurses5-dev, zlib, zlib-dev, libX11-dev, libusb-dev (not only libusb1-dev), libreadline6-dev, msp430-binutils, msp430-gcc, msp430-libc

and also : mspdebug (the program that actually does the work).To install it manually (in case there is an older version on the repository) download the .tar file create a  folder named “Programs” (in case you don’t have one) on your Home Folder.Then, extract the mspdebug folder there!

With your terminal (you can auto-complete the words in the directory using Tab on your keyboard) :

$ cd /home/(your user name on Fedora)/Programs/mspdebug-0.11

(now you are in the mspdebug folder with your terminal, the version 0.11 is the current one I use, yours can differ)

$ make (this will compile the program)

$ su -c “make install” (and give your root password to install it)

(the $ symbol is just to show that you are using different commands in the terminal, don’t copy it)

now you have installed mspdebug! Great!

If you are ready to use the MSP430 you should have a program already written. In case you don’t, get this example (modified by me to get it to compile) that flashes the internal LED of the device:

/* Blink LED example */
#include <msp430x20x3.h>

/** Delay function. **/
delay(unsigned int d) {
int i;
for (i = 0; i<d; i++) {
nop();
}
}

int main(void) {
WDTCTL = WDTPW | WDTHOLD;
P1DIR = 0xFF;
P1OUT = 0x01;   // THE x IS NOT Copy-Pasted CORRECTLY 🙂

for (;;) {
P1OUT = ~P1OUT;
delay(0x4fff);
}
}

Create a file named blink.c in a folder of your choice, copy this on the file and then cd on the folder. Now to compile it we need 3 lines (I also changed this to work):

$ msp430-gcc -Os -mmcu=msp430x2013 -o led.elf blink.c

$ msp430-objdump -DS led.elf > led.lst

$ msp430-objcopy -O ihex led.elf  led.hex

In order not to do this every single time, you need to run the program, you can create a Makefile based on the one in this site (it’s inside this zip file).

Next, to run mspdebug in order to flash the program into the MSP430, type :

$ mspdebug -d /dev/ttyUSB0 uif

(“/dev/ttyUSB0” is of course the ez430 if you don’t have any other device and “uif” the parameter to run it with mspdebug, check the manual for more)

To flash the program you need to type : prog led.hex . Notice that it is a command to control mspdebug and not the terminal). If you push Control+D mspdebug will close, the ez430 will reset, start the program and also blinking the LED! 🙂

My resources were 3 posts in this site : http://bit.ly/deonNa I should also mention that I have installed all the Fedora Electronic Lab packages with: $ su -c “yum groupinstall “electronic-lab”