Propeller Command Line Loader
Praxis
Posts: 333
Since Michael Park (mpark) has done a great job with the command line compiler I thought it natural to have a command line loader to go with it.
Give it a try and let me know bugs etc etc.
Needs the DotNet 2.0 Framework to run
Cheers
Compiler at:
http://forums.parallax.com/showthread.php?p=749832
All new uploaded will be posted to the New - PropTerminal an Alternative Serial Terminal - And PropLoader thread
http://forums.parallax.com/showthread.php?p=750786
Post Edited (Praxis) : 9/12/2008 2:05:35 PM GMT
Give it a try and let me know bugs etc etc.
Needs the DotNet 2.0 Framework to run
Cheers
Compiler at:
http://forums.parallax.com/showthread.php?p=749832
All new uploaded will be posted to the New - PropTerminal an Alternative Serial Terminal - And PropLoader thread
http://forums.parallax.com/showthread.php?p=750786
Post Edited (Praxis) : 9/12/2008 2:05:35 PM GMT
Comments
How does your program compare to Propellent? Are there any features that would attract a person to your program over Propellent?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
That's unlikely to work. The download protocol is not very tolerant of delays and Bluetooth for sure has unpredictable delays inherent in the protocol. Ethernet is better, but, for a link like this to work, you need a "smart downloader" on the Propeller end. You don't need to store the program to be downloaded, but you need to manage the handshaking and the translation of the program bytes to the ratiometric form on the Propeller side of the link so the delays can be buffered out.
What are the command line parameters? How do you select download to RAM vs download to EEPROM? Does the Identify command work? Can you specify the com port? How?
That sounds like a nice feature for a "Propeller Professional" product. Not sure if anyone here or in a more serious environment would pay extra for it though. I envision a world where I don't have to be anywhere near the device to program it and no other extra hardware other than a terminal server would be required to get things done. For example, my "reports" in Bangalore could always work with products in my lab here in San Jose so that we could have 24 hour capacity utilization. Of course, this kind of thing would not necessarily be understood by those not needing it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
The main program has its own ethernet loader. It uses an HTTP PUT command to store a new program in
32K of the EEPROM, then transfers control to it. I think you can select which 32K to use. On the other
end is the cURL program which is available for a variety of platforms.
Post Edited (Mike Green) : 9/11/2008 4:16:28 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
In my case I use an IDE that can capture the output and display it in window. Jeff Martin and I have spoken about this and he was going to update the propellant but so far has not. Since mpark has created a compiler that runs under DotNet it seemed logical to have a matching loader. BTW what has happen to Jeff, no word from him since Independence Holiday?
@Mike Green: From the command line enter proploader and the usage parameters are displayed.
If you just specify the file name the default is com1 and load to RAM.
@jazzed: I assume you want to be able to load a prop over a network? i.e. one computer does the development and the prop chip is connected to another computer. If that is the case then it is quite simple to do. Please confirm.
I may add a function to scan the serial ports for the prop chip but don't see any immediate requirement.
I am planning however to do a new terminal program that is controlled by the proploader to automatically stop/start the communications with the prop during the loading process. The current PST disables the serial port when the application loses focus.
Cheers.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
You have computer A (or B or C etc) and this computer wants to send the output of a new compilation(or program update or whatever) to one or more remote computers that are interfaced to prop chips.
David
Thanks.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Got the following error under MacOS Mono just running the application without parameters (to check version and help info):
Method (wrapper runtime-invoke) System.Object:runtime_invoke_void_string (object,intptr,intptr,intptr) emitted at 0x7a1028 to 0x7a10c0 (code length 152) [noparse][[/noparse]PropLoader.exe]
Method System.OutOfMemoryException:.ctor (string) emitted at 0x7a10c0 to 0x7a10ec (code length 44) [noparse][[/noparse]PropLoader.exe]
Method System.SystemException:.ctor (string) emitted at 0x7a1108 to 0x7a1134 (code length 44) [noparse][[/noparse]PropLoader.exe]
Method System.Exception:.ctor (string) emitted at 0x7a1140 to 0x7a115b (code length 27) [noparse][[/noparse]PropLoader.exe]
Method System.Exception:set_HResult (int) emitted at 0x7a1160 to 0x7a1171 (code length 17) [noparse][[/noparse]PropLoader.exe]
Method System.NullReferenceException:.ctor (string) emitted at 0x7a1178 to 0x7a11a1 (code length 41) [noparse][[/noparse]PropLoader.exe]
Method System.StackOverflowException:.ctor (string) emitted at 0x7a11a8 to 0x7a11c1 (code length 25) [noparse][[/noparse]PropLoader.exe]
Cannot open assembly /Applications/MonoApps/PropLoader.exe.
Running homespun013.exe the same way produces the expected banner and help info.
I've had no problems with anything else using the .Net 2.0 framework, homespun works fine.
Anyway I think I got that sorted, FYI I could only test it on XP, Windows 2003 and Vista.
I have posted an update file at the top PropLoader_102.zip.
Cheers
I wish the filename was not argument position sensitive ... your options all require a '/' ... it is unlikely that a filename will have that in Windoze.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
I was thinking something like this as a start:
On PC A is a program (windows or command line) that loads the binary/eeprom file and then sends it via TCP/IP to a remote computer.
This program would require settings/command line options for destination IP address and port number.
The remote PC connected to the prop runs a program (windows or windows service) that receives the file and subsequently programs the prop.
Programing status can be sent back to PC A to indicate pass/fail or in progress etc.
David
To be honest I did not spend much time on the argument parser.
Something to look into when time allows.
Cheers
MacPleasant42:~ mgreen$ mono /Applications/MonoApps/PropLoader.exe
#Error: System.IO.DirectoryNotFoundException
Directory 'file:/Applications/MonoApps' not found.
at System.IO.Directory.GetFileSystemEntries (System.String path, System.String pattern, FileAttributes mask, FileAttributes attrs) [noparse][[/noparse]0x00000]
at System.IO.Directory.GetFiles (System.String path, System.String pattern) [noparse][[/noparse]0x00000]
at netz.NetzStarter.InitXR () [noparse][[/noparse]0x00000]
at netz.NetzStarter.Main (System.String[noparse]/noparse args) [noparse][[/noparse]0x00000]
Using .NET Runtime: 2.0.50727.42
Created with .NET Runtime: 2.0.50727.3053
Sounds like a pretty standard client-server design.·You could use port 40xx (or something) from the client as the TCP/IP port number to associate with the target Propeller device; a name-server lookup·could be added so users don't have to remember the connection number ... ofcourse relying solely on the name-server eleminates any need to make port numbers easy to remember. A PC could have any number of USB serial ports where many ports·are required. This hardware configuration could be very competitively priced given the cost of the PropPlug. This would be another good packaged product start for the Propeller Professional category or even folks with more than one Propeller based design if Parallax ever got serious.·I just hate using wires though [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
@jazzed: I have modified the command line arguments, the slash is gone and the parameters can go in any order.
Cheers
David
MacPleasant42:~ mgreen$ mono -v /Applications/MonoApps/PropLoader.exe
Method (wrapper runtime-invoke) System.Object:runtime_invoke_void_string (object,intptr,intptr,intptr) emitted at 0x7a1028 to 0x7a10c0 (code length 152) [noparse][[/noparse]PropLoader.exe]
Method System.OutOfMemoryException:.ctor (string) emitted at 0x7a10c0 to 0x7a10ec (code length 44) [noparse][[/noparse]PropLoader.exe]
Method System.SystemException:.ctor (string) emitted at 0x7a1108 to 0x7a1134 (code length 44) [noparse][[/noparse]PropLoader.exe]
Method System.Exception:.ctor (string) emitted at 0x7a1140 to 0x7a115b (code length 27) [noparse][[/noparse]PropLoader.exe]
Method System.Exception:set_HResult (int) emitted at 0x7a1160 to 0x7a1171 (code length 17) [noparse][[/noparse]PropLoader.exe]
Method System.NullReferenceException:.ctor (string) emitted at 0x7a1178 to 0x7a11a1 (code length 41) [noparse][[/noparse]PropLoader.exe]
Method System.StackOverflowException:.ctor (string) emitted at 0x7a11a8 to 0x7a11c1 (code length 25) [noparse][[/noparse]PropLoader.exe]
Cannot open assembly /Applications/MonoApps/PropLoader.exe.
It doesn't do a lot more than that and it's in no fit state to be used in anger but I am going to rewrite it for the LCC stuff I'm doing. Then it'll be released under MIT license so you'll be free to do whatever you want with it.
Propellent works except for the downloading part; it won't identify the serial ports, not even the physical ones let alone USB. Most .Net 2.0 has no problem finding them but it probably depends on how one codes to go looking for them.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Pull my finger!
Certainly possible to do ( at least for physical serial and hopefully FTDI USB at least ) but adding such GUID's could possibly break pre-Win2K and we'd need to know exactly what GUID's and related info had to be stored. There's also a possibility that even if we can get Propellent to enumerate the ports the way it then uses them wouldn't be compatible with pre-Win2K.
Given that it's easy enough (!) to write Propeller downloaders it's perhaps not worth the effort just to get Propellent to work. If it were to get PropTool working on pre-W2K that would be a different matter but that seems to be impossible so we'll just have to wait for someone to create a GUI/IDE for the homespun compiler.
Would there be interest in a basic ide that has pretty simple editing features (including Propeller Font unicode handling) and compiler/downloader built in that is a native executable for Linux 32/64, Win98SE and up, MacOS X Intel & PPC ?
I'm working on one, but it's probably a couple of months away.
No syntax highlighting yet or spin specific features like block groups though.. I'm planning it, but I want to get a functional system first.
Basically I want to cater for Mac users (without having to resort to Java or Mono) and linux users with a consistent and similar to proptool style experience. Win98 and up would just be cream on the cake.
Like the compiler (with which I was soundly beaten by mpark! - great job!) I'll keep working on my own toolset and if someone else beats me to it, fair game [noparse]:)[/noparse]
I have it editing/compiling and loading, but I won't release it until it's perfect (I need to solve this nitty little floating point incompatibility with the native Parallax stuff (and I need to get my MacOS PPC machine back to do some regression testing on the loader)).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Pull my finger!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Michael Park
PS, BTW, and FYI:
To search the forum, use search.parallax.com (do not use the Search button).
Check out the Propeller Wiki: propeller.wikispaces.com/