PJRC.COM Offline Archive, February 07, 2004
Visit this page on the live site

skip navigational linksPJRC
Shopping Cart Checkout Shipping Cost Download Website
Home MP3 Player 8051 Tools All Projects PJRC Store Site Map
You are here: MP3 Player Technical Docs Win32 Compiler Search PJRC

PJRC Store
Main Board, $150
LCD & Pushbuttons, $42
LCD/Backlight/PB, $77
IDE Cable, $9
Complete Parts List
MP3 Player
Main Page
Detailed Info
User Photo Gallery
Connecting The Board
Firmware Download
Side Projects
Technical Docs
Freq. Asked Questions
FAQ #2
News And Updates

Windows Based Firmware Build Tools

Basic instructions for setting up the tools. Screenshots and more detailed explainations for some of these steps are shown below.
  1. Download the tools: sdcc_ok_7jun02_win32.zip (2 megabytes) and extract (using WinZIP) to C:\SDCC.   See figure 1 for correct placement of the directories and files.
  2. Download source code from the firmware page. WinZIP can unpack the .tar.gz archives. The source code must be on the same drive as SDCC, in this example C:\MP3 was used. Do not use spaces in the directory name for the source code.
  3. Open a Command Prompt or MS-DOS Prompt window, and add C:\SDCC\BIN to your PATH Type "PATH" at the prompt to verify that C:\SDCC\BIN appears in the list of directories.
  4. Navigate to C:\MP3 by typing "CD \MP3". You may also need to type "C:" if you start on a different drive. The command prompt should show "C:\mp3>" to let you know you're in the correct directory. You can also edit the "Working" or "Start in" setting within the MS-DOS/Command Prompt shortcut properties, so that you will start in the correct directory and not need to do this step.
  5. Type "make". After some time and many messages scrolled off the window, you should end up with mp3player.hex (and many other intermediate files). Figure 4 shows what you should see after a successful build. If you get an error, see the troubleshooting section. You can type "make clean" to delete all the non-source files.

Please help me to improve this page. I personally use a Redhat Linux system for firmware development, so I really depend on your feedback to improve these Windows instructions.   -Paul

More Information

Bernie has volunteered to help answer windows-related setup questions. He actually uses windows (I do not), so there's a good chance he can help if you run into trouble. Bernie's email is Bernie.Pallek AT corel.com.

Details For The Installation Steps

windows explorer with correctly installed sdcc
Figure 1: Correctly Placed Installation In C:\SDCC (26 EXE and 2 DLL files in C:\SDCC\BIN)

MSDOS Shortcut Properties: Working = C:\SDCC, Batch File = C:\SDCC\SDCCPATH.BAT
Figure 2: Windows 98 MS-DOS Prompt Shortcut Properties To Run SDCCPATH.BAT

In Windows 98, to set up a shortcut (figure 2) that automatically runs the SDCCBAT.BAT batch file, follow these steps:

  1. Launch Windows Explorer, Start -> Programs -> Windows Explorer
  2. Navigate to C:\Windows\Start Menu\Programs
  3. Right click, hold and drag the "MS-DOS Prompt" shortcut to the desktop
  4. Select "Copy Here" when the popup menu appears as you release
  5. Right click on the new shortcut, and select Properties
  6. Select the Program tag
  7. Set "Batch file:" to "C:\SDCC\SDCCPATH.BAT"
  8. Set "Working:" to "C:\SDCC" (or whatever directory your project code will be in).
  9. Click Apply and OK to save your changes.

Windows XP, add '/K PATH=%PATH%;C:\SDCC\BIN' to Target
Figure 3: Windows XP, Adding PATH To Command Prompt Properties

In Windows XP, to create a shortcut (figure 3) which automatically sets up the PATH properly, follow these steps:

  1. Start Menu, Click "All Programs", and then "Accessories"
  2. Right click, hold and drag the "Command Prompt" to the desktop
  3. Select "Copy Here" when the popup menu appears as you release
  4. Right click on the new shortcut, and select Properties
  5. The "Shortcut" tab should be displayed (if not, click on that tab)
  6. Add this text to "Target:"   /K PATH=%PATH%;C:\SDCC\BIN
       There must be a space between the end of cmd.exe and the /K, and there is a space
       between the "/K" and "PATH=%PATH%;C:\SDCC\BIN" The /K is a forward slash,
       and the slashes in the PATH part are backwards. The %PATH% and C must be
       separated by a semicolon (;). C and \SDCC\BIN are separated by a full colon (:).
  7. Optional: Set "Start in:" to the directory where you copied the mp3 player source code.
  8. Click Apply and OK to save your changes.
  9. Run the command prompt, type "PATH" and check that C:\SDCC\BIN appears in the list.

Screenshot, Successful Compile
Figure 4: Successful Compile in Windows 98 (many lines scrolled off top)

Troubleshooting The Windows Build Tools

Here is a list of errors (that you hopefully won't encounter), with an explaination and the suggested method to resolve each. Please help add to this troubleshooting list. If you run into trouble, please write down or make a screen capture of the exact error message that appears. Once a solution is found, we can add it to this list to help others in the future. It is critically important to get the exact error message.

 

 

WinCVS Software For Access To The Latest Developer Firmware

TODO: These instructions were written by Chris Brinton. I am planning to rewrite this section with screenshots of WinCVS.

4. Configure cvs and checkout the source.

CVS is required to obtain the very latest version of the source code, which is in active development. CVS is not part of the actual build process... it is a tool that communicates with the CVS server at PJRC to obtain the code in development and coordinate effort among developers.

You do not need CVS if you only want to compile the firmware source archives that are available on the website. In that case, just download and unpack the firmware code, and skip this step. But remember, to download the very latest code that is in development (not release on the web site yet), you must use CVS.

Note: cvs uses for 2401 to communicate. If you are behind a firewall, be aware of this.

[Snip, Cygwin CVS instructions removed, WinCVS is much easier for windows users]

    install wincvs v1.2 - www.wincvs.org
    a. click download, click x86 version 1.2
        typical install, default location.
    b. start wincvs
    c. under admin->preferences set:
           cvs root: :pserver:anonymous@pjrc.com:/usr/local/cvs
           authentication: passwd file on cvs server
           cvs version 1.1

    d.select admin->login,
            enter appropriate home dir
            enter nothing for the password.
            you should now be logged in.

    e.for first time checkout:
            select Create->checkout module.
            for module name, use mp3
            enter a directory where you want the module to go
            under checkout options, select Force using CVSROOT (-d)
            hit ok

This should work for a little while and populate the directory with the cvs files.

To update to the most recent set of files, select the module directory in the cvs browser and hit Modify->Update selection, then hit ok.


MP3 Player, Windows Based Firmware Build Tools, Paul Stoffregen
http://www.pjrc.com/tech/mp3/win32_setup.html
Last updated: November 28, 2003