Assembly stuck - cannot deploy to Raptor

It appears that there is an old assembly running every time I turn the Raptor on. Seems to be the issue noted in the “Problems with USB or MFDeploy or FEZ Config” section on the troubleshooting page.

I have run the Firmware Updater in Fez Config. It says everything has been updated and that all assemblies have been erased, but when I power up the system, it is clearly running the same old assembly.

Is there something else I should be trying to clear the old assembly so I can deploy a new one?

Which assembly and what is the version please?


Custom assembly deployed from a VS project. As per my initial note, it is probably the issue cited in the troubleshooting info as follows:

Unable to Deploy from VS due to application code

If a deployed application contains a very tight infinite loop with no way for other threads/code to execute, it can be come difficult (if not impossible) for Visual Studio to attach to the TinyCLR interfaces necessary to re-deploy the app. The same problem can occur in devices that support PowerState.Sleep() (GHI.GameO.Power.TurnOff()) where it is invoked very early in the program.

Resetting the device doesn’t help as the minute it regains power it re-executes the currently deployed program. The first attempt you should make is to use MFDeploy and try to erase the application. If that fails you may have to reboot into tinybooter (see instructions in firmware update links: Firmware (TinyCLR) Update) and reload firmware (TinyCLR). During development, if you have a section of code that can potentially tie up the processor like this, you might want to surround the code with a safety net of some sort (wait for a button press, for instance) so that you can avoid the infinite code on power-up.

I have tried reloading firmware as described above, but it seems to have no effect.

The way I’d troubleshoot this is to erase the firmware, and at each step make sure I could see the device as I expected to - in particular, boot into the bootloader and make sure you can see the bootloader device. Make sure you can reapply the bootloader and that the board then boots into bootloader mode again successfully. Then apply netmf, and make sure you can boot and see it as a netmf device (which will have no application code deployed to it). Then create a brand new blank (LED blink) app and deploy that.


When I run erase in MFDeploy, this is what I see.

GC: 1msec 156828 bytes used, 66948936 bytes available
Type 0F (STRING ): 24 bytes
Pinging… TinyCLR
GC: 1msec 156828 bytes used, 66948936 bytes available
Type 0F (STRING ): 24 bytes
Type 15 (FREEBLOCK ): 66948936 bytes
Type 17 (ASSEMBLY ): 21084 bytes
Type 1E (BINARY_BLOB_HEAD ): 135216 bytes
Type 28 (MEMORY_STREAM_HEAD ): 36 bytes
Type 29 (MEMORY_STREAM_DATA ): 396 bytes
Type 34 (APPDOMAIN_HEAD ): 72 bytes
GC: performing heap compaction…
Cannot find any entrypoint!

I’m not sure if this succeeded or failed or what the meaning of “Cannot find an entrypoint!” is. But the Raptor continues to run the old program…

That is coming from netmf.

What can you see in Device Manager? is the manual tinybooter update process. Connect pins 8 and 10 and check Device Manager.

Go thru the manual process, then reboot the device and make sure the bootloader device shows in Device Manager.

In Step 2 below, what is PA11?

In the bullet starting with FEZ: Raptor, is this a repeat of the first bullet? Does ground and unground PA11 mean the same thing as connecting pin 8 and pin 10?

What does “Release the connection” mean? Does that mean disconnecting pin 8 and pin 10? Does it mean release the Reset button? Does it mean disconnect the usb?

Can you give me a better idea of how one executes Step 2 on the Raptor board?

Step 2.

Put the board in Loader mode:

G400: Ground PA11, reset or power cycle the board. With power still ON, unground PA11
FEZ: Raptor: find any socket with both “S” and “X” types (for instance socket 3). On that socket temporarily connect pin 8 with pin 10 (ground). Press Reset. Release the connection.
In either case, be sure to unjumper/unground the board/processor within 3 seconds

With the USB connected, Device Manager shows the GHI NETMF Debug Interface, and devices and Printers shows the G400.

In step 2 of the documenation, the “G400” bullet is for an SoC, the “FEZ Raptor” is for a mainboard.

(1) find socket #3 on your Raptor
(2) connect pin 8 with pin 10 with a wire
(3) press reset button on your Raptor board
(4) take the wire off pins 8 and 10

After the above proceed to step 3 in the documentation

(PA11 is a pin on the G400 product)

Thanks Jeff. Much clearer.

Ran through this procedure but same result. Old code still running when powered up, unable to deploy new code from Visual Studio. Device manager shows “GHI NETMF Debug interface”. Devices and Printers shows G400. Trying to deploy empty GHI project in VS2012 gives error: “Device not found or cannot be opened - USB:Gadgeteer”.

I will try it again, but anyone have any other suggestions?

Have you tried reselecting it in VS Property Dialog Drop Down Box?

Thanks Reinhard. Not sure if that was the whole solution from the beginning or not, but it finally started working again…

That doesn’t make sense. If you successfully deploy the firmware, there is no application code left on your device. There should be no way this then leaves you with a working application.

If for any reason, there is a app hex file in the same folder than the firmware, then this is (or at least might) deployed as well. How many files shows up in the firmware update screen?