Shop OBEX P1 Docs P2 Docs Learn Events
PropGCC on GitHub - Page 2 — Parallax Forums

PropGCC on GitHub

2

Comments

  • I thought I would give a brief overview of my current compiler setup. Since I have SimpleIDE installed, it also installed PropGCC on drive C (Windows 7). What I did is download GCC4 and GCC5, and I just make a copy of one or the other to the propeller-gcc folder.
    I use Geany as the quick and dirty editor, but you can use just about any editor to work with your files. I also created a .bat file that automates the compiling and loading of your project. Now that I do not have easy access to the simpletools lib, I created a misc.c file which I have added some of the commonly used functions. An example of a compile is: 'propeller-elf-gcc -Wall -mxmmc -o c3xsensor.o c3xsensor.c misc.c', and now it is easy enough to edit the .bat file to get your desired results.
    The only problem with not being able to use SimpleIDE is, now you have to add all the specific code to get access to the serial port, and the uSD, just to name a few. I can see my misc.c file growing in size already. Now where did I put the example code for doing just that?
    Ray 


  • I thought I would give a brief overview of my current compiler setup. Since I have SimpleIDE installed, it also installed PropGCC on drive C (Windows 7). What I did is download GCC4 and GCC5, and I just make a copy of one or the other to the propeller-gcc folder.
    I use Geany as the quick and dirty editor, but you can use just about any editor to work with your files. I also created a .bat file that automates the compiling and loading of your project. Now that I do not have easy access to the simpletools lib, I created a misc.c file which I have added some of the commonly used functions. An example of a compile is: 'propeller-elf-gcc -Wall -mxmmc -o c3xsensor.o c3xsensor.c misc.c', and now it is easy enough to edit the .bat file to get your desired results.
    The only problem with not being able to use SimpleIDE is, now you have to add all the specific code to get access to the serial port, and the uSD, just to name a few. I can see my misc.c file growing in size already. Now where did I put the example code for doing just that?
    Ray 




    Of course, propeller-gcc comes with support for the serial port and SD card access. It just doesn't work like SimpleLibraries. Instead, it's ANSI C compatible. It's beginning to look like it won't really work to have just binary propgcc downloads. We really need full SimpleIDE installers that use each version of PropGCC. That may take some time unfortunately since, as you mentioned, Steve hasn't been around for a while.
  • Heater.Heater. Posts: 21,230
    edited 2015-07-13 19:59
    Ray,

    I appreciate your exception to my exception. And I am happy to hear your, or any ones, opinion

    However I think the whole phenomena of this and other forums and indeed the internet itself is a bit more subtle than investing "sweat equity". I don't believe anyone does that.

    Certainly people come here to ask questions and get solutions to their own problems. We see that with people who have bought a Parallax widget and just want to get it working. We see this all the time with guys obviously wanting to get their assignments done for college or university. We could say that is a totally selfish desire to get a positive result for themselves and they have no further input.

    Certainly there are people around who market products which are in turn based on Parallax products and they would like to stimulate their business by posting about their products and projects here.

    But, what about the vast ocean of people who are just interested, in whatever small way, in electronics, micro-controllers, the Propellers and STAMPS and so on. People who live in far flung places where they have nobody around with which to discuss their interests, passions and creations?

    They just want to communicate with people with similar interests. And here we are!

    I hate to use the common term of "community". We are all here for our own selfish reasons: solutions, profit, company, self aggrandisement, whatever.

    But the end result of all this is a very valuable asset for Parallax. Ergo, we have a right to complain if need be.

    Like you, and many others, I can bail out at any time. There are plenty of other interesting things to do if this all becomes too much like hard work.

    Bottom line is, this "community", this forum, this valuable asset that Parallax has, can vaporize in a moment if not managed well.
  • I thought I would give a brief overview of my current compiler setup. Since I have SimpleIDE installed, it also installed PropGCC on drive C (Windows 7). What I did is download GCC4 and GCC5, and I just make a copy of one or the other to the propeller-gcc folder.
    I use Geany as the quick and dirty editor, but you can use just about any editor to work with your files. I also created a .bat file that automates the compiling and loading of your project. Now that I do not have easy access to the simpletools lib, I created a misc.c file which I have added some of the commonly used functions. An example of a compile is: 'propeller-elf-gcc -Wall -mxmmc -o c3xsensor.o c3xsensor.c misc.c', and now it is easy enough to edit the .bat file to get your desired results.
    The only problem with not being able to use SimpleIDE is, now you have to add all the specific code to get access to the serial port, and the uSD, just to name a few. I can see my misc.c file growing in size already. Now where did I put the example code for doing just that?
    Ray 




    Of course, propeller-gcc comes with support for the serial port and SD card access. It just doesn't work like SimpleLibraries. Instead, it's ANSI C compatible. It's beginning to look like it won't really work to have just binary propgcc downloads. We really need full SimpleIDE installers that use each version of PropGCC. That may take some time unfortunately since, as you mentioned, Steve hasn't been around for a while.

    Now I am starting to see just how much work was put into SimpleIDE by Steve(jazzed), but I think he is gone for good. Andy also did a very good job with simpletools, but as you say, it is surely missing "full SimpleIDE installers that use each version of PropGCC". And when you say it may take some time, unfortunately that could be years, if ever. Their has to be a better way of getting this done, but I cannot think of anything.
    Ray

  • I thought I would give a brief overview of my current compiler setup. Since I have SimpleIDE installed, it also installed PropGCC on drive C (Windows 7). What I did is download GCC4 and GCC5, and I just make a copy of one or the other to the propeller-gcc folder.
    I use Geany as the quick and dirty editor, but you can use just about any editor to work with your files. I also created a .bat file that automates the compiling and loading of your project. Now that I do not have easy access to the simpletools lib, I created a misc.c file which I have added some of the commonly used functions. An example of a compile is: 'propeller-elf-gcc -Wall -mxmmc -o c3xsensor.o c3xsensor.c misc.c', and now it is easy enough to edit the .bat file to get your desired results.
    The only problem with not being able to use SimpleIDE is, now you have to add all the specific code to get access to the serial port, and the uSD, just to name a few. I can see my misc.c file growing in size already. Now where did I put the example code for doing just that?
    Ray 




    Of course, propeller-gcc comes with support for the serial port and SD card access. It just doesn't work like SimpleLibraries. Instead, it's ANSI C compatible. It's beginning to look like it won't really work to have just binary propgcc downloads. We really need full SimpleIDE installers that use each version of PropGCC. That may take some time unfortunately since, as you mentioned, Steve hasn't been around for a while.

    Now I am starting to see just how much work was put into SimpleIDE by Steve(jazzed), but I think he is gone for good. Andy also did a very good job with simpletools, but as you say, it is surely missing "full SimpleIDE installers that use each version of PropGCC". And when you say it may take some time, unfortunately that could be years, if ever. Their has to be a better way of getting this done, but I cannot think of anything.
    Ray



    Is there any reason you can't use the standard ANSI libraries instead of Simple Libraries?
  • As I mentioned in the other post, the ANSI libraries is the direction that I am heading. The last time I used those was what three or four years ago. All I can remember, off the top of my head, for serial is ...SER... , which is not doing me very much good.
    For the uSD card usage, I think I still have Dave Hines C file that covered that. Boy am I getting sloppy with my old C files, I do not know where they are at. When you use something as convenient as SimpleIDE, and then you have drop back, I am completely lost. I guess it is kind of like, if you lost you calculator could you still do multiplication in your head, let alone division?
    Ray
  • I guess I'm confused. If you liked SimpleIDE then why did you stop using it? Is it because it doesn't currently support xmmc running in multiple COGs?
  • Heater.Heater. Posts: 21,230
    edited 2015-07-13 20:50
    Ray,
    There is a another way.
    prop-gcc is a compiler. If people are interested in updating and keeping that working that is great.
    Any propeller loader is, well a loader, there are many of those.
    Simpletools is, well, I have no idea about that.
    SimpleIDE is a an IDE, I would like to think that any IDE or editor is usable with the above projects.
    If Parallax cares to integrate all of those into a single tool that supports their products, that is great.
    If not, hopefully we have the compilers and loaders still.
  • I guess I'm confused. If you liked SimpleIDE then why did you stop using it? Is it because it doesn't currently support xmmc running in multiple COGs?

    Yes, and that is why I started this thread because I wanted to see for myself how the multiple COGs in XMMC would work. If I have to go back too scratch PropGCC mode, then so be it. It would not be the first obstacle that I would have to overcome.
    I really hope this is a learning lesson for some of the new people that are interested in using PropGCC with the Propeller.
    Ray

  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-07-14 00:14
    Re: Gotta have SimpleIDE so that everything plays nicely together
    Not true! :D That's where my real work comes in. Do please check out PropWare. It was made for you - the kind of person that thinks SimpleIDE isn't quite for them and prefers either easy command-line tools, or a more powerful IDE like Eclipse and CLion. I'd say to just look at my signature... but... :/
    check out PropWare's home page: http://david.zemon.name/PropWareIn short, I wrapped up my own classes, the classes from libpropeller and Simple in such a way that you can use any/all of them without have to compile via SimpleIDE or manually copying required files into your project. I think you'll like it a lot.
    I think the classes in the PropWare:: namespace are fantastic. Obviously I do - I wrote them. But even if you don't like my style, or C++ in general, PropWare gives you access to a build system that utilizes PropGCC and the full suite of libraries in Simple Tools.
  • I guess I'm confused. If you liked SimpleIDE then why did you stop using it? Is it because it doesn't currently support xmmc running in multiple COGs?

    Yes, and that is why I started this thread because I wanted to see for myself how the multiple COGs in XMMC would work. If I have to go back too scratch PropGCC mode, then so be it. It would not be the first obstacle that I would have to overcome.
    I really hope this is a learning lesson for some of the new people that are interested in using PropGCC with the Propeller.
    Ray



    Now I'm really confused. I think somehow your setup must be wrong. I just did a fresh checkout of the propeller-gcc github project and built it for the gcc5 compiler and I am able to run your code perfectly well on my DNA board. As I mentioned before, you need to use "-b dna:spi-flash" with propeller-load to use the SPI flash chip on the DNA board. Otherwise, it built and ran out of the box.
    As an aside, doing what I just mentioned actually gives you a GCC6 toolchain. I guess Eric's gcc5 github repository is actually tracking the gcc development branch.
  • As an aside, doing what I just mentioned actually gives you a GCC6 toolchain. I guess Eric's gcc5 github repository is actually tracking the gcc development branch.

    Awesome! I love it :)
  • Are there any plans to release binaries with the latest PropGCC improvements?  It seems a shame that the latest fixes and enhancements aren't getting out to most of the users.
  • Are there any plans to release binaries with the latest PropGCC improvements?  It seems a shame that the latest fixes and enhancements aren't getting out to most of the users.

    I'm working on that with Parallax now. 
  • Are there any plans to release binaries with the latest PropGCC improvements?  It seems a shame that the latest fixes and enhancements aren't getting out to most of the users.

    Sorry for the duplicate reply but I think SwimDude0614 answered your question above. There is already a place where you can download the latest builds of the development repositories.
  • Are there any plans to release binaries with the latest PropGCC improvements?  It seems a shame that the latest fixes and enhancements aren't getting out to most of the users.

    Sorry for the duplicate reply but I think SwimDude0614 answered your question above. There is already a place where you can download the latest builds of the development repositories.

    OK, that's great, but they probably won't get out to most users until they are part of an official Parallax release.  But it is good to know that binaries are available.
  • Are there any plans to release binaries with the latest PropGCC improvements?  It seems a shame that the latest fixes and enhancements aren't getting out to most of the users.

    I'm working on that with Parallax now. 

    Dave (Betz), I hope you are looking into compiling the latest sources on OS X... I've not been able to get past compiling binutils or gcc portions of the code due to library linking issues (seems that some of the .a files are not created as x86_64)... Anyway, just a thought!
    dgately
  • Are there any plans to release binaries with the latest PropGCC improvements?  It seems a shame that the latest fixes and enhancements aren't getting out to most of the users.

    I'm working on that with Parallax now. 

    Dave (Betz), I hope you are looking into compiling the latest sources on OS X... I've not been able to get past compiling binutils or gcc portions of the code due to library linking issues (seems that some of the .a files are not created as x86_64)... Anyway, just a thought!
    dgately

    I use a Mac as my main machine so I am always compiling for OS X. If I source the "fix-xcode-warnings.sh" file before building I don't have any trouble.
  • dgatelydgately Posts: 1,630
    edited 2015-07-14 14:44
    Are there any plans to release binaries with the latest PropGCC improvements?  It seems a shame that the latest fixes and enhancements aren't getting out to most of the users.

    I'm working on that with Parallax now. 

    Dave (Betz), I hope you are looking into compiling the latest sources on OS X... I've not been able to get past compiling binutils or gcc portions of the code due to library linking issues (seems that some of the .a files are not created as x86_64)... Anyway, just a thought!
    dgately

    I use a Mac as my main machine so I am always compiling for OS X. If I source the "fix-xcode-warnings.sh" file before building I don't have any trouble.

    Yes, I source the that file as well... What XCode version & OS X version are you using? (me: XCode 6.4, OS X: 10.10.4) I'm starting to wonder if I've downloaded something with homebrew that is getting in the way of XCode's command-line tools :-(   Perhaps, I'll start another thread with this issue.
  • Are there any plans to release binaries with the latest PropGCC improvements?  It seems a shame that the latest fixes and enhancements aren't getting out to most of the users.

    I'm working on that with Parallax now. 

    Dave (Betz), I hope you are looking into compiling the latest sources on OS X... I've not been able to get past compiling binutils or gcc portions of the code due to library linking issues (seems that some of the .a files are not created as x86_64)... Anyway, just a thought!
    dgately

    I use a Mac as my main machine so I am always compiling for OS X. If I source the "fix-xcode-warnings.sh" file before building I don't have any trouble.

    Yes, I source the that file as well... What XCode version & OS X version are you using? (me: XCode 6.4, OS X: 10.10.4) I'm starting to wonder if I've downloaded something with homebrew that is getting in the way of XCode's command-line tools :-(   Perhaps, I'll start another thread with this issue.<script type="text/javascript" src="safari-extension://com.ebay.safari.myebaymanager-QYHMMGCMJR/1a3e5c51/background/helpers/prefilterHelper.js"></script>


    Xcode 6.4 and OS X 10.10.3 although I'll likely update OS X soon.
  • RsadeikaRsadeika Posts: 3,837
    edited 2015-07-14 18:13
    A question about the propeller-load comments after the load:
    9808 bytes sent
    Verifying RAM ... OK
    Loading external memory driver 'c3_xmem.dat'
    968 bytes sent
    Loading program image to flash
    10776 bytes sent
    Loading .xmmkernel
    1984 bytes sent
    How do you arrive at the actual amount of memory that is being used on the C3?
    The other question, off the top of my head, since I am now able to use the xmmc mode, how efficient would it be to use commands like 'cout' and 'cin' with CPP? Would it be a much larger overhead then using 'printf'?
    Ray
  • A question about the propeller-load comments after the load:
    9808 bytes sent
    Verifying RAM ... OK
    Loading external memory driver 'c3_xmem.dat'
    968 bytes sent
    Loading program image to flash
    10776 bytes sent
    Loading .xmmkernel
    1984 bytes sent
    How do you arrive at the actual amount of memory that is being used on the C3?
    The other question, off the top of my head, since I am now able to use the xmmc mode, how efficient would it be to use commands like 'cout' and 'cin' with CPP? Would it be a much larger overhead then using 'printf'?
    Ray


    In your example, the ".text" section of your program was 10776 bytes. You can't tell from the output of propeller-load how much hub is used for the ".data" and ".bss" sections.
    If you drag in all of libstdc++ you will use a huge amount of memory. I think there is a tiny library that supports just cout. I would use the normal C I/O functions though. They are somewhat smaller.
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-07-14 22:47
    how efficient would it be to use commands like 'cout' and 'cin' with CPP? Would it be a much larger overhead then using 'printf'?



    Like David Betz said, libstdc++ is very large. The tinystream library gives you most of the important functionality for cout and cin. Another option you can use is GettingStarted example shows it in action.
  • This morning I was experimenting with adding the 'simpletools' functionality to a PropGCC environment, so far it looks like no easy task.
    I tried the simplest approach, just add 'simpletools.h' and a path to where it is located, in your main C file, that did not work. I guess in SimpleIDE it has some way of making the folders associated with 'simpletools' readily available.
    Last night I ran into a little problem, I added the sht11.c file to my special program. Well, at compile time it came up with quite a few fatal errors, and they were based on the fact that the sht11.c file contained 'simpletools.h', so it was looking for stuff that it could not find.
    Anybody have any ideas as to how you can provide the usage of the 'simpletools.h' world to a development area that is not SimpleIDE?
    Ray
  • For some reason, Parallax does not want to include the Simple Tools library or header files with the standard PropGCC distribution. In fact, as I understand it, Simple Tools is not a library at all. It's included in source form with your project when you build it in SimpleIDE. I'm also not sure why they did that.
  • After looking through the Learn folder, I did notice that there are no library files. They do contain files with names like libsimpletools.c, but no libraries. Now I am wondering what kind of "magic" Andy is using within SimpleIDE to keep all this functional? I guess from the Parallax perspective, maintaining C files is lot easier than maintaining C files with the accompanying libraries.
    This could very confusing and awkward, if you have to add a bunch of simpletools related files to every special program that you will be creating. So far I have not even thought about or attempted to make my own libraries within a PropGCC environment.
    I am really starting to reconsider the usefulness of such a programing environment. But on the other hand just using Spin/PASM has its limitations for anyone that would be using the full functionality of a C3 board, for a beginner anyway. Rock and hardspot...
    Ray


  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-07-15 13:31
    Anybody have any ideas as to how you can provide the usage of the 'simpletools.h' world to a development area that is not SimpleIDE?



    As mentioned above, PropWare works with the Simple library with no changes necessary in your source code.
    As far as I know, no one else has provided such functionality. Here you can see an example using SimpleText and the PropWare build system.
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-07-15 13:34
    If you're 100% opposed to PropWare or even attempting to use it, you can download a binary distribution, find the static libraries for Simple (libSimple_<memory model>.a) and then copy it and your required headers into your project.
  • After looking through the Learn folder, I did notice that there are no library files. They do contain files with names like libsimpletools.c, but no libraries. Now I am wondering what kind of "magic" Andy is using within SimpleIDE to keep all this functional? I guess from the Parallax perspective, maintaining C files is lot easier than maintaining C files with the accompanying libraries.

    If the main source file includes simpletools.h SimpleIDE will add "-lsimpletools -lsimpletext -lsimplei2c" to the command line when building the executable. It also add "-L" flags specifying the paths where the libraries are located. These libraries come with the SimpleIDE install package. If you install it yourself from the source in github you'll need to build the libraries yourself.
  • If you're 100% opposed to PropWare or even attempting to use it, you can download a binary distribution, find the static libraries for Simple (libSimple_<memory model>.a) and then copy it and your required headers into your project.

    I am not 100% opposed, but when your documentation mentions cmake/make, it's like taking a brick to the side of your head, leaving me very cautious about taking on something like that. Again, for you professionals, or who have been doing this for awhile, I suppose it is no sweat.
    I think I may just have to take a few steps back, and get an empirical view of what is really going on, and determine what my next step is going to be. Been hitting to many brick walls so far.
    Ray

Sign In or Register to comment.