So . . . let’s say I have a G120, and the only way it can communicate with the outside world is with its serial ports. Assume there’s no ethernet, no SD card, and no USB client or host functionality enabled for this particular G120.
At a very broad level, how could I implement in-field update? Could I, for example, stream the update file into the serial port using XModem or some other protocol, have my client program write the contents of that file straight to EEPROM, and then perform the IFU from EEPROM? Or could I switch to serial debugging mode and perform the update that way?
Is there some other strategy that can be used? Or is in-field update with these constraints unfeasible?
If you can write code in your booloader to get the hex data from the eeprom, then yes.
Just transmit the hex file via serial, read it, store it in the eeprom, then launch the bootloader, read it back from the eeprom and over write the main application region on the flash.
I have never done this, but this is how I understand IFU.
When using IFU then you have to write two applications, one is your normal application, the other is your updater application.
The flash of the board gets split, I can’t remember the ratio, so that each application has it’s own space in flash.
When the board starts up the updater application gets called. If this application decides that there is nothing for it to do then it moves on and loads the main application.
This means that the updater application can get the update files from anywhere, using any medium. It can listen on a serial port for XModem comms, or it can pull the application from eeprom, although serial flash might be a better technology to use.
The fact that YOU write the updater application makes things very flexible.