Get Started with PSoC and C: Installation

By: Mark Liebendorfer

Category: Learning & Education
Sunday, July 27, 2008 21:18

This is the first article in a series that will show you how to start developing with the family of PSoC micros.  This time I'll describe where to get and how to install a full C-based development environment for free.  This series of articles will focus on PSoC Designer 5.0 which has recently been released and the HI-TECH LITE C compiler. Both tools are free for both personal and commercial use.  This article will be updated as version numbers and link locations change.


Since PSoC was introduced in 2001, Cypress has aggressively updated its free Integrated Development Environment (IDE).  Until recently, however, only the assembly language compiler was free.  The C compiler (written by ImageCraft) cost around $200.


Now a free “light” compiler from HI-TECH Software is available for download (www.htsoft.com).  This article will guide a new user through download and installation of PSoC Designer and the HI-TECH LITE C compiler and highlight common issues.  You should have the software downloaded in a few minutes (with a high speed connection) and installation complete within a half hour.  I suggest you adjust your pop-up blocker so the links given below can open new windows.

Download PSoC Designer

Click here for the PSoC Designer 5.0 software download page (206MB).  Download the two .zip and the .pdf files. 

You should have downloaded the files to the folder of your choice.  For 5.0, there are two .zip files (Designer and Programmer) and one .pdf (release notes).  Note: Release notes often contain important information about changes, features, and problems.


Install PSoC Designer

PSoC Designer is an IDE for developing software for the full family of Cypress PSoC devices.  Cypress has been diligent to maintain and improve their development software - the success of PSoC is entirely dependent on PSoC Designer.  PSoC Designer 5.0 has a completely new look and feel.  If you are accustomed to previous versions, just about everything you are used to seeing in the layout view will be hiding (unhide windows using the View menu).  PSoC Express has been integrated into the Designer program as well.  A future article will talk about ways to get started with the PSoC Designer software.


For this article, I installed the software on an old 800 MHz Pentium III with Windows XP and 256 MB of RAM.  According to the release notes for PSoC Designer, the minimum configuration recommended is a 500 MHz computer with 256MB RAM and 250 MB of disk space.  If you install on a minimum configuration, you'll still get reasonable speed from the software but some of the more CPU-intensive operations (project build for example) will take longer.  On your minimum configuration machine, I suggest you run very few other applications with PSoC Designer to keep free as much RAM as possible.  Your installation machine should also have USB ports for connection of development hardware.  Of course, a more modern machine does not have these problems.


Unzip:  Go to the directory where you saved the downloaded software.  Extract (or "unzip") the two .zip files into the same directory.  As a result you'll have two new sub-directories.  Enter the one with the file that has a name of the following format:  PDvv_Bbbb.exe  (where vv is the version number and bbb is the build number) - the PSoC Designer install file.  Double click that file to begin installation.


Run:  As you follow this article, you may get the following warning:

This notice simply means the software hasn't undergone Microsoft's certification process.  You will need to click "Continue Anyway"  to proceed with the installation.

After starting installation click the "Next" button in the welcome page.  In the next page, the installation offers you a choice of installation directories.  I suggest you accept the default unless you have a compelling reason to install elsewhere.  Click "Next" in the following box to begin installation - a progress dialog will display installation status.


Toward the end of the installation you'll get two dialogs that indicate USB drivers are installing.


Immediately afterward, the HI-TECH C compiler will begin installation.  You will be given three choices of the mode of compiler you wish to install.  You might want to install in the free "LITE" mode first - you can change to "PRO" mode later.  Installing the PRO trial mode first irreversibly starts the 45 day time limit.  See the following subsections for more detail about compiler choices and mode selection.


Choose a Compiler


The Cypress web site has stopped actively promoting the ImageCraft compiler.  In fact, on the Cypress front page, selecting "C-Compiler" from the "Design" menu takes you to a page that only offers the HI-TECH compiler.  ImageCraft has deemphasized their compiler for PSoC as well but you can find the web page here.

The page states they are developing three versions of their compiler for PSoC (STD, ADV, PRO):  You can buy the current version and you'll get a free upgrade to the STD version "when available".  A spokesman for Image craft stated:  "ImageCraft is evaluating the marketing position of [their PSoC] compiler release, pending cooperation from Cypress."  I'll leave it up to you to decide which compiler you wish to use.

You'll need to select the default compiler when you edit your next project, or by doing the following:  1) Start PSoC Designer, create a dummy "Chip-Level" project.  Then go to the "Project" menu, select "Settings" and select your compiler of choice (either HI-TECH or ImageCraft).  This setting will persist to all your new projects. 

HI-TECH Lite

HI-TECH Pro

ImageCraft

Single User Price

Free

$1499

$249

Maintained

Yes

Yes

Not Clear*

Optimization

No

Omniscient Code Generation (OCG)

Sublimation/Compressions

Code Size**

18,768 B

11,630 B

20,652 B

Memory Limitation

None

None

None

Part Limitation

None

None

None

Size of Manual

392 Pages

392 Pages

62 Pages

Trial Period

Unlimited

45 Days

None

*You can still buy a license to activate the ImageCraft compiler within PSoC Designer.  Read the section above "Choose a Compiler" for more detail.
**Based on Cypress' SDCopyFile project.  Data supplied by HI-TECH Software.

 

Install HI-TECH Compiler


If you are installing the compiler separate from PSoC Designer, Click here to download the HI-TECH compiler.  If the link doesn't work, surf to www.htsoft.com and find the Cypress downloads section.  You'll need to register (only name, country, and email address are required), log in using the ID the site gives you, and run the downloaded file.  A window may warn you that the software's publisher cannot be verified - click "Run" to continue.


The second installation screen will give you three options for installation.  The first will be a 45 day trial of the PRO version of the compiler.  You will select the second choice if you have purchased a PRO license.  The third is the free option (LITE mode).  At the end of the 45 day trial, if you do not purchase the PRO version, the software will revert to LITE mode.


NOTE:  If you wish to compare results of the PRO and LITE versions, you can freely change between these modes using the "Add/Remove Programs" window from the Control Panel.  Switching to LITE mode from PRO mode does not halt the 45 day trial time clock.



OCG - What would Freud say?


So, what is OCG?  Isn't that the irrational urge to collect stuff?  According to a news release by Clyde Stubbs, CEO and founder of HI-TECH Software,  the HI-TECH PRO compiler implements Omniscient Code Generation (OCG), a set of optimizations that consider all of your source files together to remove redundancies.  Click here to see the htsoft.com news release (PDF) (from October 2007).


According to data from Clyde, OCG does its best work with larger projects where the user modules and start-up code are not an appreciable percentage of the total code.  If LITE mode fills up a 16K PSoC chip, PRO mode will  cut that by around 35%.  With a 32K PSoC, you'll save around 45%.  A future article will analyze the HI-TECH C compiler modes in more detail.  In the meantime, I suggest you benchmark your own projects using both the LITE and PRO trial modes.

Install PSoC Programmer


PSoC Programmer is software that downloads the code you developed in PSoC Designer to your target chip.  Inexpensive hardware is also required (at least the PSoC MiniProg and 5 electrical connections to the target chip) which we'll cover in the next article.

Return again to the directory where you unzipped the files.  Go to the other new sub-directory and open the file with a name of the following format:  PSoCProgrammerv.vv.x.x.exe where vv is the version number.  (Note: Cypress has not been consistent with their file name formats - the format shown above may change in the future.)  Double click that file to begin installation.  Again you'll get a security warning - just click "Run" in that box to continue.


Four dialog boxes into the installation, the installer will offer you a default directory for the installation.  For some reason, it does not offer to perform the installation in the folder the PSoC Designer installation created.  Again, you should probably accept the default unless you fully understand the consequences.  Toward the end of the installation, you may get Windows Logo Testing warning dialogs - proceed as before and click "Continue Anyway" through the USB driver installations.


The Ending

Well, there you have it:  The best version of PSoC Designer yet and a good free C compiler with relatively few limitations.  Now you have even more reasons to install the latest development software.  Next time, we'll discuss inexpensive chip programming and debugging hardware.



2 Responses to “Get Started with PSoC and C: Installation”

  • Separating codeine from a Says:

    Hi all. The radical of one century is the conservative of the next. The radical invents the views. When he has worn them out the conservative adopts them.
    I am from Somalia and now study English, please tell me right I wrote the following sentence: "Codeine, there have been anti-inflammatory substances which have sold as potential colitis or habit as activity."

    With love :P, Separating codeine from acetaminophen.

  • Zithromax for sinus infec Says:

    Give please. The release of atomic energy has not created a new problem. It has merely made more urgent the necessity of solving an existing one.
    I am from Tunisia and also am speaking English, give please true I wrote the following sentence: "I am contrasting but you come the group, zithromax."

    THX 8-), Zithromax for sinus infection.

Leave a Reply

Adding an entry to the guestbook

remember my information

CAPTCHA image for SPAM prevention