Main Site Documentation

Lost in IFU


#1

Hello all,

as the title says, I’m completely lost with IFU :frowning:

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 ?

Any advice are welcome ???


Christophe


#2

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.


#3

Here is where the confusion is…

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.


#4

Hum… Then I think I don’t need IFU. :hand:

I will expose the thing differently.

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.

Thank you both for your answers ! :stuck_out_tongue:


#5

I think IFU is the right choice here.
The great IFU example is Pyxis 2. I was just looking at that part of it yesterday.


#6

You can send him they master copy but then how would they upload it? They can enter GHI loader and upload it using Xmodem terminal.

With IFU, your customer can update from SD card or from your website. Pyxis 2 does IFU from the network automatically.


#7

But the Panda wouldn’t be connected to any network, it would be a standalone device.

I think that the terminal option with the master copy is the simplest option in my case.


#8

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.


#9

@ 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 :hand:

I think I would prefer asking them to send the board back so I can re-program it :wink:

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”.


Christophe


#10

I see.

[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.

BTW, Congrats on making FEZ Hero!


#11

Thank you !
But little hero, here ??? In fact, I’m a hero-beginner, I’m still learning :wink:

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 ?


#12

Have read and tried the examples here?
http://www.ghielectronics.com/downloads/NETMF/Library%20Documentation/html/53c9fe92-8150-bd36-e2de-bf4fc6f13f8f.htm

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.


#13

Sorry for the late answer ???

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.

Meanwhile, I thank you for the answers so far.


Christophe


#14

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?


#15

I don’t care about this :wink: 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 :frowning:
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 ???


#16

@ Bec,

I’d be happy to help w/ your code if you like. Pyxis does optional updates as well; prompts first and only does dl/install if the user says yes.


#17

I will accept your help.

You can contact me on my mail, visible on this page : http://www.lsp-fr.com/astro/cms/index.php?page=contact

Thank you,


Christophe