PropForth 4.5 Available for download
prof_braino
Posts: 4,313
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
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
Comments
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)
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
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!
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;
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:
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:
Hope this helps!
Rick
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.
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
Issue 26 is open for this
http://code.google.com/p/propforth/issues/detail?id=26
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
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.
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
SD's connection is ok.
After reboot, I tested _sd_init. Not yet install sdfs.f.
Again I re-try .
Loading PropFortghKernel.spin to protoboard's eeprom.
Loading sd_driver. to TeraTerm.
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?
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.
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.
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.
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.
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
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.]
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)
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?
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.
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.
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 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.
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
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.
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!
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).
And 24 _sd_readdata output error163. But 32 _sd_readdata output STACK UNDERFLOW.
Occuring STACK UNDERFLOW, I need to reset.
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.
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.
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