Here the situation : I have a Panda connected as CDC to a PC without VS2010.
What should I do to allow program update from a file on the PC ?
What I don’t understand is how to make the board prepared for update in a running application.
I’ve understood I had to extract the app from the “dev” board. This part is ok. But after that ? Should I make a special program on the PC to update the board ?
Well as for updating the panda, you can extract the image from the dev board and then use MFDeploy (tool in the .NET Micro frameworks dir) to deploy that image.
I do not completely understand what you mean by
If you mean that you want to do a partial update then that’s not possible since mfdeploy will overwrite panda’s flash.
When you are done development and want to deploy to 1000 devices, you probably do not want to use VS2010 to deploy every single one. For this, GHI added a feature in the GHI loader that extracts a “master copy” of the application then you can deploy this back to other devices using GHI loader (not MFDeploy on USBizi, that is for larger devices)
Now, IFU is completely different. IFU splits your flash into boot loader and application regions. The docs explains this. IFU is for the device to update itself automatically, from network or storage memory!
IFU is pretty advanced thing that you will probably never see in any non-GHI NETMF device. I think a tutorial would be very useful to explain how it works.
I create a device that is using Panda and I sell it. Now, after some time, I add new features into the program and I want the users be able to update their board. How will they do it ?
According to Gus’ answer, and if I understand correctly, I think that I should send them the “master copy” file and they will use GHI Loader to update their boards with it. Is it right ?
I will then try to do it myself and see how it’s going.
I don’t know your situation, but I would consider adding sd card support to your device and add IFU from the card. It will make it so much easier for your customers to do the updates. You can do updates for the GHI firmware that way too.
The other main factor is user support. You will have to deal with not only the code for your device but all the issues with terminal, different version of the os on the pc, os drivers, etc.
@ Architect : I don’t think that there’s so much issues with a program like TerraTerm.
My situation is not yet defined, in fact. I’m currently thinking about it. But one thing is sure : the “device” will be a closed box, with only some I/O plugs available for users.
I don’t want them to open the box and take the risk they mess something up ???
Also, many of the potential users are not very confident with computers and software issues, so I wanted something simple to upgrade their boxes. If they have to open it, push this button for x seconds, then forget to put the SD card, and so on… You see what I mean ?
And btw, I can’t even imagine forcing them to buy a SD card only to update their prodcut
I think I would prefer asking them to send the board back so I can re-program it
Also, I wonder if the fact that the Panda will be in CDC mode will change something or not ? Any idea ?
The device should not appear as a “development board” to users, but rather as a “CDC device”.
[quote]Also, I wonder if the fact that the Panda will be in CDC mode will change something or not ? Any idea ?
The device should not appear as a “development board” to users, but rather as a “CDC device”.[/quote]
Sorry, I have not played with CDC much yet. Others might give a better advice on that, but I am interested to know too.
Thank you !
But little hero, here ??? In fact, I’m a hero-beginner, I’m still learning
I’m still confused by the bootloader mode, which seems mandatory to update the application. Can I simply put it in this mode via the SystemUpdate.EnableBootloader() method ? And then access the board via COMx: with Terraterm ?
You can get the files any way you like. The example shows SD, Pyxis uses Internet and you can use CDC… In the exmaple, replace the file.read(…) with CDC.read(…).
Yes, you have to enable bootloader() first.
I wanted to understand before doing anything possibly wrong… Now that I think I’ve understood, I will code some test programs and come back to tell you how it’s been going.
Sorry about chipping in. I have not done this and have only read about parts of it, and have parts in the back of my head.
You have to write your own “boot loader”, I think this is part of IFU. It starts before your application and it desides if it should continue on to your app, or download/flash a new app.
The nice thing about this is that you can encrypt your image file, send it to the user. The user sends it over usb to your CDC bootloader that decrypts the file, then reprograms itself.
If you send a master image then you might run into pirating?
I don’t care about this Code itself would not be very important and would not require much attention.
My idea about upgrading is that the end-user should decide to do it or not. I make updates available and they download/install them. At least, that’s the goal.
With you answer (creating bootloader code), I have to admit I’m getting lost again
I thought there would be a simple way for user to load code in the board, but it doesn’t seem as simple as I thought ???