Shop OBEX P1 Docs P2 Docs Learn Events
Windows v0_1_7 Now Available — Parallax Forums

Windows v0_1_7 Now Available

jazzedjazzed Posts: 11,803
edited 2011-11-03 19:14 in Propeller 1
Please see: http://code.google.com/p/propgcc/downloads/list

Windows PropGCC Distribution File - v0_1_7 (test only)
  1. This package is 43MB and contains fixes for the "grep and .dll" problem.
  2. The propeller-load program now prints a banner for the terminal program like:[ Entering terminal mode. Type ESC or Control-C to exit. ]
  3. This includes updates to loader and board types.
  4. This includes c3files filetest for SD card.
  5. This includes propeller.h which has common propeller functions.
Thanks to RonP for helping us all remember the "mode" command!


Dave Hein's c3files work is demonstrated here in LMM mode.
C:\>cd propgcc


C:\propgcc>echo %PATH%
c:\propgcc\usr\local\propeller\bin;c:\propgcc\bin;C:\windows\SysWOW64;C:\Program Files (x86)\Vim\vim
73;C:\bstc;C:\Program Files (x86)\Java\jre6\bin;C:\qt\2010.05\bin;C:\qt\2010.05\mingw\bin;c:\WinAVR-
20100110\utils\bin;c:\WinAVR-20100110\bin;C:\Microchip Starter Kits\PIC32 Starter Kits\MPLAB C32 Sui
te\bin;C:\Microchip Starter Kits\PIC32 Starter Kits\MPLAB IDE\VDI;C:\Program Files\Mercurial


C:\propgcc>cd demos


C:\propgcc\demos>cd c3files


C:\propgcc\demos\c3files>cd lmm


C:\propgcc\demos\c3files\lmm>make
filetest.o
dfs.o
dosfs.o
c3_cache.o
printf.o
c3files.elf


C:\propgcc\demos\c3files\lmm>mode


Status for device COM21:
------------------------
    Baud:            115200
    Parity:          None
    Data Bits:       8
    Stop Bits:       1
    Timeout:         OFF
    XON/XOFF:        OFF
    CTS handshaking: OFF
    DSR handshaking: OFF
    DSR sensitivity: OFF
    DTR circuit:     ON
    RTS circuit:     OFF




Status for device CON:
----------------------
    Lines:          9999
    Columns:        100
    Keyboard rate:  31
    Keyboard delay: 1
    Code page:      437




C:\propgcc\demos\c3files\lmm>propeller-load -r -t c3files.elf -p com21
Propeller Version 1 on com21
Writing 27816 bytes to Propeller RAM.
Verifying ... Upload OK!
[ Entering terminal mode. Type ESC or Control-C to exit. ]


Available commands are help, cat, rm, ls and echo


> ls
HELLO


> cat HELLO
echo "Hello World"


> echo "Hi there!"
"Hi there!"


>

C:\propgcc\demos\c3files\lmm>


The propeller.h header is now included in the package. Contents are:
c:\propgcc>more usr\local\propeller\propeller-elf\include\propeller.h
/**
 * @file propeller.h
 * This is part of the propeller library. ... this is a work in progress.
 *
 * Copyright (c) 2011 by Parallax, Inc.
 * MIT Licensed
 */


#ifndef _PROPELLER_H_
#define _PROPELLER_H_


#ifdef __cplusplus
extern "C"
{
#endif


#include "cog.h"
#include <stdint.h>


/* some defines for special purpose COG registers */
#define PAR     _PAR
#define CNT     _CNT
#define INA     _INA
#define INB     _INB
#define OUTA    _OUTA
#define OUTB    _OUTB
#define DIRA    _DIRA
#define DIRB    _DIRB
#define CTRA    _CTRA
#define CTRB    _CTRB
#define FRQA    _FRQA
#define FRQB    _FRQB
#define PHSA    _PHSA
#define PHSB    _PHSB
#define VCFG    _VCFG
#define VSCL    _VSCL


/* clock frequency define */
#define CLKFREQ _CLKFREQ


/* set CLKMODE */
#define CLKMODE(mode) (*((unsigned char*) 4) = (mode))


/**
 * start a cog with a parameter
 * the fields in parameter are:
 * 31:18   = 14-bit Long address for PAR Register
 * 17:4    = 14-bit Long address of code to load
 * 3       = New bit
 * 2:0     = Cog ID if New bit is 0
 * @param a - parameter value
 */
#define coginit(id, code, param) __builtin_propeller_coginit( \
                                 (((uint32_t)(param) << 16) & 0xfffc0000) \
                                 |(((uint32_t)(code) <<  2) & 0x0003fff0) \
                                 |(((id)                  ) & 0x0000000f) )


/**
 * start a new propeller cog
 * @param code - address of PASM to load
 * @param par  - value of par parameter usually an address
 * @returns COG ID provided by the builtin function.
 */
#define cognew(code, param) coginit(0x8, (code), (param))


/**
 * stop a cog
 * @param a - cog value
 */
#define cogstop(a) __builtin_propeller_cogstop((a))


/**
 * get a new lock
 * @returns new lockid
 */
#define locknew() __builtin_propeller_locknew()


/**
 * return lock to pool
 * @param lockid
 */
#define lockret(lockid) __builtin_propeller_lockret((lockid))


/**
 * set a lock
 * @param lockid
 * @returns true on success
 */
#define lockset(lockid) __builtin_propeller_lockset((lockid))


/**
 * clear lock
 * @param lockid
 */
#define lockclr(lockid) __builtin_propeller_lockclr((lockid))


/*
 * wait until system counter reaches a value
 * @param a - target value
 */
#define waitcnt(a) __builtin_propeller_waitcnt((a),_CNT)


/*
 * wait until system counter reaches a value
 * @param a - target value
 * @param b - adjust value
 */
#define waitcnt2(a,b) __builtin_propeller_waitcnt((a),(b))


/**
 * wait until INA equal state & mask
 * @param state - target value
 * @param mask - ignore masked 0 bits in state
 */
#define waitpeq(state, mask) __builtin_propeller_waitpeq((state), (mask))


/**
 * wait until INA not equal state & mask
 * @param state - target value
 * @param mask - ignore masked 0 bits in state
 */
#define waitpne(state, mask) __builtin_propeller_waitpne((state), (mask))


/**
 * wait for video generator to accept pixel info
 *
 * @param colors - a long containing four byte-sized color values, each describing the four possible
 colors of the pixel patterns in Pixels.
 * @param pixels - the next 16-pixel by 2-bit (or 32-pixel by 1-bit) pixel pattern to display.
 */
#define waitvid(colors, pixels) __builtin_propeller_waitvid((colors), (pixels))


#ifdef __cplusplus
}
#endif


#endif
// _PROPELLER_H_


c:\propgcc>
Sign In or Register to comment.