Can't Wait for PropGCC on the P2?

1235»

Comments

  • I can't find propeller1.h in my install of SimpleIDE/PropGCC. I'll just replace the reference to getcnt() with CNT, and that will solve the problem in sdspi.h.
  • Dave Hein wrote: »
    I can't find propeller1.h in my install of SimpleIDE/PropGCC. I'll just replace the reference to getcnt() with CNT, and that will solve the problem in sdspi.h.
    propeller1.h is part of the more recent build of PropGCC that SimpleIDE does not use. When I say "recent" I mean one that is several years old at least. It's the version that supports P2-hot which is why there is a propeller1.h and a propeller2.h.

  • I have updated p2gcc, and attached the latest zip file here. I moved the file I/O routines to the stdio library. I also modified p2link and loadp2 so that a binary executable could be linked to a starting address other than zero. I then created a new sample program called shell.c that starts at address 0x8000 in hub RAM. This program can load binary files from an SD card and execute them. There's a script file named build_all that will build all of the sample programs. The binary files can then be copied to an SD card, which can be used by the shell program. The shell program is built and loaded by running the load_shell script file.

    I now include the fft_bench program. It runs in 54 msec with the P2 set at 60 MHz.

    I added support for spinsim to the p2gcc script file. A program can be build and run using the simulator by specifying the -s option. As an example, the hello program is run under spinsim by typing "p2gcc -s hello.c". spinsim is not included in the zipfile, and must be built separately.

    p2gcc now requires that the bin directory be added to the PATH environment variable. Alternatively, the contents of the bin directory could be copied to an existing directory that is already included in the PATH. p2gcc also requires that the environment variable P2GCC_LIBDIR be specified and set to point to the p2gcc lib directory.

    Another change I made was to enable the -c option in p2asm that makes the assembler case sensitive. This is required so that C variables such as temp and Temp can be distinguished from each other. PASM symbols, such as IF_C_OR_NZ are still handled without case sensitivity.

    I renamed s2p to s2pasm. It turns out that there is already a Linux utility named s2p.

    I renamed the dump utility to p2dump. I also added a disassembler option to p2dump. The disassembler can produce a spin2 file from a binary file that can be re-assembled back to a matching binary file. I've tested it with most of the sample programs that Chip includes with his FPGA updates.
  • You have been busy! I should give p2asm whirl. The PNut route gets a bit monotonous having to click back and forth between windows. Not to mention the recurring PNut jam-ups when I accidentally have two programs vying for the one comport due to PNut insisting on it's download after compile.
    The Prisoner's Dilemma, in english - "Selfishness beats altruism within groups. Altruistic groups beat selfish groups." - Quoted part from 2007, D.S Wilson/E.O Wilson.
  • evanh wrote: »
    ...PNut insisting on it's download after compile.
    In Pnut a Ctrl-M (List Toggle - PASM) will compile without a download.


    Melbourne, Australia
  • ozpropdev wrote: »
    In Pnut a Ctrl-M (List Toggle - PASM) will compile without a download.
    Ha, indeed it does, thanks for that.
    The Prisoner's Dilemma, in english - "Selfishness beats altruism within groups. Altruistic groups beat selfish groups." - Quoted part from 2007, D.S Wilson/E.O Wilson.
Sign In or Register to comment.