Main Site Documentation

Invalid Checksum on SPOT.Hardware.SerialPort?


#1

Hi.

I just merged latest codeplex/svn porting sources for GHI open firmware for .NETMF 4.2.

Building and flashing went fine, but whatever managed app I try to deploy complainss with following message:

Loading start at 805eed8, end 808681c

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) ********************************************************************


  •                                                                 *
    
  • ERROR!!! Firmware version does not match managed code version!!! *

  •                                                                 *
    
  •                                                                 *
    
  • Invalid native checksum: Microsoft.SPOT.Hardware.SerialPort 0x4E6685A9!=0x1C1E5B6D *

  •                                                                 *
    

Error: 96000000

Since I’m quite sure that managed assemblies are ok (the built ones and official SDK ones match) I think there must be an issue on native part of SPOT.Hardware.SerialPort.

Any suggestion?

Thanks!


#2

Mmm…it seems that checksum is defined in “C:\MicroFrameworkPK_v4_2\CLR\Libraries\SPOT_Hardware\SPOT_Serial\spot_hardware_serial_native.cpp” as follows:



const CLR_RT_NativeAssemblyData g_CLR_AssemblyNative_Microsoft_SPOT_Hardware_SerialPort =
{
    "Microsoft.SPOT.Hardware.SerialPort", 
 #if defined(PLATFORM_ARM)
    0x1C1E5B6D,
 #else
    0x4E6685A9,
 #endif
    method_lookup
};

So now the question is: “why is PLATFORM_ARM undefined”?

I can see many #define PLATFORM_ARM_xxx in each platform_selector.h, but it seems that PLATFORM_ARM is defined if and only if compiler settings contain “arm” or “__arm”…am I wrong?


#3

Solved.

C:\MicroFrameworkPK_v4_2\CLR\Libraries\SPOT_Hardware\SPOT_Serial\spot_hardware_serial_native.cpp was modified by a recent update, probably to build SH (i.e. Renesas) solutions.