Open-Source FIRST

I know this is a very long post, but please take the time to read or skim over it and contribute your thoughts if you’re interested.

Lately I’ve been thinking quite a bit about Dean Kamen’s message about the mission of FIRST and gracious professionalism, and I really admire what FIRST as both an organization and a community of students have achieved so far. After the introduction to FIRST at kickoff, I was disappointed when they started to talk about the software available for use with the FRC: (paraphrased) “For those of you Macintosh users out there, there is a great piece of software you can use… it’s called Parallels. Run Windows in your Mac!” I believe this is really out of line with the goal of FIRST to give these opportunities to every student; to force everyone to use a rather costly operating system with a very limited set of tools, especially when there are probably many teams that would much prefer to utilize a different operating system (namely, Mac OS X, Linux, and BSD) but cannot because they are not supported. I don’t want to be forced to run a bloated operating system as a guest in an OS of another architecture, nor do I want to run everything in wine, which is only a workaround, not a solution.

I don’t expect FIRST to have to write software for every possible platform to work on anyone’s machine, but I would like to see more options available to FIRST competitors. Free software (as in speech, not as in beer), in my opinion, is the key to this. Allowing the FIRST community to aid in writing open-source applications for the competition can greatly help spread the idea of collaboration and gracious professionalism, as we will be all working together towards improving our very own tools. Not only will students benefit from having alternative tools, but they can also learn from their implementation and eventually contribute and improve upon what was given.

Now, I know that there are many open-source tools available, written by members of the Chief Delphi community - they are exactly what I’m talking about. The problem is the decentralized nature of all these projects; I would like to get an official okay from FIRST, and have open-source technology created by FIRST participants be recognized by the organization, maybe with something like opensource.usfirst.org, with a public svn repository with all the major projects or whatever.

I’m planning on writing a letter to Dean Kamen and other prominent members of FIRST about this, and I absolutely need your help. What we need are people who are willing to help develop, maintain, and just basically contribute whatever possible to making this happen - if there is enough interest. I want to make possible in the near-future several things:

  • An open-source compiler toolchain for the PIC18. This is likely the most difficult, but it is definitely possible with all the active developers on this site :slight_smile:
  • An active, centralized repository for all major FIRST open-source projects.
  • Quality free software replacements for all FIRST-supplied proprietary software.

If you are interested in this project, please reply and stir up some ideas so I know if it’s actually going to be worth the effort. Thanks for putting up with my verbosity! :wink:

Sounds good. Write it using kde or gtk bindings, then it will be portable to *nix, *bsd, and os x.

Just a suggestion, of course.

Gtk/kde bindings are unnecessary – only command line tools are needed.

However, it should be noted that there are several utilities available for unix already (PICloader, although its source might not be available) and in combination with WINE, it is possible to develop solely on unix. While it would be kinda cool to not bother with wine, there probably isn’t any point. After all, considerable changes would be necessary if FIRST changed the processor or compiler.

However, FIRST should support the maintenance of the unix tools.

I dont think you will be able to get Microchip to make a Unix port of there compiler. However having FIRST run a public SVN server sounds like a good idea.

I am a huge open source advocate however what you are asking is that FIRST essentially stop using the Microchip PIC18, since as chris31 said it would be hard to get them to port it to Unix. That would require a lot more work then I think they are willing to put in for operating systems that only appear in 10% of the desktop market. On the bright side however I have yet to hear of a University level Engineering program that doesn’t require even a little Unix work. So that might be a motivator.

I haven’t heard anyone suggest Linux robots in this thread. Look at this thread<http://www.chiefdelphi.com/forums/showthread.php?t=52563>. If you want to work towards Liunx/mac support you could write “dummy” code for the pic that would just forward the data from a Gumstix(or similar linux based device) to the I/O, and the thread above has already done this.

I think it would be better use of your time, and more adaptable to new technology to use a coprocessor. Not to mention the other advantages of a coprocessor.

First of all, I agree with you completely, and I’m glad somebody is finally bringing this type of thing out into the open.

This is definitely the biggest issue barring the use of Linux and other UNIX’s. We don’t need to port the whole MPlab IDE. Once the compiler is taken care of, people will come up with their own makefiles and text editors.

But FIRST will need to get their support behind all of this if anything is going to happen. Right now, there are a couple projects going on (not in the way of compilers though), but they are very fragmented. An example would be Eclipse. It seems that every year, somebody is coming up with a new plugin for Eclipse to allow it to work with C18. Newbies like myself would like to use Eclipse or some other IDE, but don’t know where to start after digging through the multitude of threads and whitepapers on this site.

With open source tools, one has the advantage of being able to use them in any combination on any system. FIRST needs to start heading in this direction.

Some of you are missing what I’m getting at. I’m not asking FIRST to port all of their software to UNIX, or to get Microchip to port the C18 to UNIX. I want them to recognize community efforts to bring the “standard” FIRST software (and new, innovative tools) to other platforms, and improve upon them. What I’m looking for are developers who are willing to work together on this.

I don’t want first to stop using MCC18; I want US to write a free-software C compiler for the PIC18F. I want US to consolidate efforts on creating useful tools for FIRST competitors, preferably as free software. We don’t need FIRST to do it for us, they have enough on their hands. Chief Delphi has a number of outstanding programmers, and what I hope is that they would be willing to collaborate on a number of projects instead of creating a handful of fragmented projects, that, although useful, aren’t well-known or are undermaintained.

All I’m asking of FIRST is official support for community projects, and if they end up being good enough, considering adding them to the official collection of tools. At this moment I’m looking for people who are willing to contribute actively to this.

EDIT: shawger beat me to it :slight_smile: That’s exactly what I’m talking about.

I’m not sure if this is relavant, but I know Microchip’s C30 compiler for their 16-bit PICS is based off of gcc. I’m not sure about c18, however.

With 80-90% of users using PC’s, is it really not in the spirit of FIRST to write software geared towards those 80-90% of people?

FIRST isnt the one writing it. They use donated software. I find it hard to beilive a team only has access to Macs and there is no Windows computer around. If that is the case go build a P2 machine for a couple hundred dollars.

Sigh. The point is about options, really. It’s not disputed that most teams are perfectly happy with using MPLab and the C18 along with IFI_Loader on Windows. The rules don’t state that you MUST use microchip’s software to program the robot; the rules only state that you must use the PIC18F as the main processor. There are no restrictions on the software you can use, but there are no other options.

There may not be any teams that have all Macs, but there might be a team that can’t afford to build a machine for a couple hundred dollars and buy a license for Windows XP for $100. They might want to take an old machine and use Linux or FreeBSD or Solaris.

Not only would this give more choice to teams, but team members can learn quite a bit through contributing to projects. To help with a compiler, they’d learn a lot about compiler design and the architecture of 8-bit PICs, and having a lot of centralized code will let them learn about all aspects of software development, not just embedded design (even though that is the primary goal of FIRST).

If you’re not interested, that’s fine. I just want to know if I can get developers that would be willing to help, that’s all.

I would love to contribute, however, I don’t know the slightest thing about compiler design. I think it is a nice idea to have open-sourced software–I was thinking about duplicating easyC so that teams are not limited by the number of seats they are allowed–but the reality is I just don’t have the time anymore. Not to mention I’m on WinXP, so MPLAB and C18 are doing just fine here (except I’ve noticed some really strange bugs in MPLAB sometimes–boxes and hieroglyphics appearing after the cursor as I type…it’s a little scary. And don’t hit compile again until after the current compile is entirely done…:ahh: ).

I want to help, but I really can’t.

I want to see this project get off the ground, but I don’t see it happening.

Sorry.
JBot

Every team can afford it. And if they claim they cant I will show them how to get one donated or just extra junk out of there budget to purchase one.

My point was just that while it would be great idea. Im not sure if FIRST will support it as it could very easily lead to just confusing more teams.

It is not in the spirit of FIRST to lock people into certain platforms to limit their choices. Yes, most people have access to Windows computers. But many people prefer not to use them, are more comfortable working with other platforms, or find another platform more functional.

Why would this be confusing? It’s just another set of tools. Providing that they work well and are polished, they should not be any harder to work with, and could potentially be easier to work with.

The project page for picloader and pycloader are at https://sourceforge.net/projects/ifi-picloader/.

All the Eclipse stuff I started integrated, centralizing, and releasing under FIRSTclipse.

There are open source compilers available for the PIC18F. The only reason we can’t use these is IFI’s libraries. I don’t know how many linkers can use libraries generated by mcc18.

As for a central location, I think the most that is needed is that every project have a versioning system and we have a central mailing list for the projects to coordinate. There’s so many projects because of the diverse implementations, languages, and other requirements.

At this point, I think what would be most useful would be if the programmers for the various projects wrote their code in such a way that the “back end” could easily be lifted and used elsewhere.

The C18 complier appears to generate Microsoft PE-COFF formatted library files (quickly looking at FRC_library_8722.lib). This format is fairly well documented at http://www.microsoft.com/whdc/system/platform/firmware/PECOFF.mspx (click through its a Word document).

The only possible PIC18F compiler I could find was sdcc, in which PIC18F support is not yet complete. I think it would be good to try to help contribute to this project (if possible), since most of the building blocks we need are already in place. I could make a modified version of gplink to be able to link to PE-COFF fairly easily since the specification is open.

Thanks for the links to those tools, Astronouth. As for writing suitable modular backends, that’s definitely a great point. The command-line/GUI loader I’ve been working on has a completely modular interface, which can be statically linked against for other projects requiring similar interfaces.

Within the next week or so I could have subversion repos and a mailing list available to start, although it might be better to see if FIRST is open to this. They might be able to lend us a server and a subdomain, or just a subdomain for a server we set up (probably better for us).

I am fully in support of all of this. I will do whatever I can to help you. Open source alternatives are necessary!

One thing that we really cannot get around, however, is MCC. MCC is NOT free software. Microchip will almost certainly not make an open source alternative (or even a unix or linux alternative) to MCC. It will certainly not do open source because they’re making money off of it and it’s really basically their only source of income. As for a linux or unix non-open source alternative, I don’t know, but I would be willing to help you in any way I can!

I agree that Free and Open Source Software should be an important part of the FIRST universe. It fits.

That said, they are probably leery of turning off their current corporate sponsors. They really should not be. Any company that is not willing to play nice with other systems should be shunned. But they probably are.

Anyhow, running mcc18 under wine has not given us any major problems. It is certainly better than mplab on windows.

Maybe a better approach to getting FOSS in to FIRST would be to help them out. We could send out copies of The Open CD to all the teams:
http://www.theopencd.org/

That could make a great intro to Free.