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