Shop OBEX P1 Docs P2 Docs Learn Events
Propeller Command Line Loader — Parallax Forums

Propeller Command Line Loader

PraxisPraxis Posts: 333
edited 2008-09-12 21:21 in Propeller 1
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
«1

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-09-11 01:01
    Hi Praxis,
    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.
  • jazzedjazzed Posts: 11,803
    edited 2008-09-11 02:56
    I would be attracted to a loader that allowed using blue-tooth for the com port or·some network attached device.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve
  • Mike GreenMike Green Posts: 23,101
    edited 2008-09-11 03:04
    jazzed,
    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.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-09-11 03:06
    Praxis,
    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?
  • jazzedjazzed Posts: 11,803
    edited 2008-09-11 03:49
    Mike,
    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
  • Mike GreenMike Green Posts: 23,101
    edited 2008-09-11 04:10
    How about the download feature of the YBox2? www.ladyada.net/make/ybox2/index.html.
    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
  • jazzedjazzed Posts: 11,803
    edited 2008-09-11 04:15
    Yes, it is nice. Not every product has room for all that though. Greatest flexibility comes I think from what you suggested before in having an intermediary handle the default Propeller interface and such a suggestion is good for an upcoming product I've been building.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve
  • PraxisPraxis Posts: 333
    edited 2008-09-11 07:57
    @Paul Baker: The propellant is fine except for the fact that all result outputs are to windows pop ups which is a tad annoying.
    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.

    
    D:\>proploader
    
    PropLoader Command Line, Version 1.00
    Copyright (C)2008 www.praxis.com.my
    
    Usage: PropLoader.Exe <file name> [noparse][[/noparse]options]
    
    Options:
    /COMPORT=1   1=Com1, 2=Com2 etc. Default COM1
    /MODE=RAM    RAM, EEPROM etc.    Default RAM
    
    D:\>
    
    
    



    @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.
  • jazzedjazzed Posts: 11,803
    edited 2008-09-11 09:11
    Praxis, Not really via another computer ... there are ways like VNC and NetMeeting, but that requires a good pipe for desktop graphics. I was thinking more along the lines of a port concentrator or Cisco terminal server.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve
  • PraxisPraxis Posts: 333
    edited 2008-09-11 09:25
    Steve, My thinking is something like this:

    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
  • PraxisPraxis Posts: 333
    edited 2008-09-11 12:41
    Minor Revision 1.01 posted, no new features just tidy up and new EXE Icon.
  • jazzedjazzed Posts: 11,803
    edited 2008-09-11 14:55
    David, I would like to hear more about your solution.
    Thanks.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-09-11 16:07
    Jeff was ill for a while, but he has fully recovered. His total load is one of the highest in our company and sometimes even the simplest task will take quite a while for him to get to if higher priority tasks are regularly pushed onto his plate.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-09-11 16:38
    Praxis,
    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.
  • hippyhippy Posts: 1,981
    edited 2008-09-11 16:50
    Also crashed Win98SE. Same circumstances as Mike; just typed the filename, no parameters. BSOD which brought down everything and required the reset button to be pushed.

    I've had no problems with anything else using the .Net 2.0 framework, homespun works fine.
  • PraxisPraxis Posts: 333
    edited 2008-09-11 17:51
    BSOD, wow I haven't managed that in a while.

    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
  • jazzedjazzed Posts: 11,803
    edited 2008-09-11 18:04
    Praxis said...
    BSOD, wow I haven't managed that in a while.

    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
    It works on XP
    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
  • PraxisPraxis Posts: 333
    edited 2008-09-11 18:10
    Hi 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
  • PraxisPraxis Posts: 333
    edited 2008-09-11 18:15
    jazzed said...

    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

    To be honest I did not spend much time on the argument parser.

    Something to look into when time allows.

    Cheers
  • Mike GreenMike Green Posts: 23,101
    edited 2008-09-11 18:19
    I got a different error message:
    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
  • jazzedjazzed Posts: 11,803
    edited 2008-09-11 18:46
    Praxis said...
    Hi 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
    David,

    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
  • hippyhippy Posts: 1,981
    edited 2008-09-11 20:02
    @ Paxis : Version 102 doesn't crash Windows 98 but doesn't download either. I just get "Programming Error". My own MS-DOS and VB6 downloaders work okay ( Propellent doesn't ).
  • TubularTubular Posts: 4,656
    edited 2008-09-11 20:48
    Hippy I'm very interested in your MS-DOS downloader for a legacy industrial product we still make. I tried searching the forums but couldn't locate other references to it. I had just assumed I would have to write my own but perhaps we can come to some arrangement - PM me if interested thanks
  • PraxisPraxis Posts: 333
    edited 2008-09-11 21:03
    Uploaded V1.0.3, I don't think it will fix the Mac and Win98 issues though, will give that some thought, interesting that hippy cannot get prolellant to work on WIN98.

    @jazzed: I have modified the command line arguments, the slash is gone and the parameters can go in any order.

    Cheers

    David
  • Mike GreenMike Green Posts: 23,101
    edited 2008-09-11 22:20
    Here's the error message from 1.0.3:

    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.
  • hippyhippy Posts: 1,981
    edited 2008-09-12 02:36
    Tubular said...
    Hippy I'm very interested in your MS-DOS downloader for a legacy industrial product we still make. I tried searching the forums but couldn't locate other references to it. I had just assumed I would have to write my own but perhaps we can come to some arrangement - PM me if interested thanks
    It's 32-bit MS-DOS so requires running under windows and it has numerous problems but does prove comms works to the Propeller.

    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.
    Praxis said...
    interesting that hippy cannot get prolellant to work on WIN98.
    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.
  • BradCBradC Posts: 2,601
    edited 2008-09-12 05:57
    Propellent (Like proptool) looks for the serial ports by enumerating some GUID keys in the registry. They are only created on Win2k and up.. it's a pain in the backside as it will only look at certain types of hardware ports. It completely ignores soft-ports and anything with custom device drivers (they don't create those keys).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pull my finger!
  • hippyhippy Posts: 1,981
    edited 2008-09-12 16:42
    @ BradC : So in theory it would be possible to create the required GUID keys in the registry which would keep Propellent happy ?

    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.
  • BradCBradC Posts: 2,601
    edited 2008-09-12 17:17
    hippy said...
    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!
  • mparkmpark Posts: 1,305
    edited 2008-09-12 18:09
    I don't think homespun counts as beating anyone. I was basically looking for test cases to validate parsing and code generation. Your (Brad) project sounds much further along.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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/
Sign In or Register to comment.