I need a firmware updater.
MarkS
Posts: 342
I'm making a product that will be upgradeable by the user through added hardware. What I'd like to do is include a firmware update to access the new hardware. The only problem is that the user would need PropTool and I don't want them changing the code. Is there any sort of tool that will create a Windows executable that will look for a Prop on a USB port and then upload a stored SPIN program? I'm assuming that there is not, but how hard would this be to create?
Comments
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Brian
uController.com - home of SpinStudio - the modular Development system for the Propeller
PropNIC - Add ethernet ability to your Propeller! PropJoy - Plug in a joystick and play some games!
SD card Adapter - mass storage for the masses Audio/Video adapter add composite video and sound to your Proto Board
http://forums.parallax.com/showthread.php?p=649540
You can configure the .ini file so, that all goes automatic, when the user click on the PropTerminal Icon.
Or you can first start a Diagnose Spin programm in the Propeller RAM that decides interactiv with the User what Update File want be uploaded in the EEPROM.
If this is a bigger commercial Application, you can get an adapted version of PropTerminal, with your Logo, Website and so on for little money.
Andy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheers,
Simon
www.norfolkhelicopterclub.co.uk
You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
BTW: I type as I'm thinking, so please don't take any offense at my writing style
I have the same problem or better say needs for a Firmware updater.
Thats why , i work on one right now, it will be ( hopfully ) a .dll i started to write the code an a sample ap in VB Express 2008.
I want to make a .dll so everybody could use it in there own little program with out fidiling with bits and bytes and a funny encoding.
May be we both can work on that if you want, or maybe there are more out there how would like to have a .dll for prp loading and communication.
So far my VBXLoader so i called it , i was able to load a bin file to a byte array, but i am not sure if that is so good and i should try to get it in a string.
And i got the part with check comports and open the port and send.
So now i am stuck in the bits and bytes with 1t and 2t what i almost got in my mind.
So you see i have made a little step in the right direction.
If you don't mind i will post here in your thread the files form VB what i have so far.
Best regards
Anubisbot
Presently it just programs the default image file into them but my ultimate aim is to have many configurations held in the Protoboard EEPROM and use the VGA to display a menu to choose the file to load.
I just used Chip's Propeller Loader spin file, it works well enough just a little on the slow side.
The best thing about it is that it is portable!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PropGFX Forums - The home of the Hybrid Development System and PropGFX Lite
An Active-X (.OCX) component may be better than a .DLL, but I'm from a VB6 rather than VB.Net background so I don't really know what's most appropriate for dotNet.
Unless you need to pass the entire image to or from the program which uses your .DLL/.OCX it doesn't really matter to anyone else how you implement it. A string could perhaps be less efficient than a byte array, and don't forget you need to be able to hold up to a 32KB image, up to 128KB image for the proposed Prop II.
In my VB6 implementations of compilers, assemblers and loaders I have used an array of strings, each of which can hold 256 32 bytes with another array to indicate which held data or not. That keeps strings at an efficient to use size and makes it fairly easy to increase the maximum size of the image without hitting 'string too long' or 'array to large' errors. Simple PutByte(adr,n) and GetByte(adr) methods hide the actual implementation. GetByte returns 0..255, -1 if not used.
Edit : Just checked, and I now use strings of 32 bytes, and an array of longs (32-bit) for efficiency. The beauty of hiding implementation is it doesn't matter how it works or changes.
There are quite a few examples of Propeller Bootloaders on this forum, including my own in VB6. It's well worth seeking out and looking at those examples.
Post Edited (hippy) : 2/14/2008 1:40:52 PM GMT
I think i will go with the .dll first, since i have some good tutorials to do that, i hope...
The byte array i use in .net is a system byte array, and i loaded a 500+ kb file in it and it works no complain about to long. I think thats good..
So now the fun parts starts, and thats what i still don't get. what do i do now with my bytes in the array,
Ok i start with DTR high wait and then dtr low wait 100ms and then i have to send$F9 what is 249 what i send out via serial byte. or is that wrong.
Then it comes to the part with the LFSR what is a array of 250 ?? bytes?
I have a lot more questions but right now its better for me to figure it out how the version check works, before i get more info in my head,
Since i have read all infos here on the forum, but i got more confused as more i have read.
I will post my code later today, after i have cleaned it a bit and have tested a new idea.
Getting the loader downloading is the 'fun part'. Implementing step-by-step is the way I did it, get one part working then move on to the next. There should be enough information which explains what needs to be sent and what is expected back.
The initial LFSR handshaking is bit oriented but wrapped as bytes. It probably is possible to send multiple bits in a single byte as can be done later in the download process for the actual image but I never got that working and it isn't really important to.
Parallax really needs to get this done. Firmware updating is a common practice in commercial/industrial applications. A developer has to feel secure that they can provide updates without someone hacking their code in the process. A binary loader solves this to some extent and I'm greatly surprised that one hasn't been written yet. It has been a very long time since I've done any Windows programming and I really don't know where to begin. Heck, I don't even have an IDE anymore.
Just get Vb Express 2008 its a free ide and a lot of fun to learn [noparse]:)[/noparse] Just kidding.Oh there is a loder written in Vb here in the forum ,
and i use it for now, to update the firmware for my projects. But i want to have all in one software like the update of firmware and a controll software for my application.
So i am happy writing away, and already get headaches. But it will be worth it.
Have you read all the postings above?
I count 2..3 ready to use solutions. Have you tried one of them? Can you say what is wrong with it?
Andy
Like I said, I don't have an IDE. I'm surprised that this hasn't already been done, as in a finished application with documentation on Parallax' site. Sure, I could do it, but I don't quite know how.
VB Express 2008 is a free IDE ..
You can download it free, and use it free.... and did i mentioned it's free..... i didn't had a clue how it works, before i started to read and try.
Anubisbot
A description is included, and the 0.3-ZIP has an Example that shows how you can upload files triggered by a Spin application. This allows User Interaction programmed in Spin (no PC programming).
Andy
I happen to use PropLoader (Downloadable from: http://forums.parallax.com/showthread.php?p=611536).
Sure, neither are from Parallax, but that doesn't matter does it?!
The only improvement I would like to see is a cross-platform version, and one that can be controlled from command-line and/or a supplier's application.
Try them both, and let us know what you think.
Hope that helps.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheers,
Simon
www.norfolkhelicopterclub.co.uk
You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
BTW: I type as I'm thinking, so please don't take any offense at my writing style
Who me? What?
No, I'm not just didn't read all of the replies fully. PropLoader looks good.
Post Edited (MarkS) : 2/15/2008 2:45:39 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheers,
Simon
www.norfolkhelicopterclub.co.uk
You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
BTW: I type as I'm thinking, so please don't take any offense at my writing style