[SOLVED] Headless config after IFU

When my app comes to this instruction:

bool fg_chg=GHIElectronics.NETMF.Hardware.Configuration.LCD.Set(Configuration.LCD.HeadlessConfig); // to use the LCD reserved IOs, return true if config has changed false otherwise.

the Output of VSC# 2010 Express is:

[quote] #### Exception System.Exception - 0xffffffff (1) ####
#### Message:
#### GHIElectronics.NETMF.Hardware.Configuration+LCD::Set [IP: 0000] ####
#### GHIElectronics.NETMF.Hardware.Configuration+LCD::Set [IP: 003f] ####
#### ProjetBBX.LED::.ctor [IP: 0034] ####
#### ProjetBBX.ProjetBBX::Main [IP: 02d7] ####
Une exception de première chance de type ‘System.Exception’ s’est produite dans GHIElectronics.NETMF.Hardware.dll[/quote]

Whereas this instruction works properly when the board is not prepared for IFU.

The same problem appears for:

GHIElectronics.NETMF.Hardware.Configuration.Touch.UseDefaultInterface(false);

Is there any conflict of library with IFU that are known to exist?

What do you mean by “prepared for IFU”?

I mean that has been partitionned, to receive a managed bootloader and a normal application.

My application was running properly before running:

If I reinstall the EMX as out of the box (i.e. without partition for IFU), the code works well.

I have created a dummy code that I can’t run on the board when EMX has been partitionned.

If anyone can run this example (it aims to deactivate LCD config to reuse pins), this would be great.


using System;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;

using GHIElectronics.NETMF.Hardware;

namespace EMX_Application1
{
    public class Program
    {
        public static void Main()
        {
            Debug.Print(
                Resources.GetString(Resources.StringResources.String1));
            
            bool cfg_chg=Configuration.LCD.Set(Configuration.LCD.HeadlessConfig);
            if (cfg_chg)
            {
            Debug.Print("Config LCD has been updated");
            Debug.Print("Reboot the platform");
            Microsoft.SPOT.Hardware.PowerState.RebootDevice(false); //hard reboot
            
            }
        }

    }
}

I wonder, if you can do that right before you do EnableBootloader.

The fact is that in the library, they mention that:

Therefore this configuration have to be done in the app.hex.

However, I discovered that I was not copying the “Config.HEX” file during systemCompleUpdate. I though it was the problem. But my first attempt did not succeed. The board start copying from SD the hex file to the flash, the board restart, but nothing happens. No message in MFDeploy…

I go on the investigation and thanks for the ideas, It helps me to double check all this stuff.

Regards

Ok I think the problem of this thread is solved.

The problem was coming from the fact that I was not copying Config.Hex for while I was asking for a complete update (including firmware…)

I hope this was the reason.

Unfortunately the updating process seems not working, after reboot the system does not restart on the application… I will open a new post for that.

Many thank for the help that all contributors have provided.