ImageCraft Propeller C, Alpha 1 release
ImageCraft
Posts: 348
From the readme. Please email me richard @imagecraft.com if you wish to test drive this puppy.
ICC V7 for Propeller (ICCProp) V7 Alpha Release 1 3/29/08
ALPHA RELEASE NOTES:
I meant to wait until the toolset is more full featured before releasing a
beta version. However, due to an upcoming business trip, it's best to
release an Alpha version now, rather than waiting.
FEATURES:
ICCProp is an ANSI C development tool for the Parallax Propeller.
Initially, only integer code is supported with 32 and 64 bits FP coming later.
The C dialect is C86, although extensions such as // comment is supported and
the C Preprocessor is fully C99 compliant.
The IDE is project based, i.e. you create a project, add .c or .s source
files to it, and click the Build icon to build the project. You can set up
the built-in Propellent downloader to download a program on successful
build,
LMM VIRTUAL MACHINE:
To bypass the 512 long words limitation of a COG RAM program, ICCProp uses
a Large Memory Model (LMM) scheme, originally proposed by Bill Henning. The
basic idea is that instructions in HUB RAM is fetched into the COG RAM, and
then executed inline.
"OBJECT EXCHANGE" and SPIN:
ICCProp will probably never be able to execute SPIN code or SPIN objects
directly (sorry). If you choose to port an existing object or write one
for ICCProp, we will give you a small amount of cash or a discount on a
license purchase. Details TBD.
THINGS NOT WORKING YET:
Currently the Help file is our AVR product's help file, but the general
method of using the IDE and the compiler tools are the same. We will
of course release full Propeller Help at production release.
When you Build a project, you will receive warnings about debug info not
generated and the .lst listing file not generated. This will be implemented
at final release.
No library is provided in this Alpha release. Later beta and production
releases will have the usual C libary functions we provide (string, memory
allocation, stdio, etc.)
// richard
ICC V7 for Propeller (ICCProp) V7 Alpha Release 1 3/29/08
ALPHA RELEASE NOTES:
I meant to wait until the toolset is more full featured before releasing a
beta version. However, due to an upcoming business trip, it's best to
release an Alpha version now, rather than waiting.
FEATURES:
ICCProp is an ANSI C development tool for the Parallax Propeller.
Initially, only integer code is supported with 32 and 64 bits FP coming later.
The C dialect is C86, although extensions such as // comment is supported and
the C Preprocessor is fully C99 compliant.
The IDE is project based, i.e. you create a project, add .c or .s source
files to it, and click the Build icon to build the project. You can set up
the built-in Propellent downloader to download a program on successful
build,
LMM VIRTUAL MACHINE:
To bypass the 512 long words limitation of a COG RAM program, ICCProp uses
a Large Memory Model (LMM) scheme, originally proposed by Bill Henning. The
basic idea is that instructions in HUB RAM is fetched into the COG RAM, and
then executed inline.
"OBJECT EXCHANGE" and SPIN:
ICCProp will probably never be able to execute SPIN code or SPIN objects
directly (sorry). If you choose to port an existing object or write one
for ICCProp, we will give you a small amount of cash or a discount on a
license purchase. Details TBD.
THINGS NOT WORKING YET:
Currently the Help file is our AVR product's help file, but the general
method of using the IDE and the compiler tools are the same. We will
of course release full Propeller Help at production release.
When you Build a project, you will receive warnings about debug info not
generated and the .lst listing file not generated. This will be implemented
at final release.
No library is provided in this Alpha release. Later beta and production
releases will have the usual C libary functions we provide (string, memory
allocation, stdio, etc.)
// richard
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Aka: CosmicBob
I assume the following is a linker error, not a compiler error:
Thanks for the reply, but those won't work either : / I get the illegal mnemonic error for those too. And it doesn't matter whether they are before or after .area directive.
asm("mov DIRA,%i");
asm("xor OUTA,DIRA");
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Aka: CosmicBob
http://forums.parallax.com/showthread.php?p=718995
not saying it is one or the other but strange nonetheless..
Can anyone else confirm ?
Regards,
John Twomey
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Necessity is the mother of invention'
Post Edited (QuattroRS4) : 3/30/2008 5:06:22 PM GMT
The short answer is, use two colons and prepend an underscore, e.g.
in C:
extern void asm_func();
in asm file:
.text ; this is important
_asm_func::
....
ret
We are also working tuning. This is good: currently, for something like
int foo(a) { if (a) a = 1; else a = 0; return a; }
The compiler generates something like
cmp R0,#0 WZ
IF_E rdlong PC,PC
.long L2
mov R0,#1
rdlong PC,PC
.long L3
L2:
mov R0,#0
Straight forward, not too embarassing, but no great shake. We are adding branch optimizations so short branches can be inlined, so this will be something like
cmp R0,#0 WZ
IF_E add PC,#12
mov R0,#1
add PC,#8
L2:
mov R0,#0
Better. Now of course we also have an ARM compiler and ARM and Propeller share a common feature that both allow conditional execution, and we can borrow the ARM codegen logic to generate
cmp R0,#0 WZ
IF_NE mov R0,#1
L2:
IF_E mov R0,#0
This is what we are aiming to do for the beta and certainly for production. There shouldn't be any problem.
Furthermore, if we add another peephole (which we may or may not, depends on how often this occurs...), the optimal code would be
cmp R0,#0 WZ
IF_NE mov R0,#1
No promise we will do this extra step, but that would be pretty cool!