Stand-Alone Binary Image Loader

I have a client in TX that frequently asks for code updates that I send as a binary image. It would be nice if there was a simple loader program (Windows) that they could use to download the new image into their board -- they always get nervous when opening Propeller Tool. Essentially, I'd love the dialog we get with F8 as a standalone program.

Thanks!
Jon McPhalen
Hollywood, CA
It's Jon or JonnyMac -- please do not call me Jonny.
«1

Comments

  • 38 Comments sorted by Date Added Votes
  • PublisonPublison Posts: 10,474
    edited March 29 Vote Up1Vote Down
    Infernal Machine
  • None of the links in that thread work. No propellent.exe.

    Mike
  • Infernal Machine
  • BST ?
  • Ltech wrote: »
    BST ?

    I should have been clear: I'd like nice, simple GUI that allows my client to select a file and then handles the download to RAM and EEPROM. I may be forced to build a little app (locking at Lazarus) that can use and external loader (like BSTL).

    Jon McPhalen
    Hollywood, CA
    It's Jon or JonnyMac -- please do not call me Jonny.
  • Why not just create an iexpress installer that extracts the files and a copy of proploader.exe from the simple ide package along with any dlls or such it needs, then executes a batch file to install the driver and upload the data.
    Particularly patient proactive practice positively predicates practically precise poly-processor Parallax Propeller programming paradigms.

    .
  • Why not just create an iexpress installer ...
    Those are the lines upon which I was thinking. Double-click on the distributed .exe, and it unpacks and does the uploading automatically. The only user selection would be a pair of buttons for RAM or EEPROM.

    With these installation packages, I wonder if it's possible to make it omit selecting the installation folder and all the other stuff that installation packages typically do.

    -Phil
    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery
  • Then there's this that I found by accident:

    https://forums.parallax.com/discussion/142444/propellent-tricks

    -Phil
    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery
  • Not a problem. You make a batch file and have that as the program that is run. You add all the proploader and any dependencies it has as well as the files you want to flash to the propeller. You make a menu in the batch file that will ask the user what to do. A nice little old school menu. Choose 1 for flash, two for ram. Then it says "You are about to write to flash memory" (or whatever) type FLASH to continue. Any other entry aborts! The batch file does its job, and when the console window closes, optionally the installer can say a message for you.
    Particularly patient proactive practice positively predicates practically precise poly-processor Parallax Propeller programming paradigms.

    .
  • Clock LoopClock Loop Posts: 1,575
    edited April 1 Vote Up0Vote Down
    JonnyMac wrote: »
    Ltech wrote: »
    BST ?

    I should have been clear: I'd like nice, simple GUI that allows my client to select a file and then handles the download to RAM and EEPROM. I may be forced to build a little app (locking at Lazarus) that can use and external loader (like BSTL).

    I see your need for a gui,,,, can it be that hard to make one for ....

    I must mention the non-gui tool here, since no one has yet... (MIchael actually did, but proploader, is a single executable, no other programs or files are required)

    PropLoader ! (wifi support also!)

    Its not a GUI yet, but its active in development for the Propeller, AND WIFI.. ALSO!

    Parallax has already provided you with the code, i would imagine it would be easy to code a VB front end for it.... (mabee, don't know how involved that is.)

    https://github.com/parallaxinc/PropLoader

    https://github.com/parallaxinc/PropLoader/releases

    https://github.com/parallaxinc/PropLoader/releases/download/v1.0-37/proploader-win.zip


    PropLoader v1.0-37 (2018-03-31)
    
    usage: proploader [options] [<file>]
    
    options:
        -b <type>       select target board and subtype (default is 'default:default')
        -c              display numeric message codes
        -D var=value    define a board configuration variable
        -e              program eeprom (and halt, unless combined with -r)
        -f <file>       write a file to the SD card
        -i <ip-addr>    IP address of the Parallax Wi-Fi module
        -I <path>       add a directory to the include path
        -n <name>       set the name of a Parallax Wi-Fi module
        -p <port>       serial port
        -P              show all serial ports
        -r              run program after downloading (useful with -e)
        -R              reset the Propeller
        -s              do a serial download
        -t              enter terminal mode after the load is complete
        -T              enter pst-compatible terminal mode after the load is complete
        -v              enable verbose debugging output
        -W              show all discovered wifi modules
        -?              display a usage message and exit
    
    file:               binary file to load (.elf or .binary)
    
    Target board type can be either a single identifier like 'propboe' in which case the subtype
    defaults to 'default' or it can be of the form <type>:<subtype> like 'c3:ram'.
    
    Module names should only include the characters A-Z, a-z, 0-9, or '-' and should not begin or
    end with a '-'. They must also be less than 32 characters long.
    
    Variables that can be set with -D are:
      clkfreq clkmode reset baudrate rxpin txpin tvpin
      loader-baud-rate fast-loader-baud-rate program-baud-rate
      sdspi-do sdspi-clk sdspi-di sdspi-cs
      sdspi-clr sdspi-inc sdspi-start sdspi-width spdspi-addr
      sdspi-config1 sdspi-config2
    
    Value expressions for -D can include:
      rcfast rcslow xinput xtal1 xtal2 xtal3 pll1x pll2x pll4x pll8x pll16x k m mhz true false
      an integer or two operands with a binary operator + - * / % & | or unary + or -
      or a parenthesized expression.
    
    1. Silicon gel filled square. <---2.Sonics(ultra even). 3.Lazers. 4. ?
    https://hackaday.io/project/162734-a-trillion-year-clock
    54 propeller chips were connected to One, to rule them all....
    https://forums.parallax.com/discussion/127983/55-parallax-propeller-s-parallells-processing-of-permanent-perturbations/p1
  • JonnyMacJonnyMac Posts: 6,114
    edited April 2 Vote Up0Vote Down
    Thanks, I'll have a look at that. I definitely need a friendly GUI for this customer, and it gives me a bit of an excuse to get pack to programming for the PC.

    A few minutes later....
    C:\MyPrograms\PropLoader>proploader -s -p COM41 -e -r cylon.binary
    Opening file 'cylon.binary'
    Downloading file to port COM41
    1488 bytes sent
    Verifying RAM
    Programming EEPROM
    ERROR: EEPROM checksum failed
    ERROR: Download failed
    
    Hmmm... seems easy enough, but something is amiss. I can open and download the same binary image in Propeller Tool without issue.
    Jon McPhalen
    Hollywood, CA
    It's Jon or JonnyMac -- please do not call me Jonny.
  • jmgjmg Posts: 12,618
    JonnyMac wrote: »
    Hmmm... seems easy enough, but something is amiss. I can open and download the same binary image in Propeller Tool without issue.

    A choice to read-back to a file, or verify against a file, is often very useful in MCU programmers.
    Not sure this supports either yet ?
  • Clock LoopClock Loop Posts: 1,575
    edited April 2 Vote Up0Vote Down
    JonnyMac wrote: »
    Hmmm... seems easy enough, but something is amiss. I can open and download the same binary image in Propeller Tool without issue.



    I did a test with my own (simple) binary and serial port, and it worked for me... hmm..
    :\>proploader -s -p COM4 -e -r vb.binary
    Opening file 'vb.binary'
    Stepping down to 460800 baud
    Stepping down to 230400 baud
    Stepping down to 115200 baud
    Using single-stage download
    Downloading file to port COM4
    1292 bytes sent
    Verifying RAM
    Programming EEPROM
    Verifying EEPROM
    Download successful!
    
    :\>
    


    I tried the same port to see if some bug...
    :\>proploader -s -p COM41 -e -r vb.binary
    Opening file 'vb.binary'
    Stepping down to 460800 baud
    Stepping down to 230400 baud
    Stepping down to 115200 baud
    Using single-stage download
    Downloading file to port COM41
    1292 bytes sent
    Verifying RAM
    Programming EEPROM
    Verifying EEPROM
    Download successful!
    
    :\>
    

    Odd that yours didn't say stepping down, or single stage download....


    https://forums.parallax.com/profile/49778/David Betz might be able to help.?


    Did you download the latest version of proploader, (that would explain the missing steps in the output)?
    1. Silicon gel filled square. <---2.Sonics(ultra even). 3.Lazers. 4. ?
    https://hackaday.io/project/162734-a-trillion-year-clock
    54 propeller chips were connected to One, to rule them all....
    https://forums.parallax.com/discussion/127983/55-parallax-propeller-s-parallells-processing-of-permanent-perturbations/p1
  • jmgjmg Posts: 12,618
    Clock Loop wrote: »
    I did a test with my own (simple) binary and serial port, and it worked for me... hmm..
    Wonder what checksum covers ? - is your unused area blank ?
  • jmg wrote: »
    Clock Loop wrote: »
    I did a test with my own (simple) binary and serial port, and it worked for me... hmm..
    Wonder what checksum covers ? - is your unused area blank ?

    No idea, the binary is generated by PropellerTool --- https://www.parallax.com/sites/default/files/downloads/P8X32A-Setup-Propeller-Tool-v1.3.2.zip
    Using F8 ---> Save Binary. So whatever propeller tool does with unused area is what I have.
    1. Silicon gel filled square. <---2.Sonics(ultra even). 3.Lazers. 4. ?
    https://hackaday.io/project/162734-a-trillion-year-clock
    54 propeller chips were connected to One, to rule them all....
    https://forums.parallax.com/discussion/127983/55-parallax-propeller-s-parallells-processing-of-permanent-perturbations/p1
  • frank freedmanfrank freedman Posts: 1,420
    edited April 3 Vote Up0Vote Down
    Probably way late to this party, but if you only want to ship the client a binary ready to load, perhaps consider Perl/Tk as an interface to the bstl loader from the BST suite. Perl/Tk is supported on Linux and windows as I think is BST. Perl/Tk can be used to create the GUI if it is needed. Would it be a correct assumption that you want a GUI to prevent confusion/mistakes with all the command line options of various loaders or keeping the same out of sight or access of a client? It's been a very long time since it wrote significant perl/Tk; it was the shortest learning curve for the time and requirements then (2000). Could a loader be done in perl/Tk by itself? Don't know, but would be interesting to see if one could.... But then again, why reinvent the wheel?
    Ordnung ist das halbe Leben
    I gave up on that half long ago.........
  • Wow. I just looked at the proploader source code and it's about 1000X more complex than I imagined...

    I think there must have been some intentional obfuscation going on there...
    Prop Info and Apps: http://www.rayslogic.com/
  • It would be pretty simple to make a Windows dialog to load the prop using the Propellant dll or exe...
    Prop Info and Apps: http://www.rayslogic.com/
  • Rayman wrote: »
    Wow. I just looked at the proploader source code and it's about 1000X more complex than I imagined...

    I think there must have been some intentional obfuscation going on there...
    It's complicated because it uses Jeff Martin's fast loader code and also because it handles wi-fi loading using the WX wi-fi module.

  • There are other loaders I can look at -- my client (small company) has to program about 50 boards a day and, occasionally, have to get temporary help. This is my motivation for making it as "easy" as I can. This also gives me an opportunity to get back into PC programming, something I've wanted to do for a while for personal projects. Currently looking at Lazarus and Xojo. I have used Turbo Pascal, Delphi, and VB in the past, so these shouldn't be very problematic. We'll see.
    Jon McPhalen
    Hollywood, CA
    It's Jon or JonnyMac -- please do not call me Jonny.
  • I saw some strange handshaking stuff, I think partially due to the unknown initial frequency of the Prop.

    Then, the traffic looked to be encrypted in a strange way for some reason...
    Prop Info and Apps: http://www.rayslogic.com/
  • T ChapT Chap Posts: 3,903
    edited April 3 Vote Up0Vote Down
    My loader app works as is for FTDI. You have to rename the .eeprom to .dsf

    Unfortunately the source got broken and I am not sure yet when we will get around to it so you can’t modify the looks of it yet.
  • TorTor Posts: 1,959
    edited April 3 Vote Up0Vote Down
    It's not encrypted, what you saw is probably the LFSR. But yes, it's not necessary to make it complicated if you limit yourself to just programming the prop (no wifi etc). I wrote my own standalone command line loader some years ago because I didn't want to depend on any framework or libraries, only a compiler and the algorithm. It was very small. But it only loaded to RAM, not EEPROM, because I didn't need it.
  • Rayman wrote: »
    I saw some strange handshaking stuff, I think partially due to the unknown initial frequency of the Prop.

    Then, the traffic looked to be encrypted in a strange way for some reason...
    There is no encryption although Jeff's loader does use a more compact way of encoding the slow ROM loader protocol. Again, this is to speed up loading. If you want a really simple loader you can look at the files PLoadLib.c and PLoadLib.h from the propeller-load source code. I've attached them here.



  • Tor wrote: »
    It's not encrypted, what you saw is probably the LFSR. But yes, it's not necessary to make it complicated if you limit yourself to just programming the prop (no wifi etc). I wrote my own standalone command line loader some years ago because I didn't want to depend on any framework or libraries, only a compiler and the algorithm. It was very small. But it only loaded to RAM, not EEPROM, because I didn't need it.
    Neither propeller-load nor proploader require any frameworks or libraries.

  • TorTor Posts: 1,959
    It's been a long time since I wrote my loader (years), but at that time the alternative was buried inside the full propgcc build environment.
  • jmgjmg Posts: 12,618
    JonnyMac wrote: »
    Currently looking at Lazarus and Xojo. I have used Turbo Pascal, Delphi, and VB in the past, so these shouldn't be very problematic. We'll see.
    Lazarus should also allow RaspPi use ?

    We use Synaser serial library, with Lazarus, not seen any issues....

    JonnyMac wrote: »
    There are other loaders I can look at -- my client (small company) has to program about 50 boards a day and, occasionally, have to get temporary help..
    What code size do they download ?

  • Propellant has the feature (like Prop Tool) where it can automatically find and identify the serial port number and the Prop chip.

    I don't think these other tools can do that, right?
    Prop Info and Apps: http://www.rayslogic.com/
  • Tor wrote: »
    It's been a long time since I wrote my loader (years), but at that time the alternative was buried inside the full propgcc build environment.
    It's in a subdirectory that can easily be built on its own.

Sign In or Register to comment.