I’m getting error “An unhandled exception of type ‘System.Exception’ occurred in GHI.Premium.Hardware.dll” when creating a new instance of T35 display.
I get this error just from the Program.generated module.
Partial Public Class Program
Inherits Gadgeteer.Program
Private WithEvents display_T35 As Gadgeteer.Modules.GHIElectronics.Display_T35
Public Shared Sub Main()
Program.Mainboard = New GHIElectronics.Gadgeteer.FEZSpider()
Dim p As Program = New Program()
p.InitializeModules
p.ProgramStarted
'Starts Dispatcher
p.Run
End Sub
Private Sub InitializeModules()
Me.display_T35 = New GTM.GHIElectronics.Display_T35(14, 13, 12, 10)
'//Error here
End Sub
Fez Spider Dev Kit
EMX version 4.2.10
Micro framework SDK 4.3(RTM)
GHI tools 4.2
Imports Gadgeteer
Imports GTM = Gadgeteer.Modules
Partial Public Class Program
Inherits Gadgeteer.Program
' GTM.Module definitions
Private WithEvents display_T35 as Gadgeteer.Modules.GHIElectronics.Display_T35
Public Shared Sub Main()
'Important to initialize the Mainboard first
Mainboard = New GHIElectronics.Gadgeteer.FEZSpider()
Dim program As Program = New Program()
program.InitializeModules()
program.ProgramStarted()
program.Run() ' Starts Dispatcher
End Sub
Private Sub InitializeModules()
' Initialize GTM.Modules and event handlers here.
display_T35 = New GTM.GHIElectronics.Display_T35(14, 13, 12, 10)
End Sub
End Class
What SDK are you using? Can you post the Firmware version and build date? To get the build date, use the device capabilities option found under the Target Menu.
Not sure is this anything to do with the problem but I noticed that my target framework is set to .net micro framework 4.2. I have changed it to 4.3 but now I get the following deployment error.
Error 1 Cannot deploy the base assembly ‘mscorlib’, or any of his satellite assemblies, to device - USB:EMX twice. Assembly ‘mscorlib’ on the device has version 4.2.0.0, while the program is trying to deploy version 4.3.0.0