[FYI] PropWare: Complete build system and library for PropGCC
DavidZemon
Posts: 2,973
Dead links to PropWare: If you encounter any dead links to PropWare, please do not assume the site is dead! Many pages have moved over time and the file extension has changed from html to xhtml. If you're looking for a specific page, tag me with @DavidZemon and I'll get you the correct link!
I'd like to formally introduce PropWare - my way of giving relative simplicity to beginners and power to experts.
Inspiration
I've drawn inspiration from a lot of different projects over the years, but there are three big ones that helped to form PropWare into what it is today more than anything else.
Arduino
Arduino is the king of "easy" in the microcontroller world. Though they aren't the fastest, and they aren't the cheapest, they have a monopoly on documentation and users. I use www.arduino.cc as my benchmark for ease of use and documentation standards.
TI's TivaWare
My first introduction to a hardware abstraction layer was with TI's StellarisWare (now called TivaWare). It opened my eyes to a new world where I would be able to develop a complex application on a microcontroller, accessing all of its hardware peripherals, without needing to pull out the datasheet every minute. I believe I can reproduce the same power and flexibility on the Parallax Propeller.
@SRLM's libpropeller
SRLM's libpropeller was the wake up call that convinced me not only to use C++, but to use header files as much as possible. It has also given me a constant drive to add more peripherals and objects, simply for competition's sake, even before there were many users.
Overview
PropWare is a combination of three key pieces:
Installation binaries make setup easy, and CMake functions make building complex applications quick. If you are an Eclipse user, CMake provides a simple command that will generate an Eclipse project (no need for a special Propeller plugin!). Students can take free advantage of JetBrains' new C++ IDE, (CLion), which supports CMake out-of-the-box and is the recommended tool for use with PropWare applications.
Goals and Aspirations
My goal is to provide both novice and expert users alike a single environment that approaches the simplicity of SimpleIDE or Arduino without compromising power or flexibility. I believe it is possible to create a single environment capable of introducing first-time programmers to the Propeller, as well as satisfying a commercial-grade applications. There are lots of ways PropWare doesn't fit into this vision currently, but it is an active and ongoing effort to make improvements every day.
Original post below
What is PropWare?
PropWare is a combination of three key pieces:
All source code has been MIT licensed and hosted on GitHub with documentation and binaries available from my website.
I have to give a huge thank you out to everyone here on the forums that have helped me get this far - jazzed, srlm, ericpine, pmrobert, David Betz, and many others.
Key Features:
Relevant links:
PropWare: https://david.zemon.name/PropWare/
Issue Tracker: https://github.com/parallaxinc/PropWare/issues
libpropeller: https://github.com/libpropeller/libpropeller
C Learning System: http://learn.parallax.com/propellerc
Cheers,
David Zemon
I'd like to formally introduce PropWare - my way of giving relative simplicity to beginners and power to experts.
Inspiration
I've drawn inspiration from a lot of different projects over the years, but there are three big ones that helped to form PropWare into what it is today more than anything else.
Arduino
Arduino is the king of "easy" in the microcontroller world. Though they aren't the fastest, and they aren't the cheapest, they have a monopoly on documentation and users. I use www.arduino.cc as my benchmark for ease of use and documentation standards.
TI's TivaWare
My first introduction to a hardware abstraction layer was with TI's StellarisWare (now called TivaWare). It opened my eyes to a new world where I would be able to develop a complex application on a microcontroller, accessing all of its hardware peripherals, without needing to pull out the datasheet every minute. I believe I can reproduce the same power and flexibility on the Parallax Propeller.
@SRLM's libpropeller
SRLM's libpropeller was the wake up call that convinced me not only to use C++, but to use header files as much as possible. It has also given me a constant drive to add more peripherals and objects, simply for competition's sake, even before there were many users.
Overview
PropWare is a combination of three key pieces:
- Easy, configurable and fast C/C++ objects for the Propeller, including objects from
- My own PropWare namespace
- Parallax's C Simple Library
- SRLM's libpropeller
- Arduino library port: libArduino
- An easy-to-use and robust build system using CMake
- Thorough documentation and tutorials
Installation binaries make setup easy, and CMake functions make building complex applications quick. If you are an Eclipse user, CMake provides a simple command that will generate an Eclipse project (no need for a special Propeller plugin!). Students can take free advantage of JetBrains' new C++ IDE, (CLion), which supports CMake out-of-the-box and is the recommended tool for use with PropWare applications.
Goals and Aspirations
My goal is to provide both novice and expert users alike a single environment that approaches the simplicity of SimpleIDE or Arduino without compromising power or flexibility. I believe it is possible to create a single environment capable of introducing first-time programmers to the Propeller, as well as satisfying a commercial-grade applications. There are lots of ways PropWare doesn't fit into this vision currently, but it is an active and ongoing effort to make improvements every day.
Original post below
What is PropWare?
PropWare is a combination of three key pieces:
- Easy, configurable and fast C++ objects for the Propeller (includes the C Simple Library from Parallax, libpropeller by SRLM, and my own PropWare namespace)
- An easy-to-use and robust build system using CMake (lots of examples for anyone not yet familiar)
- Thorough documentation regarding both source code and setup
All source code has been MIT licensed and hosted on GitHub with documentation and binaries available from my website.
I have to give a huge thank you out to everyone here on the forums that have helped me get this far - jazzed, srlm, ericpine, pmrobert, David Betz, and many others.
Key Features:
- More C++ for the Propeller!
- CMake for the Propeller!
- Support for Eclipse, CLion and other full-featured IDEs!
- Active development - I'm open to requests for new objects/peripherals!
Relevant links:
PropWare: https://david.zemon.name/PropWare/
Issue Tracker: https://github.com/parallaxinc/PropWare/issues
libpropeller: https://github.com/libpropeller/libpropeller
C Learning System: http://learn.parallax.com/propellerc
Cheers,
David Zemon
Comments
Installation
- Linux installation is very well tested and working great.
- Windows installation has succeeded on 4/5 computers tested. Please give it a try and report your results.
- Mac is untested. If you have a Mac, please get in contact with me.
MiscellaneousWhere do I get started for testing INSTALL.py on Linux?
I also realized this morning that, if you have cmake installed via apt-get, the script will fail upon trying to copy over the module files. You'll need to tell it to download a new version (again, there's a prompt for it). I'll get that fixed tonight. Along with searching for PropGCC in /opt/parallax if it isn't in $PATH.
--EDIT--
All Linux problems should be sorted out. If anyone runs into any issues or anything at all confusing with the INSTALL.py script in release-2.0-nightly, please let me know! Also, I still don't have a single test user for this. If there are any Linux users out there willing to give it a try, I'd appreciate it. I've run it in on a test machine with a fresh version of Ubuntu as well as my normal dev machine, but I need more test cases.
Also, minor bug fix involving root environment variables for Debian users has been applied to the release-2.0-nightly branch.
Still no progress on Windows I've run into a brick wall. Hopefully it will be resolved soon.
Steve:
I added some installation instructions just for you
I have been too busy to try your installer.
Not sure when I'll have time.
Another minor bug fixed where root environment variables on Debian were never actually written to /etc/environment.
Thanks kuroneko!
I will soon add support for Spin as well - for now the only extra addition was .dat files (Simple ships with pst.dat and pst.spin).
Also, the Learn folder has been updaed to 8/27. The previous link (7/30) went down so if you try to run INSTALL.py without updating to the latest branch, it will die. I've also fixed that by mirroring the Learn folder on my server.
CMake & Make Tutorial: http://david.zemon.name/PropWare/md_CMakeTutorial.html
At the time of this writing I have tested on a total of four machines: Windows 8.1 64-bit virtual machine (working), Windows 7 32-bit virtual machine (working), Windows 8.1 64-bit native (not working), Windows 8.1 64-bit (working). That's 3 out of 4 working computers. I do not yet know what is wrong with the machine that isn't working. I would love to hear from more users whether or not PropWare installs successfully on their machines and, if not, what their setup is.
Installation will require Python. See instructions PropWare's installation instructions here.
--Edit--
4/5 working
Anyone know if the name conflict is important enough to matter? I don't want to step on any toes, so I'll rename if I must, but I obviously would prefer not to. I couldn't find contact information anywhere on that site nor an author.
Do not worry at all.
I am the author and this project is on ice since two years. And might stay there.
You are absolutely free to use PropWare for your own project.
Do not worry at all.
Enjoy!
Mike
David
I am always interested in getting the opinions/views of more beginners. It's been many years since I was in your shoes and I know I've forgotten what it's like.
I'm all for you writing or helping me write a beginners guide. I think I already have a strong start on that though, so rather than creating another new page, it will probably be an addition or revamp to an existing page within PropWare's docs.
Glad to hear the installation was successful . Get used to the less-than-useful completion notes. It's a Linux/Unix standard philosophy to only print upon error, not upon success.
The key to this is in my goal with PropWare: "to provide both novice and expert users alike a single environment that approaches the simplicity of SimpleIDE or Arduino without sacrificing a single ounce of power or flexibility." Think of it like this: SimpleIDE and Arduino are shovels, PropWare is a bulldozer. The shovel is easy, you don't need any training, and you can get started real quick digging your hole. But.... if you take 5 minutes to learn how to operate the bulldozer, you're not even in the same league anymore. PropWare (when combined with JetBrains' CLion or Eclipse) is the bulldozer. (Obviously this is meant in every literal sense and I am not in any way biased )
Regarding build system vs text editor, you are exactly right. PropWare does not provide an editor because it does not sacrifice flexibility. But I highly recommend using JetBrains' CLion with PropWare. It is my go-to editor and the power it brings will amaze you. It is not yet as easy as one would hope, because it was not in any way, shape, or form designed to be used with microcontrollers... but it works nonetheless. It's still in beta stages, but support for microcontrollers is one of the top-voted issues by beta users so I'm hopeful that it will get easier soon.
Eclipse and Code::Blocks are two more options. If you're on a Mac, XCode will work. All three of those IDEs are good choices (Eclipse is the only one I'm familiar with, so you're on your own for help if you choose the other two). Support for these three is more stable, but less flexible (not in my hands to fix).
Getting started....
Let's see... next I'd say you're ready to write a program. Check out Creating a PropWare Application and let me know what questions you have after that. You may want to look at the examples and practice with those (MultiCogBlinky and Concurrency are good ones to start with since they require no additonal hardware other than a Quickstart board). Also, make sure you read the CMake and Make Tutorial.
Within the PropWare installation webpage, you should give a link to the git repository or the PropWare binary page wherever you mention downloading PropWare. I know that there are links on page one, but why not give the reader a link right where you describe installation?
For Windows:
http://david.zemon.name/downloads/PropWare_Binaries/PropWare_current.zip <== a good link for those wanting binaries!
[FONT=Roboto, sans-serif]I was starting to research what it would take to provide instructions for Mac OS X, but got a bit frustrated being sent to the namespace definition of PropWare when I expected to download. You may find casual webpage readers less interested in going further if the links are somewhere back at the main page, only.[/FONT]
dgately
Very good point! Can't believe I didn't think of that myself lol. It will be updated momentarily...
_Edit_
Fix applied
When I run the install process on a Mac OS X system that has a recently-built propgcc release_1_0 version installed, I get the following message:
Looks like you are using a newer branch of propgcc than the currently released version (release_1_0). Is that a requirement due to the needs of PropWare or did you just happen to use a newer propgcc for your implementation? I definitely don't want to step on my installed propgcc as I'm doing development work that depends on release_1_0 existing and its PATH set to /opt/parallax/bin.
As implied above, I could allow PropWare to install propeller-elf-as & other executables into my user space (at: /Users/myLogin/), but I also don't want my other development work pointing at this new location, either. Do you set environment paths that I'll need to edit back to /opt/parallax/bin when I'm not using PropWare?
Or, will PropWare run with propgcc release_1_0? If so, can I just mod INSTALL.py to remove installation of propeller-elf-as and/or other executables?
Thanks,
dgately
To compile PropWare from source requires the assembler listed above. What you could do is edit the Python script to not bother checking the version number (let me know if you need help with that. I didn't make any effort to document it). Once you run the installation script again, it will fail because propeller-elf-as will die. Once it does, just delete the entire `bin` folder and replace it with one from a binary distribution of the same branch. Do not run make or cmake (or the install script) after replacing the bin folder.
To answer your other questions directly (which no longer matter if you follow my instructions above)...
The install script does add the new version of PropGCC to the PATH in your .bashrc file. It also adds cmake to the PATH and creates two new variables: PROPWARE_PATH and PROPGCC_PREFIX.
There should be some TODOs in the installation script in the MacInstaller class. I haven't yet figured out the best/least-bad way to set root environment variables so that GUI applications will have access to the PROPWARE_PATH and PROPGCC_PREFIX environment variables (they're used in the CMake files and are therefore required by an IDE reading from the CMake or Make files).
Thanks!
I'll take a look at the script to see about making it work in my environment and I'll make a script that can reverse any environment settings. Should allow me to use PropWare and still do my other development work!
dgately
Great Send me an email with some notes if you make any progress toward root env. vars on mac. I think that was my biggest hurdle.
OK i started at Creating a PropWare Application
1. CMakeLists.txt OK I understand
2. Write your Sourcecode - yeah! that's where I have to practice before going on with
"3. At the terminal, enter your project's directory..... "
will take some time to do this. I guess for learning coding in C is
http://learn.parallax.com/propeller-c-start-simple
I guess this will take several days (or maybe weeks) until I'm ready to go on with PropWare 3.
David If you see a way to take a short path towards PropWare tell me so.
Maybe a graphic that shows how it all plays together helps to get the overview?
To get an overview I need information about which part is doing what.
As far as I understand it I write sourcecode. Then I have to start the compiler. The compiler creates the compiled code that is downloaded into the propellers EEPROM.
So does PropWare do all the details about where is which file on the harddisk , switching on/off compiler-options etc in the MakeFile?
pretty unsure if I understand it right. Through writing this you know what my questions are and where to correct misunderstanding.
best regards
Stefan
Sorry if there are any typos. It should compile but I just wrote it right here in the forums and haven't tested it.
I can create a graphic when I get home for you.
- Prepare CMakeLists.txt file (don't have to do this first, but it makes working with your IDE a lot easier if this is the first step)
- Your entire project is described within this file. You tell it where your source files are, you tell it what compilation flags are used, you tell it what the output should look like. Everything that can possibly describe your project is within this file.
- Write source code
- That's a whole semester (or life) long class in itself. I won't dive into it in this post
- Generate Makefiles and compile/test
- As noted in CMake and Make Tutorial, Make is cool little program that incrementally compiles our program for us. CMake is a cool little program that writes the Make source code for us (because Make more complex than we need)
- compiling is as simple as typing "make" at the terminal. Based on your CMakeLists.txt file from step 1, your program will be compiled with a specific set of compilation flags, source code, etc.
- Testing your program is almost identical to compiling. Just add "debug" to the end of your Make command (aka, type "make debug" at the terminal).
- "make debug" writes to RAM and starts a serial terminal with the Propeller for debugging purposes. EEPROM is not overwritten
- "make run" writes to EEPROM and does not start a serial terminal with the Propeller
Let's see if I can draw this in text...Thankfully, most of this is done for you (most of the work that I did with PropWare was making this step as easy as possible).
Notice that the last step is any one of the three: compile, debug, or write to EEPROM. They are not dependent on each other. Make is smart enough that if you type "make debug" or "make run" and your program isn't compiled yet (or the files have changed), it will [re]compile your program before attempting to program the chip.
Thx, Mike
Do you mean PropGCC or PropWare? The post written below was based on you asking about PropWare - I didn't notice until just now that you typed GCC
Original reply:
release-2.0 is the most stable version. Updates come anywhere from once every couple days to once every couple weeks. The release-2.0 branch will always be what is *planned* for v2.0. When v2.0 comes out of beta and a *final* release is made, it will be merged back into master.
release-2.0-nightly is where all of my development work goes. Updates might come anywhere between 2-3 times a week and 20 times per day. Of course, I try to ensure everything works before making a commit, but don't curse me out if I commit a bug to that branch . If you want to be on the bleeding-edge of PropWare, this is the branch.
For anyone else reading this post that wants to know which binary distribution, just take "current". Don't worry about which branch/commit it is.
Okay. I'm using the "default" branch from here. I think the version bundled with PropWare is one commit behind now, not sure. Haven't paid too much attention since the changes are pretty negligible.