public override void OnAction(IMFDeployForm form, MFDevice device)
            {
                if (form == null || device == null)
                {
                    return;
                }

                _DBG.Engine engine = device.DbgEngine;

                engine.RebootDevice(Microsoft.SPOT.Debugger.Engine.RebootOption.EnterBootloader);

                device.ConnectToTinyBooter();
            }
            public override void OnAction(IMFDeployForm form, MFDevice device)
            {
                _DBG.Engine engine = device.DbgEngine;

                if (device.ConnectToTinyBooter())
                {
                    // ExecuteMemory at address 0 performs an enumerate and execute, which
                    // will clear the bootloader entry flag
                    engine.ExecuteMemory(0);
                }
                else
                {
                    form.DumpToOutput("Unable to connect to TinyBooter!");
                }
            }
            public override void OnAction(IMFDeployForm form, MFDevice device)
            {
                if (device.ConnectToTinyBooter())
                {
                    _WP.Commands.Monitor_FlashSectorMap.Reply reply = device.DbgEngine.GetFlashSectorMap();

                    if (reply != null)
                    {
                        foreach (_WP.Commands.Monitor_FlashSectorMap.FlashSectorData sector in reply.m_map)
                        {
                            if (0 != (sector.m_flags & _WP.Commands.Monitor_FlashSectorMap.c_MEMORY_USAGE_CODE) ||
                                0 != (sector.m_flags & _WP.Commands.Monitor_FlashSectorMap.c_MEMORY_USAGE_CONFIG))
                            {
                                device.DbgEngine.EraseMemory(sector.m_address, sector.m_size);
                            }
                        }
                    }
                }
            }