Shop OBEX P1 Docs P2 Docs Learn Events
PropForth 4.5 Available for download — Parallax Forums

PropForth 4.5 Available for download

prof_brainoprof_braino Posts: 4,313
edited 2011-07-26 08:07 in Propeller 1
Please NOTE: Version 4.5 is no longer the current release

PropForth 4.6 is now the current release, please continue conversations to this thread:

http://forums.parallax.com/showthread.php?133312-PropForth4.6-is-available-for-download

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

PropForth 4.5 is available for download
http://code.google.com/p/propforth/downloads/list

Questions, Answer, Information, and propganda
http://code.google.com/p/propforth/wiki/Propforth45FAQ Propforth4.5 FAQ

Includes support for
Spinneret - Telnet, HTTP, NTP
SD - Secure Digital cards
RTC - Realtime Clock
MultiChannel High Speed Synchronous Serial communication
Multiple Prop configurations

Also includes Documentation/Tutorial/Regression Test improvements

Note: The full Development Kernel has gotten quite large. Next release (5.x) is to include major optimizations for speed and size.
Note: Previous versions are still available but have been marked Deprecated, and so shouldn't show up unless you look for them.

Thanks to caskaz for starting the SD support and testing
Thanks to Brian Riley for debugging work on the EEPROM file system support

For more Forth Application for the Propeller, the Forth Interest Group Thread
http://forums.parallax.com/showthread.php?131047-Propeller-Forth-Interest-Group
«13

Comments

  • SSteveSSteve Posts: 808
    edited 2011-06-16 13:19
    Great timing. My Spinneret just showed up yesterday. Yet another reason to delve into PropForth. Now, if I could just find some time…
  • mindrobotsmindrobots Posts: 6,506
    edited 2011-06-16 13:54
    Excellent!

    Thank you, Team propforth!!

    I just loaded it on my QuickStart (32k EEPROM) and it works like a champ.

    Later tonight, I'll load it up on my Spinneret and start playing with that.

    I've been playing with propforth for the past couple of days, relearning forth (and having a GREAT time!)

    I took the liberty of rewriting your example code for blinking an LED ("HelloWorld' for the embedded set)
    \ propforth starts with the number base set to hex
    \ to change to decimal, simply type in the forth word 'decimal' and press enter
    \
    \ exmaple word to flash pin 16 w/ 200ms per flash 
    \
    decimal  \ switch number base to decimal
    : FLASHES  \ ( flashes - )
    16 pinout  \ (set pin 16 to output
    0 do   \ flashes to 0 do ...
    16 pinhi  \ pin16 LED ON
    100 delms  \ ( delay for 100 ms)
    16 pinlo  \ pin 16 LED OFF
    100 delms \ delay again
    loop ;  \ close loop - this will loop flashes # of times
    

    If anybody wants to try some forth, just cut the above and paste it into your terminal window and propforth shoudl compile the new word FLASHES.

    To use it, just type in a number for the flash count and teh word FLASHES and press enter. example:

    10 FLASHES

    will cause an LED on pin 16 to flash 10 times.

    This should work on any prop board with an LED on pin 16. If you have an LED on a different pin, just change the 16 to that pin # before you paste it into the terminal window.

    I'm off to play........

    Rick
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-06-16 16:49
    I almost forgot!

    Also check out caskaz's port of the Quickstart Button Demo to Forth.

    This is separate file from the kernel zip archive. Loading the file into the terminal session window loaded the code into the dictionary, and writes the new dictionary to EEPROM. On boot or powerup, the button demo runs on one cog, and the Forth prompt runs on another.

    FORTH and LED Buttons off your laptop USB!
  • caskazcaskaz Posts: 957
    edited 2011-06-17 08:21
    Hi prof_braino.

    I'm testing V4.5 by using test_document on protoboard

    I tested test-2.1.1 SD.txt.
    I did copy/paste sd_driver.f and sdfs.f to TeraTerm.
    And executed saveforth.

    After reboot, message are below;
    CON:Prop0 Cog0 RESET - last status: 0 ok
    
    
    
    CON:Prop0 Cog1 RESET - last status: 0 ok
    
    
    
    CON:Prop0 Cog2 RESET - last status: 0 ok
    
    
    
    CON:Prop0 Cog3 RESET - last status: 0 ok
    
    
    
    CON:Prop0 Cog4 RESET - last status: 0 ok
    
    
    
    CON:Prop0 PROP REBOOT PropForth v4.5 2011MAY30 15:15 1
    
    
    
    CON:Prop0 Cog5 RESET - last status: 0 ok
    
    
    
    
    
    CON:Prop0 Cog6 RESET - last status: 166 UNKNOWN ERROR
    
    
    
    Prop0 Cog6 RESET - last status: 166 UNKNOWN ERROR
    
    Prop0 Cog6 ok
    
    

    I don't know error code"166".
    If not save sdfs.f, reboot-message is OK.
    I think sdfs.f is ok on protoboard.
    My idea is wrong?


    And I tryed _sd_init. (inserted SD-card and no SD-card)
    message:
    CON:Prop0 Cog6 RESET - last status: 166 UNKNOWN ERROR
    
    Prop0 Cog6 RESET - last status: 166 UNKNOWN ERROR
    Prop0 Cog6 ok
    
  • mindrobotsmindrobots Posts: 6,506
    edited 2011-06-17 10:23
    caskaz,

    I got this error the first time I loaded sd_driver.f and sdfs.f onto my Gangster Gadget Propeller Platform....then I realized the 4.5 release is targeted for the Spinneret and uses its I/O pins. Once I changed the I/O pins in the sd_driver.f file (see below), it all worked.

    from sd_driver.f:
    \ definitions for io pins connecting to the sd card
    \ below pin defs for Spinneret
    13 wconstant _sd_cs  \ Prop Pin #19
    14 wconstant _sd_di  \ Prop Pin #20
    15 wconstant _sd_clk \ Prop Pin #21
    10 wconstant _sd_do  \ Prop Pin #16
    \
    \below pin defs for GG Propeller Platform USB
    \ 3 wconstant _sd_cs
    \ 2 wconstant _sd_di
    \ 1 wconstant _sd_clk
    \ 0 wconstant _sd_do
    

    Hope this helps!

    Rick
  • mindrobotsmindrobots Posts: 6,506
    edited 2011-06-17 13:39
    Hello Forth Friends,

    I'm not sure if this is a bug or just the nature of the beast. In playing around with my loading, unloading and forgetting of sd_driver.f and sdfs.f, I noticed the follwing in the memory usage.
    [B]After RESET:[/B]
      Prop0 Cog6 RESET - last status: 0 ok
      Prop0 Cog6 ok
      free
      15048 bytes free - 161 cog longs free
      Prop0 Cog6 ok
    [B]After fsload sd_driver.f (from EEPROM):[/B]
      Prop0 Cog6 ok
      free
      12544 bytes free - 161 cog longs free
      Prop0 Cog6 ok
    [B]After fsload sdfs.f (from EEPROM)[/B]
      Prop0 Cog6 ok
      free
      8446 bytes free - 161 cog longs free
      Prop0 Cog6 ok
      decimal
      [ifndef mountsys : mountsys 0000000001 sd_mount ; ]
      \ mountusr ( -- ) mount the user disk
      [ifndef mountusr : mountusr 65538 sd_mount ; ]
      mountsys
      Prop0 Cog6 ok
      free
      8404 bytes free - 4 cog longs free
      Prop0 Cog6 ok
     
    [B]then:[/B]
      fsload unload_sd.f  \ it would nice to be able to "unmount" in unload_sd.f to free up the COG space
      forget build_sddriver
      Prop0 Cog0 ok
      Prop0 Cog6 ok
      free
      15048 bytes free - 4 cog longs free
      Prop0 Cog6 ok
    

    sd_driver.f uses dictionary space but nothing from the COG
    sdfs.f uses dictionary space and nothing from the COG

    the sd_mount causes the COG longs to be used up. I don't expect the forget to free up the COG memory but shouldn't there be an sd_unmount to free up the resources consumed by sd_mount if you are unloading the SD resources or even if you are just not going to be using the SD anymore.

    Thanks,

    Rick
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-06-17 15:04
    mindrobots wrote: »
    shouldn't there be an sd_unmount to free up the (COG) resources

    Issue 26 is open for this

    http://code.google.com/p/propforth/issues/detail?id=26
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-06-17 15:26
    caskaz wrote: »
    I tested test-2.1.1 SD.txt.
    I did copy/paste sd_driver.f and sdfs.f to TeraTerm. And executed saveforth. After reboot,
    CON:Prop0 Cog6 RESET - last status: 166 UNKNOWN ERROR

    I didn't start on documenting the error codes yet, but Sal says usually the error means problem with the file system.
    In my case, I did the pins wrong, and left off the 10k pullup resistor.

    Assuming you changed your pins to match the spinneret configuration as described by mind robots,
    please check that POWER is applied to the 10k pull up resistors on the SD pins. I discovered that the pull-ups don't pull up if they don't have power.

    Once the hardware is correct, loading sd_driver.f and sdfs.f, saveforth, reboot should give
    fload .autoboot.f 
    FILE NOT FOUND
    

    until the next step when you run sd_scripts.f; sd_scripts.f creates and populates the auto boot file.

    after that, reboot should cause lots of text to scroll down the display as the autoboot runs.
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-06-17 15:43
    Great work guys :)
  • caskazcaskaz Posts: 957
    edited 2011-06-17 16:48
    Hi prof_braino.

    I tested by using sd_loader_3.0.f.
    SD's connection is below;
    13 wconstant _sd_cs \ Prop Pin #19
    14 wconstant _sd_di \ Prop Pin #20
    15 wconstant _sd_clk \ Prop Pin #21
    10 wconstant _sd_do \ Prop Pin #16
    Prop0 Cog6 ok
    sd_init
    SDSC initialize success
    
    Prop0 Cog6 ok
    
    SD's connection is ok.

    After reboot, I tested _sd_init. Not yet install sdfs.f.
    Prop0 Cog6 ok
    _sd_init
    
    CON:Prop0 Cog6 RESET - last status: 166 UNKNOWN ERROR
    
    
    Prop0 Cog6 RESET - last status: 166 UNKNOWN ERROR
    
    Prop0 Cog6 ok
    


    Again I re-try .
    Loading PropFortghKernel.spin to protoboard's eeprom.
    Loading sd_driver. to TeraTerm.
    Prop0 Cog6 ok
    _sd_init
    
    CON:Prop0 Cog6 RESET - last status: 166 UNKNOWN ERROR
    
    
    Prop0 Cog6 RESET - last status: 166 UNKNOWN ERROR
    
    Prop0 Cog6 ok
    
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-06-17 17:58
    Hmm. One thing that may be relevant, the Forth BLOCKS initialization and FAT format do NOT immediately affect each other. Formatting to FAT does not kill the propforth initialization, and propforth intialization does not ruin the FAT formatting. Not till one tries to use space occupied by the other will they notice each other. Dangerous, so we say the Spinneret SD card is now "FORTH ONLY".

    Than is, my Zipit's spare SD card (formated to FAT containing a linux distro for the zipit) became my Spineret Propforth card. After initialization by sd_scripts.f, the PC still had no issues reading the linux distro on the card and the contents of files. I didn't like this , so I formatted it a bunch of different ways. None of them affected the Forth initialization, the autoboot script would always run. Finally, I found a manufacture's format utility that whacked the SD hard enough so that after rebooting, the spinneret did not read the SD, but gave an error, possibly similar to yours (it was late and I was confused and did not take notes due to panic).

    At this point, I was stuck. Sal pointed out that the instructions say "Hold down ESC after Reboot to prevent running autoboot". Doing so allowed me to re-run the sd_scripts.f, which reinitialized the card.

    So, try holding the ESC key after reboot (on spinneret with sd_driver.f and sdfl.f save'd to EEPROM) then paste in the sd_scripts.f. This is what I did to get my card working again.

    Holding down the ESC after reboot, and running sd_scripts.f again is what fixed my problem, and allowed me run the SD initialization test a second time, mostly as written.

    If that doesn't work, please send the type of card, etc.

    Can you try another card? Can you get other to work?
  • caskazcaskaz Posts: 957
    edited 2011-06-17 18:52
    Hi prof_braino.

    My all SD card is same error.
    maker volume size
    pqi 256MB SDSC microSD
    A-DATA 512MB SDSC microSD
    Kingston 2GB SDSC
    Transcend 2GB SDSC microSD
    SiliconPower 4GB SDHC
    Transcend 16GB SDHC

    Error code "166" is "A6" from WORD"_sd_init" oinside sd_driver.f.
    166 means time-out.
    I think this part is modified by Sal .
    I need to read WORD"_sd_cmdr8" more.
  • mindrobotsmindrobots Posts: 6,506
    edited 2011-06-17 19:07
    caskaz,

    I was looking up the error while you were, probably.

    The 166 error (A6) just says "card did not respond" - this didn't wound very helpful and the code is beyond me at this time. It does come out of the sd_driver.f file _sd_init - I don't know if turning on the debug code would help or not. At this point, I'm working on theory and no practical knowledge.


    I did see this error at some point today - before I changed the pins for sure but I'm not sure if I saw it afterwards once, also.
  • caskazcaskaz Posts: 957
    edited 2011-06-17 21:17
    Hi.

    I try to initialize SD-card on PF4.5.
    I think it takeas much time because codes are complex.
    I cannot go ahead until this problem is solved.

    If you want to enter to debug-mode;
    wvariable _sd_debug
    1 _sd_debug W!
    Loading sd_driver

    Sorry, there is line to debug-mode in sd_driver.f.
    Please comment out line124.in sd_driver.f.
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-06-18 07:51
    caskaz wrote: »
    My all SD card is same error.

    I have the many of the same parts, 1G, 2G, 4G, and 8G. All work on my rig. Sal has a similar assortment, and the ones which gave him a problem were due to marginal timing, which he fixed. Your parts should be fine(!)

    We should compare circuits, my gut feeling is that the hardware instructions gave you an error in construction. I will try to make a drawing and post it later today.
  • nglordinglordi Posts: 114
    edited 2011-06-18 08:46
    Prof _Braino: 4.5 is an excellent upgrade. I have used a 4G scandisk card without any problems.

    I note that the sd driver includes assembler spi routines. I would like to factor these out to make a more general spi word set for use with other devices. However, it is not clear to me how the assembler works. I note that the actual assembler words are commented out. Also I would like to know how those addresses for assembler routines and constant values for the necessary variables were obtained. Doesn't asm.f have to be loaded in order to use these words?

    I would appeciate a description of how to add assembler code to an application.

    Nick Lordi
  • caskazcaskaz Posts: 957
    edited 2011-06-18 16:43
    Hi nglordi.

    I made 2-wire_LCD.f using assembler.
    It is simple assembler-code.
    Please #125 to #132 below;
    http://forums.parallax.com/showthread.php?128055-Propforth4.0a-available-for-download/page7

    Afer loading asm.f, copy/paste assembler-code to TeraTerm.
    Prop output machin-code.
    pasting codes to 2-wire_LCD.f's source code.
    [This curcuit need to add resistor between LCD and TC4040's out-port(Q1 -Q2), because LCD's port(D0-D7 and RS) is pullup to 5V by LCD's internal FET. Although generally ok, adding resistors is best.]
  • caskazcaskaz Posts: 957
    edited 2011-06-18 16:56
    Hi prof_braino.

    I attache my SD-card adapter's curcuit and SD-cards(There SD-cards cannot use on sd_driver.f).
    (Trouble reason: sd_driver not send acceptable cmd0 to SD or sd_driver not accept reply from SD)
    My sd_loader's sd_init oeprate finely.
    My SD-cards is special? Or curcuit is special?

    I use 10cm wires between protoboard and SD-card I/F.
    Pull-up resister and capacitor is connected at near SD-card adapter.

    (Fitted CS/DI/CLK/DO to sd_driver.f's setting port)
    1024 x 726 - 49K
    1024 x 768 - 87K
    1024 x 768 - 96K
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-06-18 20:16
    You config is different from what I have. Please see
    http://code.google.com/p/propforth/wiki/PropToSDconnection

    Now uses spinneret pinout

    Under blue tape is 10k resistor pack.
    No pull up on p21
    I have no capacitor, probably my mistake but it still work on all my cards

    DAT1 -> P17?
    DAT2 -> P18?

    I think this is the difference. Please give these connections a try. Maybe it is SD mode instead of SPI mode?
    1024 x 768 - 90K
    1024 x 1365 - 90K
    1024 x 1365 - 129K
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-06-18 21:06
    nglordi wrote: »
    Prof _Braino: 4.5 is an excellent upgrade.
    1) .... factor these out to make a more general spi word set for use with other devices.
    2) ...it is not clear to me how the assembler works.
    3) actual assembler words are commented out.
    4) how those addresses for assembler routines and constant values for the necessary variables were obtained.
    5) Doesn't asm.f have to be loaded in order to use these words?
    6) I would appeciate a description of how to add assembler code to an application.

    Thanks Nick!

    1) Good idea, maybe you should coordinate directly with Sal. He's already started assembler optimizations (for v5.x). Sal says the assembler stuff is "pretty easy", personally I still haven't used it yet. Makes me dizzy trrying to get my head around it. This is my weak understanding of the process:
    2) The forth version of the word is compiled into the dictionary. Sal looks at the interpreted code in the dictionary (in assembly), pares out the interpreter overhead until just the function remains, gets this as a list of byte values, and builds these as a list of longs. These are written directly into cog memory as load time. logicAnalyzer.f is an example of this.
    3) when there is a choice of the forth verion and an optimized assembler version, the user can choose the assembler version by moving the comments. This is to allow us to compare the forth to the assembler. This is for this version only, I think. In V5 (mostly) everything will be optimized in assembler, and the forth code will be provided separately for reference in case furtherr development is needed.
    4) I believe its a two step process: First, make it work in forth, and note the constants and variables. Second, strip out the overrhead and keep just an assembler routine that is the optimized function, and adjust the constants and variables in this process. But this is all voodoo at this point, noone has asked yet, so we didn't start the documentation. Only caskaz has figured it out.
    5) asm.f does not have to be loaded to use the words; asm.f only has to be loaded to make the words out of forth code. I THINK.
    6) If you would be kind enough to help, I would like to start making such documentation, perhaps a tutorial. I will discuss this on tomorrow's call.
  • caskazcaskaz Posts: 957
    edited 2011-06-18 22:18
    Hi prof_braino.

    SPI don't use DAT1 and DAT2.
    Maybe no capacitor is generally ok if distance is short.

    I checked _sd_shift_out's outdata. They are correct bits.
    But _sd_shift_in's receiving data is FF.
    Connection pin should be correct beacuse sd_loader's sd_init works fine.
  • caskazcaskaz Posts: 957
    edited 2011-06-19 05:03
    Hi.

    Sorry, I'm confused.
    I loaded PropForthKernel.spin to eeprom again.
    After setting sd_driver to debug-mode, loading it. Next copy/paste sdfs.f. And I did saveforth.

    Inserting each SD-card, power-on-reset;
    ==========================================================================
    
    pqi 256MB microSD
    
    
    CON:Prop0 Cog0 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog1 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog2 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog3 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog4 RESET - last status: 0 ok
    
    
    CON:Prop0 PROP REBOOT PropForth v4.5 2011MAY31 17:30 1
    
    
    CON:Prop0 Cog5 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog6 RESET - last status: 167 UNKNOWN ERROR  <---- error code A6 in _sd_init
    
    
    Prop0 Cog6 RESET - last status: 167 UNKNOWN ERROR  <---- error code A6 in _sd_init
    
    
    Prop0 Cog6 ok
    
    
    ==========================================================================
    
    A-DATA 512MB SDSC miniSD
    
    CON:Prop0 Cog0 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog1 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog2 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog3 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog4 RESET - last status: 0 ok
    
    
    CON:Prop0 PROP REBOOT PropForth v4.5 2011MAY31 17:30 1
    
    
    CON:Prop0 Cog5 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog6 RESET - last status: 167 UNKNOWN ERROR  <---- error code A6 in _sd_init
    
    
    Prop0 Cog6 RESET - last status: 167 UNKNOWN ERROR  <---- error code A6 in _sd_init
    
    
    Prop0 Cog6 ok
    
    
    =============================================================================
    
    Kingston 2GB SDSC
    
    
    CON:Prop0 Cog0 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog1 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog2 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog3 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog4 RESET - last status: 0 ok
    
    
    CON:Prop0 PROP REBOOT PropForth v4.5 2011MAY31 17:30 1
    
    
    CON:Prop0 Cog5 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog6 RESET - last status: 172 UNKNOWN ERROR  <---- error code AC in _sd_blockread
    
    
      ---- It takes 26seconds ----
    
    
    CON:Prop0 Cog0 RESET - last status: 7 LOCK TIMEOUT
    
    
    Prop0 Cog0 RESET - last status: 7 LOCK TIMEOUT
    
    
    Prop0 Cog0 ok
    
    
    =============================================================================-
    
    Transcend 2GB SDSC microSD
    
    
    CON:Prop0 Cog0 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog1 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog2 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog3 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog4 RESET - last status: 0 ok
    
    
    CON:Prop0 PROP REBOOT PropForth v4.5 2011MAY31 17:30 1
    
    
    CON:Prop0 Cog5 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog6 RESET - last status: 163 UNKNOWN ERROR  <---- error code A3 in _sd_readdata
    
    
          ---- It takes 26seconds ----
    
    
    CON:Prop0 Cog0 RESET - last status: 7 LOCK TIMEOUT
    
    
    Prop0 Cog0 RESET - last status: 7 LOCK TIMEOUT
    
    
    Prop0 Cog0 ok
    
    
    ===================================================================
    
    SiliconPower SDHC 4GB
    
    
    CON:Prop0 Cog0 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog1 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog2 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog3 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog4 RESET - last status: 0 ok
    
    
    CON:Prop0 PROP REBOOT PropForth v4.5 2011MAY31 17:30 1
    
    
    CON:Prop0 Cog5 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog6 RESET - last status: 172 UNKNOWN ERROR  <---- error code AC in _sd_blockread
    
    
           ---- It takes 26seconds ----
    
    
    CON:Prop0 Cog0 RESET - last status: 7 LOCK TIMEOUT
    
    
    Prop0 Cog0 RESET - last status: 7 LOCK TIMEOUT
    
    
    Prop0 Cog0 ok
    
    
    =======================================================================
    
    Transcend 16GB SDHC
    
    
    CON:Prop0 Cog0 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog1 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog2 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog3 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog4 RESET - last status: 0 ok
    
    
    CON:Prop0 PROP REBOOT PropForth v4.5 2011MAY31 17:30 1
    
    
    CON:Prop0 Cog5 RESET - last status: 0 ok
    
    
    CON:Prop0 Cog6 RESET - last status: 163 UNKNOWN ERROR  <---- error code A3 in _sd_readdata
    
    
           ---- It takes 26seconds ----
    
    
    CON:Prop0 Cog0 RESET - last status: 7 LOCK TIMEOUT
    
    
    Prop0 Cog0 RESET - last status: 7 LOCK TIMEOUT
    
    
    Prop0 Cog0 ok
    
    

    pqi_256MB and A-DATA_512MB cause error,because sd-driver don't support SDSC.

    Other SD-card(SDHC & 2GB's SDSC) is good on initialize. But cannot use.
    (Although Kingston_2GB and Transcend_2GB is SDSC, they reply to cmd8.)

    After doing saveforth, PF4.5 cannot accept input.
    Again I need to load PropForthKernel.spin.
  • mindrobotsmindrobots Posts: 6,506
    edited 2011-06-19 07:45
    OK, I've been through all the test scripts. I got everything working without too much pain and suffering. Ay one point, I corrupted the forth dictionary but I'm not sure if that was me or forth so more investigation is needed to see if I can recreate it.

    It is very cool being able to telnet 4 sessions into a Prop based development system. I can see this being loads of fun (and useful) with the Spinneret hooked up to multiple slave props.

    It is also very cool to have a little prop serving up web pages (i know, that's not strictly a Forth thing but it's still cool to be serving web off of your Spinneret regardless of the languages involved). I tried to expose the HTTP server to the outside world but port forwarding on my new DSL modem isn't playing nicely. Pooh!!

    I can see what you mean about not much memory being left. The Telnet version leaves a little wiggle room but not much in the HTTP server...but then, it should mostly be using the SD at that point.

    The embedded forth code in the .HTML pages also looks interesting - I'm sure I'll get into that more.

    I'll try to piece together some short instructions on building the various platforms when I can gather my notes and get some time (hopefully, this evening). The test scripts DO work and get you to the final result if you follow them.

    There is an impressive amount of work in this release!

    Great Job to everyone in the PropForth team!!

    Rick
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-06-19 09:01
    caskaz -

    just go off the weekly conference call. Please check the page.

    http://code.google.com/p/propforth/wiki/Propforth45FAQ?ts=1308499041&updated=Propforth45FAQ

    All -
    I will try to put all the answers in the page about, so the info is in one place.
    There will be additional material for:
    - Nglordi assembler questions,
    - kuroneko MCSH Comms throughput,
    - caskaz's SD (as it develops),
    - support for functions mnot yet brought forward, (VGA, time slicer, etc)
    - assembler optimizations for size and speed in 5,
    - Here's kind of a biggie, the SD_init only works one time, as it needs an un-initialized card. After initialization, it always give the "already initialized".
    - general SPI words
    - Test Automation
    - Documentation via writing the cases cases first, based on design; and writing code last. (This might be new tech for some folks, discussion is expected)

    However, kids come first, so no work-fun till tonight.
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-06-19 09:24
    mindrobots wrote: »
    ...Ay one point, I corrupted the forth dictionary but I'm not sure if that was me or forth so more investigation is needed to see if I can recreate it.

    Thanks Rick

    The thing I find coolest about forth, is that any coding mistake of consequence causes it to "explode dramatically". That is, its very hard to make a mistake and not notice it.
    I tend to do a reset or reboot between every experiment, it only costs about 2 seconds and you always have a pristine system.
    The exception is the SD material, which currently takes about 29.7 seconds to reload; but Sal says the optimized version takes about 5 seconds; so please bear with it till August.

    We are looking forward to user reported bugs, as there has not been enough real word usage to uncover issues beyond the functional implementation.
    All issues found are target to be added to the regression automation.

    Have fun playing!
  • caskazcaskaz Posts: 957
    edited 2011-06-19 16:52
    Hi.

    I loaded PropForthKernel.spin to protoboard's eeprom again.
    I loaded sd_driver.f to set debug-mode.
    I tested sd_init,_sd_readdata,_sd_writedata,sd_blockread,sd_blockwrite.
    Only sd_init is success.
    I use Kingston 2GB(SDSC).
    Same as SiliconPower 4GB(SDHC).
    Prop0 Cog6 ok
    
    sd_init
    
    sd_init ENTER
    
    Lock: 0
    
    Lock: 1
    
    Lock: 2
    
    Lock: 3
    
    Lock: 4
    
    Lock: 5
    
    Lock: 6
    
    Lock: 7
    
    _sd_init ENTER
    
    _sd_cmdr8 CMD: 0 ARG: 0 RESPONSE: 1
    
    _sd_cmdr40 CMD: 8 ARG: 426
    
    _sd_cmdr8 CMD: 8 ARG: 426 RESPONSE: 1
    
    RESPONSE: 1 426
    
    _sd_cmdr8 CMD: 55 ARG: 0 RESPONSE: 1
    
    _sd_cmdr8 CMD: 41 ARG: 1073741824 RESPONSE: 1
    
    _sd_cmdr8 CMD: 55 ARG: 0 RESPONSE: 1
    
    _sd_cmdr8 CMD: 41 ARG: 1073741824 RESPONSE: 1
    
    _sd_cmdr8 CMD: 55 ARG: 0 RESPONSE: 1
    
    _sd_cmdr8 CMD: 41 ARG: 1073741824 RESPONSE: 1
    
    _sd_cmdr8 CMD: 55 ARG: 0 RESPONSE: 1
    
    _sd_cmdr8 CMD: 41 ARG: 1073741824 RESPONSE: 1
    
    _sd_cmdr8 CMD: 55 ARG: 0 RESPONSE: 1
    
    _sd_cmdr8 CMD: 41 ARG: 1073741824 RESPONSE: 0
    
    _sd_cmdr40 CMD: 58 ARG: 0
    
    _sd_cmdr8 CMD: 58 ARG: 0 RESPONSE: 0
    
    RESPONSE: 0 -2130739200
    
    _sd_cmdr8 CMD: 16 ARG: 512 RESPONSE: 0
    
    _sd_cmdr8data readlen: 16
    
    _sd_cmdr8 CMD: 9 ARG: 0 RESPONSE: 0
    
    _sd_readdata readlen: 16
    
    00364 00128:
    
    00364: 0003014706 1532658601 4294967168 0377487505
    
    00368: 0000000000 0000000000 0000000000 0000000000
    
    00372: 0000000000 0000000000 0000000000 0000000000
    
    00376: 0000000000 0000000000 0000000000 0000000000
    
    00380: 0000000000 0000000000 0000000000 0000000000
    
    00384: 0000000000 0000000000 0000000000 0000000000
    
    00388: 0000000000 0000000000 0000000000 0000000000
    
    00392: 0000000000 0000000000 0000000000 0000000000
    
    00396: 0000000000 0000000000 0000000000 0000000000
    
    00400: 0000000000 0000000000 0000000000 0000000000
    
    00404: 0000000000 0000000000 0000000000 0000000000
    
    00408: 0000000000 0000000000 0000000000 0000000000
    
    00412: 0000000000 0000000000 0000000000 0000000000
    
    00416: 0000000000 0000000000 0000000000 0000000000
    
    00420: 0000000000 0000000000 0000000000 0000000000
    
    00424: 0000000000 0000000000 0000000000 0000000000
    
    00428: 0000000000 0000000000 0000000000 0000000000
    
    00432: 0000000000 0000000000 0000000000 0000000000
    
    00436: 0000000000 0000000000 0000000000 0000000000
    
    00440: 0000000000 0000000000 0000000000 0000000000
    
    00444: 0000000000 0000000000 0000000000 0000000000
    
    00448: 0000000000 0000000000 0000000000 0000000000
    
    00452: 0000000000 0000000000 0000000000 0000000000
    
    00456: 0000000000 0000000000 0000000000 0000000000
    
    00460: 0000000000 0000000000 0000000000 0000000000
    
    00464: 0000000000 0000000000 0000000000 0000000000
    
    00468: 0000000000 0000000000 0000000000 0000000000
    
    00472: 0000000000 0000000000 0000000000 0000000000
    
    00476: 0000000000 0000000000 0000000000 0000000000
    
    00480: 0000000000 0000000000 0000000000 0000000000
    
    00484: 0000000000 0000000000 0000000000 0000000000
    
    00488: 0000000000 0000000000 0000000000 0000000000
    
    SDSC initialize success # of Blocks: 3842048
    
    _sd_init EXIT
    
    sd_init EXIT
    
    
    
    Prop0 Cog6 ok
    
    
    
    16 _sd_readdata
    
    _sd_readdata readlen: 16
    
    CON:Prop0 Cog6 RESET - last status: 163 UNKNOWN ERROR
    
    Prop0 Cog6 RESET - last status: 163 UNKNOWN ERROR
    
    
    
    Prop0 Cog6 ok
    
    
    
    16 _sd_writedata
    
    _sd_writedata writelen: 16
    
    00364 00128:
    
    00364: 0000000000 0000000000 0000000000 0000000000
    
    00368: 0000000000 0000000000 0000000000 0000000000
    
    00372: 0000000000 0000667905 0000016248 0002097487
    
    00376: 0067108864 0000000256 4261412864 0000000000
    
    00380: 0538976288 0538976288 0538976288 0538976288
    
    00384: 0538976288 0538976288 0538976288 0538976288
    
    00388: 0538976288 0538976288 0538976288 0538976288
    
    00392: 0538976288 0538976288 0538976288 0538976288
    
    00396: 0538976288 0538976288 0538976288 0538976288
    
    00400: 0538976288 0538976288 0538976288 0538976288
    
    00404: 0538976288 0538976288 0538976288 0538976288
    
    00408: 0538976288 0538976288 0538976288 0538976288
    
    00412: 0000000000 1919840008 1952805733 0000000050
    
    00416: 0000000000 0000000000 0000000000 0000000000
    
    00420: 0000000000 0000000000 0000000000 0000000000
    
    00424: 0000000000 0000000000 0000000000 0000000000
    
    00428: 0000000000 0000668161 0000016248 0002097487
    
    00432: 0067108864 0000000256 4261412864 0000000000
    
    00436: 0538976288 0538976288 0538976288 0538976288
    
    00440: 0538976288 0538976288 0538976288 0538976288
    
    00444: 0538976288 0538976288 0538976288 0538976288
    
    00448: 0538976288 0538976288 0538976288 0538976288
    
    00452: 0538976288 0538976288 0538976288 0538976288
    
    00456: 0538976288 0538976288 0538976288 0538976288
    
    00460: 0538976288 0538976288 0538976288 0538976288
    
    00464: 0538976288 0538976288 0538976288 0538976288
    
    00468: 0000000000 1919840008 1952805733 0000000051
    
    00472: 0000000000 0000000000 0000000000 0000000000
    
    00476: 0000000000 0000000000 0000000000 0000000000
    
    00480: 0000000000 0000000000 0000000000 0000000000
    
    00484: 0000000000 0000668417 0000016248 0002097487
    
    00488: 0067108864 0000000256 4261412864 0000000000
    
    CON:Prop0 Cog6 RESET - last status: 1 MAIN STACK OVERFLOW
    
    Prop0 Cog6 RESET - last status: 1 MAIN STACK OVERFLOW
    
    
    
    Prop0 Cog6 ok
    
    
    
    1 sd_blockread
    
    sd_blockread ENTER Block: 1
    
    _sd_cmdr8data readlen: 512
    
    _sd_cmdr8 CMD: 17 ARG: 512 RESPONSE: -1
    
    CON:Prop0 Cog6 RESET - last status: 172 UNKNOWN ERROR
    
    Prop0 Cog6 RESET - last status: 172 UNKNOWN ERROR
    
    
    
    Prop0 Cog6 ok
    
    
    
    1 sd_blockwrite
    
    sd_blockwrite ENTER Block: 1
    
    _sd_cmdr8 CMD: 24 ARG: 512 RESPONSE: -1
    
    CON:Prop0 Cog6 RESET - last status: 173 UNKNOWN ERROR
    
    Prop0 Cog6 RESET - last status: 173 UNKNOWN ERROR
    
    
    
    Prop0 Cog6 ok
    
    



    And 24 _sd_readdata output error163. But 32 _sd_readdata output STACK UNDERFLOW.
    Occuring STACK UNDERFLOW, I need to reset.
    32 _sd_readdata
    
    
    
    _sd_readdata readlen: 24
    
    CON:Prop0 Cog6 RESET - last status: 3 MAIN STACK UNDERFLOW
    
    Prop0 Cog6 RESET - last status: 3 MAIN STACK UNDERFLOW
    
    Prop0 Cog6 ok
    
    
    
    16 _sd_readdata
    
    
    
    _sd_readdata readlen: 16
    
    CON:Prop0 Cog6 RESET - last status: 3 MAIN STACK UNDERFLOW
    
    Prop0 Cog6 RESET - last status: 3 MAIN STACK UNDERFLOW
    
    Prop0 Cog6 ok
    
    
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-06-19 17:23
    caskaz wrote: »
    I loaded PropForthKernel.spin to protoboard's eeprom again.
    I loaded sd_driver.f to set debug-mode.
    I tested sd_init,_sd_readdata,_sd_writedata,sd_blockread,sd_blockwrite.
    Only sd_init is success.

    Please see the FAQ linked above, the discussion of your question is #1 at the bottom of the list.

    I'm kind of grasping as straws now, these are the things I can suggest immediately.

    Did you try connecting P17 and P18, the hardware might need to be doing something during initialization?

    The error codes indicate that you cards are NOT SDv2+ compliant (Could this be possible? I.E. from a close-out booth in Akihabara or a Chineese inport vendor from the subwaystation, etc?) Can you try a known-new card? We need to see a card return messages that identify itself as SD V2+ compliant.

    You've already done this, but I have to suggest it anyway: Could you check your hardware one more time? All the errors indicate a hardware issue, either with the slot or the cards.

    If none of these produce results, I can send you a card that I have successfully initialized and used on my system, and you can send a card to Sal for testing. This can prove if the card or your hardware or the release software is the issue. But this would take the longest (for shipping etc.) PM me if you want to go this route.
  • caskazcaskaz Posts: 957
    edited 2011-06-19 18:08
    Hi prof_braino.

    Sorry, I will report about SD-trouble to FAQ.

    sd_driver(SPI-mode) don't use P17 and P18.
    SD-mode use P16-P21(6-wire)

    My all SD-card(SDHC & 2G-SD) is success on initialize(sd_init), but another function is NG.
    My log is kingston2GB. Same as SDHC.
    Although kingston2GB is SDSC(standardSD), it reply to cmd8. So sd_driver.f should support kingston2GB
    SDSC(256MB, 512MG,1GB) don't reply to cmd8.
    Some 2GB-SD might not reply to cmd8. I don't know well.

    SDv2+ is SDHC(HighCapacitySD)?
    Please show me your SD-card's photo. I want to see label like my posted photo.
    I will purchase to search it.
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-06-20 07:06
    caskaz wrote: »
    sd_driver(SPI-mode) don't use P17 and P18. SD-mode use P16-P21(6-wire)
    kingston2GB ... reply to cmd8.
    SDSC(256MB, 512MG,1GB) don't reply to cmd8.

    SDv2+ is SDHC(HighCapacitySD)?

    Please try adding P17 and P18 in case they are needed by SD card hardware at power up. (just to be thorough)
    SDv2+ covers all the cards listed in attached microSD photo, as they all work on my rig
    940 x 545 - 75K
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-06-20 07:10
    I only have these these old full SD cards, I have not used them with 4.5 as I have not gotten to Hive (full SD slot) hardware yet
    870 x 280 - 37K
Sign In or Register to comment.