Shop OBEX P1 Docs P2 Docs Learn Events
Command line help — Parallax Forums

Command line help

UnsoundcodeUnsoundcode Posts: 1,532
edited 2011-11-02 18:23 in Propeller 1
I downloaded the Windows propgcc and extracted the folder and files to the C: root , I ran the addpath batch file and created the example blink.c

"propeller-elf-gcc -o blink blink.c" is not recognized at the command prompt.

Do I need to drill down to a certain folder and where should the blink.c and propeller.h be located.

tia

Jeff T.

Comments

  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2011-11-02 16:53
    Ok made a little progress here, ran the addpath a second time and dos now sees the propeller elf command.

    Jeff T.
  • jazzedjazzed Posts: 11,803
    edited 2011-11-02 16:58
    Hi Jeff.

    I'm not sure what might have gone wrong. Let me review the instructions briefly. I did these steps with the v0_1_5 package.

    I see now that you have something working. Great!
    It's probably good to post the rest of this message anyway for others.

    Thanks.
    --Steve

    propgcc must be extracted to c:\
    Open a new command window and it looks a little like below.
    You must use "addpath" in every new window for now.
    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
    
    C:\>
    
    C:\>cd c:\propgcc
    
    C:\propgcc>addpath
    
    
    C:\propgcc>set path=c:\propgcc\usr\local\propeller\bin;c:\propgcc\bin;C:\windows\SysWOW64;C:\Program Files (x86)\Vim\vim73;C:\bstc;C:\Program Files (x86)\Java\jre6\bin;C:\qt\2010.05\bin;C:\qt\2010.05\mingw\bin;C:\Program Files\Mercurial
    
    
    C:\propgcc>copy con blink.c
    #include <propeller.h>
    
    
    int main()
    {
        int n = 0;
        DIRA  = 0xFFFF;
        while(1) {
            OUTA ^= DIRA;
            waitcnt(CLKFREQ+CNT);
        }
        return 0;
    }
    ^Z
            1 file(s) copied.
    
    C:\propgcc>propeller-elf-gcc -o blink blink.c
    
    C:\propgcc>dir
     Volume in drive C is OS
     Volume Serial Number is 6C8D-7E65
    
    
     Directory of C:\propgcc
    
    
    11/02/2011  04:44 PM    <DIR>          .
    11/02/2011  04:44 PM    <DIR>          ..
    11/02/2011  04:43 PM                66 addpath.bat
    11/02/2011  04:43 PM    <DIR>          bin
    11/02/2011  04:44 PM             6,722 blink
    11/02/2011  04:44 PM               173 blink.c
    11/02/2011  04:43 PM    <DIR>          demos
    11/02/2011  04:43 PM               881 INSTALL.txt
    11/02/2011  04:43 PM             2,678 README_WINDOWS.txt
    11/02/2011  04:43 PM    <DIR>          usr
                   5 File(s)         10,520 bytes
                   5 Dir(s)  1,321,435,869,184 bytes free
    
    C:\propgcc>propeller-load -r blink -p com24
    Propeller Version 1 on com24
    Writing 2408 bytes to Propeller RAM.
    Verifying ... Upload OK!
    
    
    C:\propgcc>
    
    
    
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2011-11-02 17:08
    Thanks for the reply , something so simple was really frustrating me. I have moved along further I now have blinking lights from a c program, this is so cool.

    As a note I created the c file in a C++ IDE, can the examples be created with a regular text editor with the .c extension.

    Jeff T.
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2011-11-02 18:23
    > As a note I created the c file in a C++ IDE, can the examples be created with a regular text editor with the .c extension.

    Most decent text editors will let you configure "external tools" that will let you send your file to a compiler. There are quite a few available, but you can get Notepad++, Programmer's Notepad, PSPad for free on Windows. There's also Jedit and Komodo Edit, which are cross-platform.
Sign In or Register to comment.