Getting started with the Cerberus

Hi folks,

I’m currently trying to get started with the Cerberus, but it’s not really working out.

I’m using the latest firmware I believe:

[quote]ClrInfo.clrVersion: 4.2.0.0
ClrInfo.clrVendorInfo: Copyright Oberon microsystems, Inc.
ClrInfo.targetFrameworkVersion: 4.2.0.0
SolutionReleaseInfo.solutionVersion: 4.2.2.0
SolutionReleaseInfo.solutionVendorInfo: Copyright (C) GHI Electronics, LLC
SoftwareVersion.BuildDate: Jul 20 2012
SoftwareVersion.CompilerVersion: 410462[/quote]

So, what have I done? I started a new gadgeteer app, dragged a display_HD44780, joystick and UsbClientDP module into the designer, as you can see in the attachment “gadgeteer_designer.jpg”. Then I added this code:

// Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
Debug.Print("Program Started");

display_HD44780.Clear();

while (true)
{
    Joystick.Position pos = joystick.GetJoystickPosition();
    display_HD44780.SetCursor(0, 0);
    display_HD44780.PrintString(pos.X.ToString());
    display_HD44780.SetCursor(1, 0);
    display_HD44780.PrintString(pos.Y.ToString());
}

First problem I encountered:
I got the error: “The type or namespace name ‘Networking’ does not exist in the namespace ‘Gadgeteer’ (are you missing an assembly reference?)”
A simple one, I think. I just commented out “using Gadgeteer.Networking;” since that was on the erroneous line. I don’t use networking anyways.

I compiled my app, deployed it, and tried to start it, resulting in this error:

[quote]Create TS.

Loading start at 806e0e8, end 809661c

Assembly: mscorlib (4.2.0.0)Assembly: Microsoft.SPOT.Native (4.2.0.0)Assembly: Microsoft.SPOT.Hardware (4.2.0.0)
Assembly: Microsoft.SPOT.Graphics (4.2.0.0)Assembly: Microsoft.SPOT.TinyCore (4.2.0.0)
Assembly: Microsoft.SPOT.Hardware.SerialPort (4.2.0.0)Assembly: Microsoft.SPOT.IO (4.2.0.0)
Assembly: System.IO (4.2.0.0)Assembly: Microsoft.SPOT.Hardware.OneWire (4.2.0.0)Assembly: Microsoft.SPOT.Hardware.Usb (4.2.0.0)
Assembly: Microsoft.SPOT.Hardware.PWM (4.2.0.1)Assembly: Microsoft.SPOT.Net (4.2.0.0)
Assembly: System (4.2.0.0)Loading Deployment Assemblies.

Attaching deployed file.

Assembly: GTM.GHIElectronics.Display_HD44780 (1.0.1.0)Attaching deployed file.
Assembly: GTM.GHIElectronics.Joystick (1.0.1.0)Attaching deployed file.
Assembly: Gadgeteer (2.41.0.0)Attaching deployed file.
Assembly: GHI.OSHW.Hardware (4.2.2.0)Attaching deployed file.
Assembly: System.Http (4.2.0.0)Attaching deployed file.
Assembly: Microsoft.SPOT.Net.Security (4.2.0.0)Attaching deployed file.
Assembly: GHIElectronics.Gadgeteer.FEZCerberus (1.0.5.0)Attaching deployed file.
Assembly: Microsoft.SPOT.Touch (4.2.0.0)Attaching deployed file.
Assembly: GTM.GHIElectronics.UsbClientDP (1.0.0.0)Attaching deployed file.
Assembly: GadgeteerApp1 (1.0.0.0)Attaching deployed file.
Assembly: System.Net.Security (4.2.0.0)Resolving.

Resolve: unknown type: Microsoft.SPOT.Touch.TouchScreenEventHandler
Error: ff000000

Waiting for debug commands…
The program ‘[1] Micro Framework application: Managed’ has exited with code 0 (0x0).[/quote]

Okay, I’m not using any touch screen technology, so I removed the reference Microsoft.SPOT.Touch.
This resulted in another error:

[quote]Create TS.

Loading start at 806e0e8, end 809661c

Assembly: mscorlib (4.2.0.0)Assembly: Microsoft.SPOT.Native (4.2.0.0)Assembly: Microsoft.SPOT.Hardware (4.2.0.0)
Assembly: Microsoft.SPOT.Graphics (4.2.0.0)Assembly: Microsoft.SPOT.TinyCore (4.2.0.0)
Assembly: Microsoft.SPOT.Hardware.SerialPort (4.2.0.0)Assembly: Microsoft.SPOT.IO (4.2.0.0)
Assembly: System.IO (4.2.0.0)Assembly: Microsoft.SPOT.Hardware.OneWire (4.2.0.0)Assembly: Microsoft.SPOT.Hardware.Usb (4.2.0.0)
Assembly: Microsoft.SPOT.Hardware.PWM (4.2.0.1)Assembly: Microsoft.SPOT.Net (4.2.0.0)
Assembly: System (4.2.0.0)Loading Deployment Assemblies.

Attaching deployed file.

Assembly: GTM.GHIElectronics.Display_HD44780 (1.0.1.0)Attaching deployed file.
Assembly: GTM.GHIElectronics.Joystick (1.0.1.0)Attaching deployed file.
Assembly: Gadgeteer (2.41.0.0)Attaching deployed file.
Assembly: GHI.OSHW.Hardware (4.2.2.0)Attaching deployed file.
Assembly: System.Http (4.2.0.0)Attaching deployed file.
Assembly: Microsoft.SPOT.Net.Security (4.2.0.0)Attaching deployed file.
Assembly: GHIElectronics.Gadgeteer.FEZCerberus (1.0.5.0)Attaching deployed file.
Assembly: GTM.GHIElectronics.UsbClientDP (1.0.0.0)Attaching deployed file.
Assembly: GadgeteerApp1 (1.0.0.0)Attaching deployed file.
Assembly: System.Net.Security (4.2.0.0)Resolving.

Link failure: some assembly references cannot be resolved!!

Assembly: GTM.GHIElectronics.Display_HD44780 (1.0.1.0) needs assembly ‘Gadgeteer’ (2.41.0.0)
Assembly: GTM.GHIElectronics.Display_HD44780 (1.0.1.0) needs assembly ‘mscorlib’ (4.1.2821.0)
Assembly: GTM.GHIElectronics.Joystick (1.0.1.0) needs assembly ‘Gadgeteer’ (2.41.0.0)
Assembly: GTM.GHIElectronics.Joystick (1.0.1.0) needs assembly ‘mscorlib’ (4.1.2821.0)
Assembly: Gadgeteer (2.41.0.0) needs assembly ‘mscorlib’ (4.1.2821.0)
Assembly: Gadgeteer (2.41.0.0) needs assembly ‘Microsoft.SPOT.TinyCore’ (4.1.2821.0)
Assembly: Gadgeteer (2.41.0.0) needs assembly ‘Microsoft.SPOT.Graphics’ (4.1.2821.0)
Assembly: Gadgeteer (2.41.0.0) needs assembly ‘Microsoft.SPOT.Native’ (4.1.2821.0)
Assembly: Gadgeteer (2.41.0.0) needs assembly ‘Microsoft.SPOT.Hardware’ (4.1.2821.0)
Assembly: Gadgeteer (2.41.0.0) needs assembly ‘Microsoft.SPOT.Net’ (4.1.2821.0)
Assembly: Gadgeteer (2.41.0.0) needs assembly ‘Microsoft.SPOT.IO’ (4.1.2821.0)
Assembly: Gadgeteer (2.41.0.0) needs assembly ‘System.IO’ (4.1.2821.0)
Assembly: Gadgeteer (2.41.0.0) needs assembly ‘Microsoft.SPOT.Hardware.SerialPort’ (4.1.2821.0)
Assembly: GHIElectronics.Gadgeteer.FEZCerberus (1.0.5.0) needs assembly ‘Gadgeteer’ (2.42.0.0)
Assembly: GTM.GHIElectronics.UsbClientDP (1.0.0.0) needs assembly ‘Gadgeteer’ (2.41.0.0)
Assembly: GTM.GHIElectronics.UsbClientDP (1.0.0.0) needs assembly ‘Microsoft.SPOT.Hardware’ (4.1.2821.0)
Assembly: GadgeteerApp1 (1.0.0.0) needs assembly ‘Gadgeteer’ (2.41.0.0)
Assembly: GadgeteerApp1 (1.0.0.0) needs assembly ‘GTM.GHIElectronics.UsbClientDP’ (1.0.0.0)
Assembly: GadgeteerApp1 (1.0.0.0) needs assembly ‘GTM.GHIElectronics.Display_HD44780’ (1.0.1.0)
Assembly: GadgeteerApp1 (1.0.0.0) needs assembly ‘GTM.GHIElectronics.Joystick’ (1.0.1.0)
Assembly: GadgeteerApp1 (1.0.0.0) needs assembly ‘GHIElectronics.Gadgeteer.FEZCerberus’ (1.0.5.0)

Error: a3000000

Waiting for debug commands…
The program ‘[2] Micro Framework application: Managed’ has exited with code 0 (0x0).
[/quote]

Now I’m stuck. I can’t get a simple app running on the Cerberus. Help? :wink:

Ps. at almost any change I get the error as displayed in “gadgeteer_security_warning.jpg”. I click “OK” all the time. Could this be related by any chance?

It sounds like you need to install the ethernet version of the firmware.

I did just that, but that didn’t help. In my humble opinion it shouldn’t matter either; I’m not using networking, nor networking assemblies if I’m correct. The error about networking is even before deployment to the device, so it’s not even firmware related.

You have references mismatch.

Assembly: GTM.GHIElectronics.Display_HD44780 (1.0.1.0) needs assembly ‘Gadgeteer’ (2.41.0.0)
Assembly: GHIElectronics.Gadgeteer.FEZCerberus (1.0.5.0) needs assembly ‘Gadgeteer’ (2.42.0.0)

Install latest SDK

Now I’m stuck. I can’t get a simple app running on the Cerberus. Help? :wink:

Ps. at almost any change I get the error as displayed in “gadgeteer_security_warning.jpg”. I click “OK” all the time. Could this be related by any chance?
[/quote]

Do you have QFE2 installed?

@ Aron - gotta be a bit quicker a :wink:

get the latest SDK here:
http://www.tinyclr.com/forum/topic?id=7982

That’s very interesting. Why do I think it is?
I installed a package. No matter for the version, the firmware and SDK was in the exact same zip file named “GHI NETMF v4.2 and .NET Gadgeteer Package (Beta 7-23-2012).zip”
So if the versions between the SDK and the firmware don’t match, something is wrong with the installer.
I flashed my cerberus with the files that are installed at “C:\Program Files (x86)\GHI Electronics\GHI OSHW NETMF v4.2 SDK\FEZ Cerberus\Firmware”.

Too bad Aron did remove his post though. His post was:

Yes, I have. I work with some other .NETMF platforms as well, which require QFE2 with WinUSB support.

@ Garrcomm - Did you start with a Gadgeteer NETMF 4.1 project, or 4.2?

The reason I ask is that several of the errors below appear to reference 4.1 versions of assemblies, which seems odd.

I would suggest that you start a new project, keeping things as simple as possible, with just the Cerberus on the design surface, and modify the contents of ProgramStarted method in Program.cs as follows:

Debug.Print("Program Started");

Mainboard.SetDebugLED(true);

Debug.Print("Exiting Program Started");

If that works, you should be good to go in terms of firmware versions.

One other note…don’t use while(true) loops inside ProgramStarted. Gadgeteer uses a different execution model than plain NETMF projects, and if you block ProgramStarted from exiting, the Gadgeteer runtime won’t be able to raise events from things like buttons, etc. See Kerry’s post here for more info:

http://blogs.msdn.com/b/net_gadgeteer/archive/2011/12/19/why-not-while-true.aspx

That is probably the problem. Might need to wait a little bit for QFE2 support or roll back to QFE1.

That’s the exact same SDK as I have installed right now, Beta 7-23-2012 is still the latest right?
Attached (gadgeteer_versions.jpg) you’ll see what I have installed in the categories GHI and .NETMF. A lot of different version numbers, but I think this should be correct.

[quote=“devhammer”]
@ Garrcomm - Did you start with a Gadgeteer NETMF 4.1 project, or 4.2?

The reason I ask is that several of the errors below appear to reference 4.1 versions of assemblies, which seems odd.[/quote]
I noticed the same thing, but I started with 4.2. The Cerberus isn’t even available in 4.1, so I don’t think I could even go wrong on that track.
As I wrote in my first post, before that I already had different issues. Maybe that’s just caused by one of my earlier ‘fixes’. I just checked the references and all are 4.2.

[quote=“devhammer”]I would suggest that you start a new project, keeping things as simple as possible, with just the Cerberus on the design surface, and modify the contents of ProgramStarted method in Program.cs as follows:

Debug.Print("Program Started");

Mainboard.SetDebugLED(true);

Debug.Print("Exiting Program Started");

If that works, you should be good to go in terms of firmware versions.[/quote]

If I do that, I’m at “The type or namespace name ‘Networking’ does not exist in the namespace ‘Gadgeteer’ (are you missing an assembly reference?)” again, and when I comment out networking, “Resolve: unknown type: Microsoft.SPOT.Touch.TouchScreenEventHandler” again.

That’s unfortunate. In that case I need to set up another pc to develop for Cerberus. I really need QFE2 other stuff :frowning:

I had the same problem. the software worked 2 weeks ago and stopped.
I installed Resharper 7 between when it ran fine and didn’t so i chalked it up to that.
just finished reformatting my harddrive and tyring to get every thing reinstalled to verify that it is working again

Okay, I figured it out.
Some references were pointing at 4.1 dlls, whilst most were pointing at 4.2 dlls.
Since I started with a Gadgeteer 4.2 template, this made me worry. I noticed this only happened for GHI modules.

I tried to repair the GHI. NET Gadgeteer SDK v4.2 installer, but that didn’t worked at all.
Finally I removed that package and installed it again, solved.

I think this happened:

  • I installed all SDKs for different platforms (.netmf4.2qfe1, gadgeteer, ghi.net stuff, seeed.net stuff, netduino stuff, etc).
  • I installed QFE2 after that
  • I repaired all SDKs (or at least I thought) so they added the correct registry settings again

All SDKs got repaired, except for the GHI .NET Gadgeteer SDK. Although I clicked repair. Well, problem solved.

“You cannot select your post as the answer”

hmmm… anyone, care to quote my post so I can flag that as the answer? :wink:

do you still have QFE2 installed?

i really don’t want the points…true…

GarrcommNewbie with 200 exp6 minutes ago #12
Okay, I figured it out.
Some references were pointing at 4.1 dlls, whilst most were pointing at 4.2 dlls.
Since I started with a Gadgeteer 4.2 template, this made me worry. I noticed this only happened for GHI modules.

I tried to repair the GHI. NET Gadgeteer SDK v4.2 installer, but that didn’t worked at all.
Finally I removed that package and installed it again, solved.

I think this happened:

  • I installed all SDKs for different platforms (.netmf4.2qfe1, gadgeteer, ghi.net stuff, seeed.net stuff, netduino stuff, etc).
  • I installed QFE2 after that
  • I repaired all SDKs (or at least I thought) so they added the correct registry settings again

All SDKs got repaired, except for the GHI .NET Gadgeteer SDK. Although I clicked repair. Well, problem solved.

Yes I do. I can now deploy to all my .netmf devices, 4.1, 4.2 qfe1 and 4.2 qfe2. yay ! :slight_smile:

I undeleted my one post as It apparently did help somewhat and everybody here seemed to have seen it anyway. :wink:

What happens on the internet, stays on the internet. Unfortunately sometimes :wink:

But thanks all for bearing with me during 2 hours of frustrations :smiley:

@ Garrcomm - indeed, i have had a few rather embarrassing moments that appear to be immortalized in the digital world.
Glad you are up and running :slight_smile: