Shop OBEX P1 Docs P2 Docs Learn Events
Propeller Memory Card - SimpleIDE, GCC? — Parallax Forums

Propeller Memory Card - SimpleIDE, GCC?

idbruceidbruce Posts: 6,197
edited 2015-02-25 09:05 in Propeller 1
I am was very surprised to find very little information about the Propeller Memory Card being used with SimpleIDE and GCC. Are they incompatible?

http://forums.parallax.com/showthread.php/150469-Some-questions-regarding-the-Propeller-memory-card-by-Parallax

Will my Propeller based 3D printer controller be able to use the Propeller Memory Card if I use SimpleIDE and PropGCC?

Comments

  • David BetzDavid Betz Posts: 14,516
    edited 2015-02-24 17:06
    idbruce wrote: »
    I am was very surprised to find very little information about the Propeller Memory Card being used with SimpleIDE and GCC. Are they incompatible?

    http://forums.parallax.com/showthread.php/150469-Some-questions-regarding-the-Propeller-memory-card-by-Parallax

    Will my Propeller based 3D printer controller be able to use the Propeller Memory Card if I use SimpleIDE and PropGCC?
    I wrote an XMM driver for the PMC a while back but it wasn't always reliable. My development platform was a QuickStart + HIB + PMC. The driver is still available but it may only be in the default branch of the propgcc repository not in the version of propgcc that gets delivered with SimpleIDE. I can dust it off if you're interested. What did you want to use PMC for? Do you want to use it as expanded C code and data space or do you just want a library that will read/write data from the various memory chips directly?
  • idbruceidbruce Posts: 6,197
    edited 2015-02-24 17:22
    David

    Thanks for responding.
    What did you want to use PMC for? Do you want to use it as expanded C code and data space or do you just want a library that will read/write data from the various memory chips directly?

    I purchased the PMC, with the hope that I would have a wide variety of options. At the moment, I am not exactly certain what my needs are, except that I will definitely need functionality from this board. The only thing that I know for sure, is that the SD card will be holding GCODE data, which I will be parsing, for machine operation.

    EDIT: I also know that my Teacup port is a none starter without PMC support.
  • David BetzDavid Betz Posts: 14,516
    edited 2015-02-24 17:32
    Check SimpleIDE's board menu to see if "pmc" is listed. That's the board configuration for the Propeller Memory Card. However, I think by default it is setup assuming you're using the Human Interface Board or at least the same pin assignments as the HIB uses. I've never understood why Parallax didn't make a memory card that would plug directly into the QuickStart board without requiring the HIB in between.
  • idbruceidbruce Posts: 6,197
    edited 2015-02-24 17:47
    David

    I do not see PMC in the board type list. I don't know if you read anything about the controller, but it is constructed from a Propeller Proto Board and has the following pin assignments.
     'Propeller Memory Card Pin Assignments
      DI                  = 8 'IO0 / DI / MOSI / CD Pin
      DO                  = 9 'IO1 / DO / MISO Pin
      WP                  = 10 'IO2 / WP Pin
      HOLD                = 11 'IO3 / HOLD Pin
      SD_CS               = 12 'CS Pin For MicroSD Card Memory
      FLASH_CS            = 13 'CS Pin For Flash Memory
      SRAM_CS             = 14 'CS Pin For SRAM Memory
      CLK                 = 15 'CLK Pin
    
  • David BetzDavid Betz Posts: 14,516
    edited 2015-02-24 17:53
    This is the configuration file I created for the PMC:
    # pmc.cfg
    # for the QuickStart board with a Human Interface Board and a Propeller Memory Card
    
    clkfreq: 80000000
    clkmode: XTAL1+PLL16X
    baudrate: 115200
    rxpin: 31
    txpin: 30
    
    sd-driver: sd_driver.dat
    sdspi-do: 0
    sdspi-clk: 7
    sdspi-di: 1
    sdspi-cs: 4
    
    # cache geometry - 128 * 64 = 8192 byte cache
    index-width: 7      # 2^7 = 128 cache lines
    offset-width: 6     # 2^6 = 64 byte cache lines
    cache-geometry: ({index-width} << 8) | {offset-width}
    
    xmem-driver: winbond_sqi_flash_sram_xmem.dat
    xmem-param1: (0 << 24) | (7 << 16) | (5 << 8) | 6
    xmem-param2: (4 << 24) | 1
    
    [flash]
    xmem-driver: winbond_sqi_flash_xmem.dat
    xmem-param1: (0 << 24) | (7 << 8) | 0x01
    xmem-param2: 5 << 24
    
    [sram]
    xmem-driver: sqi_sram_xmem.dat
    xmem-param1: (0 << 24) | (7 << 8) | 0x01
    xmem-param2: 6 << 24
    
    However, this is for the drivers that are part of the default branch of propgcc. It doesn't look like the pin assignments match yours so you would have to edit this file to work with your board.
  • idbruceidbruce Posts: 6,197
    edited 2015-02-24 18:15
    Thanks David

    Not really sure what I am looking at, but I think I may be able to figure it out.
    However, this is for the drivers that are part of the default branch of propgcc.

    When you say "default branch of propgcc", what is it and where can I find it?
  • idbruceidbruce Posts: 6,197
    edited 2015-02-24 18:35
    I did find this informative:

    C:\Program Files\SimpleIDE\propeller-gcc\propeller-elf\include\sys\sd.h
  • David BetzDavid Betz Posts: 14,516
    edited 2015-02-24 19:11
    The "default branch" is what you get by default if you clone this repository:

    https://code.google.com/p/propgcc/source/checkout

    However, you currently have to build it yourself. :-(
  • idbruceidbruce Posts: 6,197
    edited 2015-02-24 19:31
    David, thanks for all the info.

    I see that propgcc supports spin2cpp and I now wonder whether the SPI Memory Driver from the PMC sample can be converted. The SPI Memory Driver contains PASM. Will the PASM also convert?
  • David BetzDavid Betz Posts: 14,516
    edited 2015-02-25 05:29
    It won't convert the PASM to C. It will just use it as-is but yes, it should work.
  • idbruceidbruce Posts: 6,197
    edited 2015-02-25 05:59
    Once again, thanks for all your responses David.
    It won't convert the PASM to C. It will just use it as-is but yes, it should work.

    Hmmmm... Hopefully it will.

    I must admit that I am surprised, that Parallax has not supplied a c driver for the PMC.
  • David BetzDavid Betz Posts: 14,516
    edited 2015-02-25 06:56
    If all you're interested in is access to the SD card then you can use the standard SD card driver that is part of propgcc. You just need to create your own .cfg file with the SD pins to set correctly for your board setup. Using the flash and SRAM are a different story unless you want to use my XMM driver.
  • idbruceidbruce Posts: 6,197
    edited 2015-02-25 07:53
    David
    If all you're interested in is access to the SD card then you can use the standard SD card driver that is part of propgcc. You just need to create your own .cfg file with the SD pins to set correctly for your board setup. Using the flash and SRAM are a different story unless you want to use my XMM driver.
    I purchased the PMC, with the hope that I would have a wide variety of options. At the moment, I am not exactly certain what my needs are, except that I will definitely need functionality from this board.

    I meant to say - except that I will definitely need -full- functionality from this board.
  • David BetzDavid Betz Posts: 14,516
    edited 2015-02-25 08:38
    idbruce wrote: »
    David





    I meant to say - except that I will definitely need -full- functionality from this board.
    Understood. There should be a C library for this in addition to the XMM driver.
  • dgatelydgately Posts: 1,630
    edited 2015-02-25 08:49
    Let us know if spin2cpp can convert SPI Memory Driver to C (well, C and either a dat file or .S file for the PASM section) for you... I got a syntax error at line 120 of this file and am not quite sure why. Something to do with a line of code that contains something like: varName.byte[n]. SPI Memory Driver.spin may need some editing.


    dgately
  • David BetzDavid Betz Posts: 14,516
    edited 2015-02-25 08:58
    If we were to provide a C library for use with the PMC, what functions should it have? Access to the SD card should already be possible with the standard SD driver in propgcc. Should the library just provide simple read/write functions for the SRAM and flash? Anything else needed?
  • idbruceidbruce Posts: 6,197
    edited 2015-02-25 09:05
    @dgately

    Not sure how soon I will get to that, but I will let you know.

    @David

    Yea, I am sure I could get the SD card to work, but as for the SRAM and flash, I would assume that read and write functions would be sufficient. I really don't know what is all possible with the PMC and the different memory types.
Sign In or Register to comment.