Parallax supported command line tool to load the P1 - SOLVED
prof_braino
Posts: 4,313
The OpenSPIN spin compiler for the P8X32A does not include command line capability to load the compiled image to the prop.
the ploadlib module in the gcc complier for the prop has this code (to load a compiled raw image to the prop), and can be obtained as shown in heater's post (from May 23) below
Here is an example linux command line that will load an OpenSPIN compiled image file "SPINimage.eeprom" to eeprom, and begin execution:
Now the original request is changed, to have a note in the OpenSPIN readme, containing either the information from heater's post, or some directions how to find and use the ploadlib.c support for OpenSPIN.
Cheers!
Original post:
Hi Parallax
Users of OpenSPIN seem to be lacking a tool to load the propeller 1.
Our "build and test automation" code for generating new kernels and application images requires launch from a program script command line, and so anything that must be operated via GUI will not work.
While there are tools that load the P1, there are none that are both supported and stand-alone from the command line.
* Brad's Spin Tool still works of course, but it has no source code, and if a problem ever arises, there would be no way to fix it.
* There are proploader, p1load, propeller-loader, out on github, but these all appear to require propgcc. While propgcc is a fine tool, it is not used in a "spin only form the command line" environment, and just causes extra headaches.
Several users have made their own prop loaders, but along with not being supported by parallax, these appear to be derived from the propgcc code and also have all the propgcc support which is gets in the way.
This is request is for a parallax supported command line tool (in support of OpenSPIN users), for loading the OpenSPIN output compiled image to the prop, without the propgcc extra baggage, for linux, windows, and OSX.
Is this the best way to make this request to parallax?
Also, if such a tool exists, and I missed it, please point me to it.
Thanks!
the ploadlib module in the gcc complier for the prop has this code (to load a compiled raw image to the prop), and can be obtained as shown in heater's post (from May 23) below
Here is an example linux command line that will load an OpenSPIN compiled image file "SPINimage.eeprom" to eeprom, and begin execution:
./pload /dev/ttyUSB0 SPINimage.eeprom -p3
Now the original request is changed, to have a note in the OpenSPIN readme, containing either the information from heater's post, or some directions how to find and use the ploadlib.c support for OpenSPIN.
Cheers!
Original post:
Hi Parallax
Users of OpenSPIN seem to be lacking a tool to load the propeller 1.
Our "build and test automation" code for generating new kernels and application images requires launch from a program script command line, and so anything that must be operated via GUI will not work.
While there are tools that load the P1, there are none that are both supported and stand-alone from the command line.
* Brad's Spin Tool still works of course, but it has no source code, and if a problem ever arises, there would be no way to fix it.
* There are proploader, p1load, propeller-loader, out on github, but these all appear to require propgcc. While propgcc is a fine tool, it is not used in a "spin only form the command line" environment, and just causes extra headaches.
Several users have made their own prop loaders, but along with not being supported by parallax, these appear to be derived from the propgcc code and also have all the propgcc support which is gets in the way.
This is request is for a parallax supported command line tool (in support of OpenSPIN users), for loading the OpenSPIN output compiled image to the prop, without the propgcc extra baggage, for linux, windows, and OSX.
Is this the best way to make this request to parallax?
Also, if such a tool exists, and I missed it, please point me to it.
Thanks!
Comments
However there is a stand alone Propeller loader in the propgcc repository. One can download the propgcc source code and then just build that loader, no need to build all of propgcc.
I have done this, hence the pi-propeller-load I linked you to earlier.
The details of actually extracting the "official" loader from propgcc I can't describe at the moment. I have no way to test what I say here.
This is a hole Parallax should fill.
Not on the Parallax github repo. As far as I know not cross-platform and not open sourced.
Basically it does not exist as far as I can perceive.
https://www.parallax.com/downloads/propellent-library-and-executable-source-code
Here is the load prop method found in the command line version:
That way the entire process can be managed from any GUI that supports the command line, a hacker's paradise. With the advent of Windows 10 machines that cost some fraction of $100, I no longer care about cross-platform support. I am now convinced that any bot I build will either have a Win 10 machine or none at all. It only makes sense to develop on the compute platform that I plan to put in my bots. The GUI is a huge issue, that I could solve myself... except that PropellerTool is closed off from the command line.
I don't want my projects to be beholden to a single company, even if the hardware and software were free. So cross-platform support is still essential.
propgcc standalone downloader was not actually standalone, it relied on the rest of propgcc to work, and so did not work for me. I ended up using David Betts' version, but this is not official parallax, and is an extra step that should be included in the tool anyway, which is the purpose of this request. Yes, I do believe this is a hole parallax should fill.
Propellant is windows, and so is not usable, the tool must be windows, OSX, and windows.
Xojo is not free open source, and is not acceptable. Particularly $100 each license, and needing tweaks and further work. Typically this means lots of work, and maintenance headaches.
Again, this is for our automated build and test suite for PropFORTH. The process is run entirely from the command line and must be identical as possible on each OS. We start with a simple kernel written in spin (and compiled by OpenSPIN), and load that into the prop. Previously we used Brads Spin tool, but that is not supposed; when something inevitably goes wrong with it, we face problems. The PC side should be supported by the provider (parallax) for maintainability and compatibility. We know we are at risk, and wish to replace the unsupported bst loader with an official parallax supported loader.
The dozens of loader that are out there are all fine, but since they are not supported by parallax, are also at risk; ultimately these require us to support and maintain the loader ourselves, which is undesirable. If we need to write and maintain our own loader, that is always a possibility. That would be one more detour that we don't need.
In summary:
CAN PARALLAX PROVIDE THE SIMPLEST, MOST BASIC COMMAND LINE TOOL TO LOAD A RAW COMPILED IMAGE TO THE P8X32A, AND INCLUDE SOURCE CODE FOR WINDOWS, LINUX, AND OSX? This is an omission from the OpenSPIN tool, and should be addressed.
Thanks again!
Is there still a "suggestions to Parallax" mailbox I can sent this to? I can't seem to find one, and no parallax person has responded to this thread.
But really, checkout the prop-gcc source code. This is "official" Parallax supported. Compile PropellerLoadLIB.c, or PropLoadLIB.c or whatever it is called, by itself. It is a very small and simple, stand alone, loader program with no dependencies. You don't need to build the rest of prop-gcc to do this. Or even keep the source around.
Despite it's name PLoadLib.c is a complete stand alone loader. It has a main() function that is taken into use if you #define MAIN. It only needs a couple of other files to provide serial communication on whatever platform you are using, osint_XXX.c and osin_XXX.h.
Here is one can fetch those files from the prop-gcc repository and build a stand alone loader that runs on Linux: There we have it. One official, fully supported, standalone Popeller 1 loader.
Yes, it loads, but I neglected to specify that the need is to load AND save to epprom.
Is there a simple way to load to eeprom using this function?
Have a look through the code, find the main() function, I think the command line argument set a variable called "mode" or "type" or something.
#define DOWNLOAD_EEPROM 2
#define DOWNLOAD_RUN_EEPROM 3
#define DOWNLOAD_SHUTDOWN 4
Examples:
propeller-load has the following optional parameters:
The actual loader part of the code is the same, there are just 2 different entry points that can be compiled to create the executable loader as pload or propeller-load.
dgately
Thanks everybody!