Shop OBEX P1 Docs P2 Docs Learn Events
ImageCraft Propeller C, Alpha 1 release — Parallax Forums

ImageCraft Propeller C, Alpha 1 release

ImageCraftImageCraft Posts: 348
edited 2008-04-04 07:44 in Propeller 1
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

Comments

  • stevenmess2004stevenmess2004 Posts: 1,102
    edited 2008-03-29 20:36
    Is there any chance of it running on a Mac or under Wine? If there is I'll give it a test.
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2008-03-30 02:43
    Everything is working fine. So far so good. jumpin.gif It will be fun when we get the basic library's converted. yeah.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Aka: CosmicBob
  • Jasper_MJasper_M Posts: 222
    edited 2008-03-30 12:30
    The assembler doesn't seem to export any symbols, or am I missing something?
      ;test_asm.s
    
        .area text(rom,rel)
    
      ;    export asm_entry ;DOES NOT WORK! "ILLEGAL MNEMONIC SPECIFIED"
    asm_entry:
              or         dira, #1                                        
    asm_lp:
              xor        outa, #1
              mov        r0, #1
              shl        r0, #18          
              add        r0, cnt
              jmp         #asm_lp
    r0:          
                                      
    
    



    //Test.c
    extern void asm_entry(void);
    main()
    {
      asm_entry();
    }
    
    



    I assume the following is a linker error, not a compiler error:

    D:\Hydra\iccv7prop\bin\imakew -f TEST0.mak
        iccprop -c -e -D__ICC_VERSION="7.00" -DP8X32A  -l -g   test_asm.s
        iccprop -o TEST0 -g -ucrtprop.o -lmm:kernel.o -fhexbin -cf:TEST0.cmd @TEST0.lk  
    !E _asm_entry Symbol not defined
    
    
  • OwenSOwenS Posts: 173
    edited 2008-03-30 12:57
    Jasper_M: Try .export, .global or global. It looks like assembler directives begin with dots
  • Jasper_MJasper_M Posts: 222
    edited 2008-03-30 12:59
    OwenS said...
    Jasper_M: Try .export, .global or global. It looks like assembler directives begin with dots

    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.
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2008-03-30 13:36
    Did you see the fibo.c example?


    asm("mov DIRA,%i");
    asm("xor OUTA,DIRA");

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Aka: CosmicBob
  • Jasper_MJasper_M Posts: 222
    edited 2008-03-30 14:30
    yes, I did. But it's pretty inconvenient if you write lots of code in assembly language.
  • QuattroRS4QuattroRS4 Posts: 916
    edited 2008-03-30 16:15
    There seems to be an odd error when used in combination with an install of Prop tool v1.1 - see this thread

    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
  • ImageCraftImageCraft Posts: 348
    edited 2008-03-31 07:04
    Dang, the computer ate my post. Long answer: sorry the Help file is the AVR one (didn't have time to finish) and worst, the help link was incorrect, but you can read the help file .pdf and .html directly. They are under c:\iccv7prop\help

    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
  • ImageCraftImageCraft Posts: 348
    edited 2008-04-04 07:44
    I don't want to make an Alpha2, but working straight toward BETA. However, as mentioned, there is a codegen bug with not "seeing" variables referenced only inside asm() correctly. So for people who have downloaded Alpha1, please grab http://www.dragonsgate.net/pub/BETAS/iccomprop.exe and put that in your c:\iccv7prop\bin\ directory. For people who didn't, don't bother as this is only the compiler piece and nothing else.

    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!
Sign In or Register to comment.