This is the code for ifu i found, is the 4th file the hex file(app.hex) i generated with mfdeploy and how is it loaded based on the code below?
is LoadFile("\SD\app.hex", InFieldUpdate.Types.Application); the missing line i need?
public static void FlashFirmware()
// Reserve the memory needed to buffer the update.
// A lot of RAM is needed so it is recommended to do this at the program start.
InFieldUpdate.Initialize(InFieldUpdate.Types.Firmware | InFieldUpdate.Types.Configuration);
// Start loading the new firmware on the RAM reserved in last step.
// Nothing is written to FLASH In this stage. Power loss and failures are okay
// Simply abort this stage any way you like!
// Files can come from Storage, from network, from serial bus and any Other way.
LoadFile("\\SD\\Firmware2.hex", InFieldUpdate.Types.Firmware); //Only if your device has two firmware files.
// This method will copy The new firmware from RAM to FLASH.
// This function will not return But will reset the system when done.
// Power loss during Before this function resets the system quill result in a corrupted firmware.
// A manual update will be needed if this method failed, due to power loss for example.