The Rusty Spike

A Railroad Fan's Website

By

Sometimes Linux is Simple….

Sometimes Linux is simple. Other times, its a PITA.Compiling Code for MSP430 via Text Editor and Command Line on Ubuntu Linux As part of resurrecting a older laptop that hasn’t been used in a while, I needed an OS to go onto it. Lacking any Windows licenses, I returned to my roots of Linux. Ubuntu is the current hot linux distro and one that I am familiar with, so it was a natural choice.

One of the first things i wanted to accomplish was to get Code Composer Studio installed and working so I could continue R&D of the Launchpad. I’ve got a loooong list of things I’d like to research, develop and share, but seemingly never a proportional amount of time to do those things in. Heh, such is life.

Well I made the assumption that TI Launchpad development would be harder on Linux and so I unfortunately went looking for solutions before I actually had the problems. Spun my wheels for a good little bit, but in the end I realized that TI hasn’t written any USB drivers for CCS yet. That’s a kill for using CCS to upload programs to the MSP430 chips.

The fall back is the good old command line. Much to my surprise, using a text editor to write the code and cmd line to compile and upload the program was actually *easier* than setting up a project in CCS. As seen in the picture above, you need to enter 4 commands on the command line (Compile, erase chip, upload to chip, run on chip) and, voila, you’re program is uploaded to the MSP430.

Granted, there are still lots of things to work out and this was the simplest of tests. But it does lead me to think that CCS may not be needed for those who just want to download a compiled program and upload it to a MSP430.

More to come in the following days…

By

Uploading a CSS Project to a TI Launchpad Board

CCS_vs5_banner

  1. Import a project into CCS.
  2. Select the root of the project. Screen should look similar to: CSS_WITH_IMPORTED_PROJECT
  3. Connect a TI Launchpad to your computer via USB.
  4. On the ‘Run’ Menu, select ‘Debug’. (note: Hitting F11 on the keyboard performs the same function)
    Run_Menu_Debug
  5. You may see a pop up window talking about ‘Low Power Modes’. It is okay to check ‘Do Not Display This Again’ and then ‘Proceed’.
  6. CCS will now shift over to the ‘Debug Perspective’ and should look like this:Debug_screen
  7. At this point, your code has been uploaded onto the Launchpad and code execution has commenced, but has been paused on the first line of the ‘main’ method. Press F8 to unpause.
  8. Find the red square in the ‘Debug’ tab of the ‘Debug Perspective’ and click it. (It should be on the upper left of the CSS window.) This stops the debugger and releases the Launchpad board to operate without the need of the computer.StopDebugger
  9. Since your code has been uploaded, you can unplug your Launchpad from your computer and use it wherever you plan to use it.

By

Importing a Project into CCS

CCS_vs5_banner

  1. Download a project. Here’s one in a ZIP file that you can right-click and download: PoliceLightbar-Rev3.1.zip
  2. Unzip the downloaded file in your Code Composer Studio’s workspace.
  3. Launch Code Composer Studio.
  4. There are many ways to import a project. Here is the way I do it: On the File Menu, select ‘Import…’
    ImportMenu
  5. On the Import Screen unroll the ‘Code Composer Studio’ group and select ‘Existing CCS Eclipse Projects’. Click Next.
    ImportScreen
  6. Click the ‘Browse’ Button. Find your way to CCS’s workspace and select the project’s folder.
    ImportScreen2
  7. Properly selected project should result in a import screen that looks similar to:
    ImportScreen3
  8. Click ‘Finish’.
  9. The resultant CCS screen should now look similar to: CSS_WITH_IMPORTED_PROJECT
  10. Congrats! You’ve imported a project into CCS!

By

Getting Code Composer Studio

CCS_vs5_banner

Code Composer Studio(CCS) is the Interactive Development Environment(IDE) you will need for creating and/or uploading software onto your TI board. While there are a few choices when it comes to IDEs, CCS is the ‘standardized’ IDE for the Launchpad For Model Railroaders (LP4MRR) initiative.

CCS can be obtained here:

http://processors.wiki.ti.com/index.php/Download_CCS#Code_Composer_Studio_Version_5_Downloads

You will likely have to fill out a form explaining why you are worthy of downloading TI’s software. Don’t sweat it. Just fill out the info and make sure you don’t use CCS for commercial purposes (without paying TI their due, anyways).

Installing is a snap on windows and is just the same as installing nearly any other piece of software.