Go to Post Please share your opinion and post whatever you want, I wouldn’t mind. Because I may be wrong. - Arefin Bari [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 23-01-2007, 00:47
shtylman shtylman is offline
some sort of programmer
FRC #2420
 
Join Date: Feb 2004
Rookie Year: 2003
Location: Marietta, GA
Posts: 37
shtylman has a spectacular aura aboutshtylman has a spectacular aura about
Jifi

So, Jifi is a java IFI loader for the 2006/2007 RC. I could not get IFILoader to work in Wine (I program in Linux) so I had to find another alternative. I have had pretty good success with this but do not guarantee that it will work for you. Right now, all I have is a linux package at http://shtylman.com/jifi but will be adding a Windows and Mac version soon.

If you have any comments or suggestions please let me know and I will try to implement them.

P.S. The program is in the early stages and may (will) have bugs. I also plan to at some point release the source as well as an eclipse plugin. Right now it only works with the 2006/2007 RC (The 8722 chip) but can be made to work with others.

You Will Need java 1.6 to run this.

Last edited by shtylman : 23-01-2007 at 01:24. Reason: forgot to mention
  #2   Spotlight this post!  
Unread 23-01-2007, 01:07
prograid's Avatar
prograid prograid is offline
Registered User
AKA: Ben Cherian
FRC #0254 (The Cheesy Poofs)
Team Role: Alumni
 
Join Date: Oct 2004
Rookie Year: 2004
Location: San Jose
Posts: 80
prograid will become famous soon enough
Re: Jifi

It would be really nice if you could help Astronouth integrate this into the FIRSTClipse project. It already uses SWT for the GUI, and if you're willing to provide the source, it would be really helpful. We already can compile the robotics code in Eclipse without writing makefiles, this would be a really great addition.

BTW, does this work with the pre-06 RCs, the EduBots or the Vex robots?
Although relatively few use the EduBots (aka Robovation), having support for at least the older RCs would be nice. Assuming your program works in the same way that the other loaders on here work, it should just be a matter of changing one value in the code (I think). I'm no expert on it though.

EDIT:
All right, I just tried running it, (I was too excited over seeing a Java version of the IFI loader), and I get an UnsupportedClassVersionError when executing the Jifi executable in the Linux directory. This is with sun's java5 jdk on Ubuntu Edgy 6.10.

Last edited by prograid : 23-01-2007 at 01:20. Reason: Problems
  #3   Spotlight this post!  
Unread 23-01-2007, 07:36
EHaskins EHaskins is offline
Needs to change his user title.
AKA: Eric Haskins
no team (CARD #6 (SCOE))
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Elkhorn, WI USA
Posts: 998
EHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond repute
Send a message via MSN to EHaskins
Re: Jifi

Woul you be interrested in trying to integrate this into th next version of FusionEdit<www.sourceforge.net\projects\fusionedit >?
__________________
Eric Haskins KC9JVH
  #4   Spotlight this post!  
Unread 23-01-2007, 12:14
jgannon's Avatar
jgannon jgannon is offline
I ᐸ3 Robots
AKA: Joey Gannon
no team
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Pittsburgh, PA
Posts: 1,467
jgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond repute
Re: Jifi

Quote:
Originally Posted by prograid View Post
I just tried running it [...] with sun's java5 jdk
Quote:
Originally Posted by shtylman View Post
You Will Need java 1.6 to run this.
That could be your problem.
__________________
Team 1743 - The Short Circuits
2010 Pittsburgh Excellence in Design & Team Spirit Awards
2009 Pittsburgh Regional Champions (thanks to 222 and 1218)
2007 Pittsburgh Website Award
2006 Pittsburgh Regional Champions (thanks to 395 and 1038)
2006 Pittsburgh Rookie Inspiration & Highest Rookie Seed

Team 1388 - Eagle Robotics
2005 Sacramento Engineering Inspiration
2004 Curie Division Champions (thanks to 1038 and 175)
2004 Sacramento Rookie All-Star

_
  #5   Spotlight this post!  
Unread 23-01-2007, 12:21
shtylman shtylman is offline
some sort of programmer
FRC #2420
 
Join Date: Feb 2004
Rookie Year: 2003
Location: Marietta, GA
Posts: 37
shtylman has a spectacular aura aboutshtylman has a spectacular aura about
Re: Jifi

Quote:
Originally Posted by jgannon View Post
That could be your problem.
I added the note about java 1.6 after he tried and I saw his post edit. I forgot to mention it in my original post.
  #6   Spotlight this post!  
Unread 25-01-2007, 08:39
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Jifi

A few questions about the technicals:

What serial library do you use?

Did you use another loader as a code base? (eg, IFI Reloaded, pycloader, etc.)

How structured and generic is the code? One of the things that I'd like to allow is for creative uses of the loader (eg, EEPROM variables).

As far as integration goes, here's my opinion (if any of the developers on the project disagree, please tell me):
  • You may host the code on FIRSTclipse's Subversion on SourceForge, and you joining the project
  • I'd like to be able to use the serial library for other uses (eg, dashboard, terminal, camera)
  • The code must be licensed compatible to the Eclipse Public License (what FIRSTclipse is licensed under) or the GNU GPL (my preferred license)
  • The code must be able to run under Java 1.4
  • GUI must be SWT

The last two points may happen after any code import.

As to illustrate my point as to the usage of the libraries outside of this little project, I looked at some Java-base CMUcam2 GUIs, and decided I couldn't use them. Why? Their code was not structured into separate modules, so I could not easily take their code and use it in mine. Interfacing with the camera and parsing the data isn't that hard, so I'll just write my own.

As for the loader, I'd like to see independent and useful libraries to interface with the code, such that each library could be a separate Eclipse plugin. If you borrowed the OOP methods from pycloader, that'd be awesome. If not, I'd like to see the structure first.
  #7   Spotlight this post!  
Unread 26-01-2007, 00:01
shtylman shtylman is offline
some sort of programmer
FRC #2420
 
Join Date: Feb 2004
Rookie Year: 2003
Location: Marietta, GA
Posts: 37
shtylman has a spectacular aura aboutshtylman has a spectacular aura about
Re: Jifi

in response to the post above this one here goes:
  • The GUI is in SWT
  • I Used RXTX, a GNU java library for serial communication.
  • Because I used RXTX, my program is also GNU/ opensource I guess
  • The program compiles in java 1.6, and possibly 1.5, I will not drop to 1.4 (I think I may be using generics somewhere).
  • Beyong the GUI and serial libraries, all of the other code (logic, downloading, hex reading, etc was all done from scratch.
  • I have my own subversion server I use, but thanks for the offer
  • The loader has the ability to transfer code faster than the official ifi loader (I can provide technical details, but trust me its true).
  • The structure is pretty clean and can be expanded upon fairly easily (I think).
  • The GUI is just a frontend and the program can work without it just fine, the two are not permanently joined (aka I planned to drop it into an eclipse plugin at some point)

Hope that got everything.

As a side note, the point of writing this was to hopefully send it over to the IFI guys and use it as an official loader. I am in the process of trying to get this to happen because I think a platform independent loader would be wise and useful. Until then, I will not open release the source to prevent tampering with the protocol as it can cause the RC to do weird things.
  #8   Spotlight this post!  
Unread 26-01-2007, 00:43
Shinigami2057 Shinigami2057 is offline
Slackware Is Your New God (Mentor)
AKA: Harry Bock
FRC #1350 (Rambots)
Team Role: Programmer
 
Join Date: Oct 2006
Rookie Year: 2006
Location: Johnston, RI
Posts: 106
Shinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really nice
Re: Jifi

Unfortunately, many GNU/Linux distributions (include slackware and Fedora), ship with a gij version that matches Java 1.4.2, and although it has some 1.5 extensions it doesn't seem to be able to read the class file version. This is pretty limiting, IMO, but of course, free software nuts who don't use the Sun JRE may not exactly be your target audience

This is the error I get:

Exception in thread "main" java.lang.ClassFormatError: jifi.Jifi (unrecognized class file version)
at java.lang.VMClassLoader.defineClass(libgcj.so.7rh)
at java.lang.ClassLoader.defineClass(libgcj.so.7rh)
at java.security.SecureClassLoader.defineClass(libgcj .so.7rh)
at java.net.URLClassLoader.findClass(libgcj.so.7rh)
at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
at gnu.java.lang.MainThread.run(libgcj.so.7rh)
__________________
One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs.
  #9   Spotlight this post!  
Unread 26-01-2007, 01:06
shtylman shtylman is offline
some sort of programmer
FRC #2420
 
Join Date: Feb 2004
Rookie Year: 2003
Location: Marietta, GA
Posts: 37
shtylman has a spectacular aura aboutshtylman has a spectacular aura about
Re: Jifi

Quote:
Originally Posted by Shinigami2057 View Post
Unfortunately, many GNU/Linux distributions (include slackware and Fedora), ship with a gij version that matches Java 1.4.2, and although it has some 1.5 extensions it doesn't seem to be able to read the class file version. This is pretty limiting, IMO, but of course, free software nuts who don't use the Sun JRE may not exactly be your target audience
Yea, I understand that limitation but as far as I am concerned Java releases their software for free and it is just the choice of people to stick with the GNU stuff that is outdated. I don't want to start a flamewar about free software or anything like that, but keep in mind that just cause some people don't want to use software that is closed source but free just because it is closed source, others, myself included, just like the fact that its free. I would look into installing java 1.6 from Sun if I were you and not dwindle on the whole GNU thing. Just my $.02
  #10   Spotlight this post!  
Unread 26-01-2007, 02:26
Shinigami2057 Shinigami2057 is offline
Slackware Is Your New God (Mentor)
AKA: Harry Bock
FRC #1350 (Rambots)
Team Role: Programmer
 
Join Date: Oct 2006
Rookie Year: 2006
Location: Johnston, RI
Posts: 106
Shinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really nice
Re: Jifi

Understood; It doesn't matter to me what you use, I was just rambling as usual

Anyway, I've also been working on a program loader (in C), and one of the things I've just recently started working on is "an851d", which is just a server that pretends to be a PIC18F8722 with IFI's boot loader. By connecting my two serial ports together, I've been able to test it extensively without having to worry about screwing up our team's FRC, and have squashed a few bugs I couldn't have (reasonably) otherwise. If you're interested in using it to test I'd be glad to release the source before I release it all together (it's about 95% done).

It basically just responds to any valid bootloader command it gets and prints out information about what commands its received (see picture).
Attached Thumbnails
Click image for larger version

Name:	an851d.png
Views:	57
Size:	33.8 KB
ID:	4939  
__________________
One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs.

Last edited by Shinigami2057 : 26-01-2007 at 04:17.
  #11   Spotlight this post!  
Unread 26-01-2007, 15:07
shtylman shtylman is offline
some sort of programmer
FRC #2420
 
Join Date: Feb 2004
Rookie Year: 2003
Location: Marietta, GA
Posts: 37
shtylman has a spectacular aura aboutshtylman has a spectacular aura about
Re: Jifi

I have now made a windows package for the people that want it. It is found at the same place as the linux package (http://shtylman.com/jifi) except with extension .zip

- small tip: in the config tab, change the "chunk size" to something bigger (248 max) and see the effect on download speed.

* Still requires java 1.6 to run *
* OSX package to follow soon I hope *
  #12   Spotlight this post!  
Unread 27-01-2007, 00:33
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Jifi

Quote:
Originally Posted by shtylman View Post
As a side note, the point of writing this was to hopefully send it over to the IFI guys and use it as an official loader. I am in the process of trying to get this to happen because I think a platform independent loader would be wise and useful. Until then, I will not open release the source to prevent tampering with the protocol as it can cause the RC to do weird things.
You do realize that the protocol is documented by Microchip (see AN851) and http://www.astro73.com/wiki/IFI_Loader_protocol (my own documentation)? I'm not sure what you have that 3~4 other developers have missed.

And also, IFI probably will not allow you to open source it. IMHO, you need to make that choice up front.
  #13   Spotlight this post!  
Unread 27-01-2007, 01:45
shtylman shtylman is offline
some sort of programmer
FRC #2420
 
Join Date: Feb 2004
Rookie Year: 2003
Location: Marietta, GA
Posts: 37
shtylman has a spectacular aura aboutshtylman has a spectacular aura about
Re: Jifi

I was not aware of the microchip documentation, but thank you for that.

As for what IFI decides, I will leave that up to them. I don't think it is fair to speculate given that I don't know that anyone has ever offered.

Also, From my previous research into loaders I found just one (picloader I think) that stopped working on the newer larger code size controllers, was only for linux as far as I could tell, and was not very flexible in what I wanted to be able to get out of it. If I missed something, I am sorry, but this loader was also more of an exercise for me in protocol sniffing and implementing, so I don't mean to offend or belittle anyones efforts.
  #14   Spotlight this post!  
Unread 27-01-2007, 10:30
Shinigami2057 Shinigami2057 is offline
Slackware Is Your New God (Mentor)
AKA: Harry Bock
FRC #1350 (Rambots)
Team Role: Programmer
 
Join Date: Oct 2006
Rookie Year: 2006
Location: Johnston, RI
Posts: 106
Shinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really nice
Re: Jifi

Astronouth, would you mind if I updated your Wiki to have a complete documentation of AN851 + IFI's "special" commands?
__________________
One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs.
  #15   Spotlight this post!  
Unread 27-01-2007, 17:31
ace123's Avatar
ace123 ace123 is offline
Registered User
AKA: Patrick Horn
FRC #0008 (Paly Robotics - http://robotics.paly.net/)
Team Role: Programmer
 
Join Date: Feb 2005
Rookie Year: 2004
Location: Palo Alto, CA
Posts: 50
ace123 has a spectacular aura aboutace123 has a spectacular aura about
Send a message via AIM to ace123
Re: Jifi

How hard would it be to integrate a serial console to your program as one of the tabs, like the "debug window" that pops up in IFI's program?

I know that I can "cat /dev/ttyS0" in Linux or "type COM1" in Windows, but it would be nice to have it integrated if possible.

From what I understand, it involves reading the serial port when not downloading, checking if it is ASCII (to avoid getting garbage data, i.e. line feeds or else values between 32 and 126), and displaying it in a text box.

Also, IFI has a useful checkbox to pause output... I would imagine this might also be relatively simple to add in.

-Patrick
__________________
-Patrick Horn, Paly Robotics

Check out the space simulator called Vega Strike, modelled after the space simulator games Elite and Wing Commander. It's Open Source too!
If you have ever played Wing Commander, or especially Privateer, and had a feeling of nostalga derived from the you will enjoy these two Vega Strike mods: Privateer Gemini Gold and Privateer Remake!
I'm working on adding multiplayer support this year...
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 23:50.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi