esp32nanoframework

ESP32-WROOM32 always rebooting, trying to resolve dependencies


I have a project running on an ESP32-WROOM32 chip. Target used for the firmware is ESP32_REV3. This project emulate an electronic card which communicates with another software. It open a COM port (COM2) and send back some bytes depending on what is received.

Until a few days, the projects runs correctly, but, without knowing why (except the fact I upgraded a Nuget, but reverting to an older version does not fix the problem), the chip is still rebooting.

I've tried firmware versions 1.9.1.52, 1.9.1.28 and 1.9.125 the problem is still the same.

The application itself is really simple (I commented the code to make sure nothing to deal with it):

using System.Diagnostics;
using System.Threading;

namespace NewElectronicBoard
{
    public class Program
    {

        public static void Main()
        {

            Debug.WriteLine(@"/*****************************************\");
            Debug.WriteLine(@"|   C A B I N E T   Emulator              |");
            Debug.WriteLine(@"|                                         |");
            Debug.WriteLine(@"|                           Starting...   |");
            Debug.WriteLine(@"\*****************************************/");


            //var board = new MainBoard();
            //board.Start();
            Thread.Sleep(Timeout.Infinite);
        }
    }
}

Packages used by the application:

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="nanoFramework.CoreLibrary" version="1.15.5" targetFramework="netnano1.0" />
  <package id="nanoFramework.Hardware.Esp32" version="1.6.12" targetFramework="netnano1.0" />
  <package id="nanoFramework.Runtime.Events" version="1.11.15" targetFramework="netnano1.0" />
  <package id="nanoFramework.System.Device.Gpio" version="1.1.38" targetFramework="netnano1.0" />
  <package id="nanoFramework.System.IO.Ports" version="1.1.84" targetFramework="netnano1.0" />
  <package id="nanoFramework.System.IO.Streams" version="1.1.59" targetFramework="netnano1.0" />
  <package id="nanoFramework.System.Text" version="1.2.54" targetFramework="netnano1.0" />
</packages>

No problem when flashing the chip:


C:\Users\Michael>nanoff --update --serialport com8 --platform esp32 --masserase
.NET nanoFramework Firmware Flasher v2.5.61+d0a7ea15b0
Copyright (C) 2019 .NET Foundation and nanoFramework project contributors


Reading details from chip...OK

Connected to:
ESP32 (ESP32-D0WD-V3 (revision v3.1))
Features WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Flash size 4MB unknown from  (manufacturer 0x84 device 0x16406)
PSRAM: not available
Crystal 40MHz
MAC 64:B7:08:60:9B:C4


No target name was provided! Using 'ESP32_REV3' based on the device characteristics.

Extracting ESP32_REV3-1.9.1.52.zip...OK

Updating to 1.9.1.52

Erasing flash...OK
Flashing firmware...OK                                                                                                  

Uploading the device works fine also:

16:26:56.111 [Starting deployment transaction from v2022.3.0.67+395fd66257]
16:26:56.115 [Starting debug engine on nanoDevice]
16:26:56.127 [Connecting to debugger engine...OK]
16:26:56.697 [Assemblies to deploy:]
16:26:56.697 [Assembly: NewElectronicBoard v1.0.0.0 (14224 bytes)]
16:26:56.707 [Assembly: nanoFramework.System.Text v1.2.54.0 (5828 bytes)]
16:26:56.707 [Assembly: System.IO.Streams v1.1.59.0 (6868 bytes)]
16:26:56.708 [Assembly: mscorlib v1.15.6.0 (31892 bytes)]
16:26:56.708 [Assembly: System.IO.Ports v1.1.84.0 (5640 bytes)]
16:26:56.708 [Assembly: System.Device.Gpio v1.1.38.0 (5868 bytes)]
16:26:56.709 [Assembly: nanoFramework.Hardware.Esp32 v1.6.12.0 (12176 bytes)]
16:26:56.709 [Assembly: nanoFramework.Runtime.Events v1.11.15.0 (3412 bytes)]
16:26:56.710 [Deploying 8 assemblies to device]
16:26:57.271 [Incrementally deploying assemblies to the device]
16:26:57.271 [Erasing block @ 0x001B0000...]
16:26:57.644 [Deploying 1012/85908 bytes.]
16:26:57.690 [Deploying 2024/85908 bytes.]
16:26:57.738 [Deploying 3036/85908 bytes.]
(skipping logs for deploying 4048 to 85008 bytes)
16:27:01.613 [Deploying 85908/85908 bytes.]
16:27:01.695 [Assemblies successfully deployed to the device]
16:27:01.719 [Launching debugger provider from v2022.3.0.67+395fd66257]
16:27:02.009 [Attempting to connect the debugger engine (1/5)]
16:27:02.009 [Assigning debug engine of target device]
16:27:02.009 [Device running nanoCLR, updating the debug flags...]
16:27:02.654 [Attempting to connect the debugger engine (1/5)]
16:27:02.654 [Device running nanoCLR, updating the debug flags...]
16:27:03.272 [Device is running nanoCLR, requesting a restart and pause of debugger (1/5).]
16:27:03.379 [nanoCLR restarted successfully.]
16:27:03.893 [Attempting to connect the debugger engine (1/5)]
16:27:03.893 [Device running nanoCLR, updating the debug flags...]
16:27:04.594 [Device is running the CLR in initialized state]
16:27:04.594 [The debugger engine is listening to debug events from the nanoDevice target]
16:27:08.293 [Error pausing execution. Terminating flag is set.]

When the device starts, it loops resolving assemblies:

16:27:02:127    Attaching to nanoDevice...
16:27:02:579    Waiting for nanoDevice to initialize...
16:27:03:461    Debugger found. Resuming boot sequence.
16:27:04:658    Create Type System.
16:27:04:689    Loading Deployment Assemblies.
16:27:04:690       Assembly: NewElectronicBoard (1.0.0.0)   (1408 RAM - 14224 ROM - 5349 METADATA)
16:27:04:690    
16:27:04:721       AssemblyRef    =       20 bytes (       5 elements)
16:27:04:721       TypeRef        =      140 bytes (      35 elements)
16:27:04:721       FieldRef       =        0 bytes (       0 elements)
16:27:04:721       MethodRef      =      240 bytes (      60 elements)
16:27:04:721       TypeDef        =      144 bytes (      18 elements)
16:27:04:721       FieldDef       =      164 bytes (      82 elements)
16:27:04:722       MethodDef      =      372 bytes (     185 elements)
16:27:04:722       StaticFields   =        0 bytes (       0 elements)
16:27:04:722    
16:27:04:722       Attributes      =        0 bytes (       0 elements)
16:27:04:722       TypeSpec        =        8 bytes (       2 elements)
16:27:04:722       Resources       =        0 bytes (       0 elements)
16:27:04:722       Resources Files =        0 bytes (       0 elements)
16:27:04:723       Resources Data  =        0 bytes
16:27:04:723       Strings         =     5907 bytes
16:27:04:723       Signatures      =      473 bytes
16:27:04:723       ByteCode        =     2840 bytes
16:27:04:723    
16:27:04:723    
16:27:04:723       Assembly: nanoFramework.System.Text (1.2.54.0)   (644 RAM - 5828 ROM - 2292 METADATA)
16:27:04:723    
16:27:04:723       AssemblyRef    =        4 bytes (       1 elements)
16:27:04:723       TypeRef        =       88 bytes (      22 elements)
16:27:04:724       FieldRef       =        4 bytes (       1 elements)
16:27:04:724       MethodRef      =      132 bytes (      33 elements)
16:27:04:724       TypeDef        =       40 bytes (       5 elements)
16:27:04:724       FieldDef       =       12 bytes (       5 elements)
16:27:04:724       MethodDef      =      148 bytes (      74 elements)
16:27:04:724       StaticFields   =        0 bytes (       0 elements)
16:27:04:724    
16:27:04:725       Attributes      =        0 bytes (       0 elements)
16:27:04:725       TypeSpec        =        0 bytes (       0 elements)
16:27:04:725       Resources       =        0 bytes (       0 elements)
16:27:04:725       Resources Files =        0 bytes (       0 elements)
16:27:04:725       Resources Data  =        0 bytes
16:27:04:725       Strings         =      216 bytes
16:27:04:725       Signatures      =      488 bytes
16:27:04:725       ByteCode        =     3196 bytes
16:27:04:726    
16:27:04:726    
16:27:04:726       Assembly: System.IO.Streams (1.1.59.0)   (868 RAM - 6868 ROM - 3083 METADATA)
16:27:04:726    
16:27:04:726       AssemblyRef    =        8 bytes (       2 elements)
16:27:04:726       TypeRef        =      112 bytes (      28 elements)
16:27:04:726       FieldRef       =        0 bytes (       0 elements)
16:27:04:727       MethodRef      =      148 bytes (      37 elements)
16:27:04:727       TypeDef        =       56 bytes (       7 elements)
16:27:04:752       FieldDef       =       44 bytes (      21 elements)
16:27:04:752       MethodDef      =      240 bytes (     120 elements)
16:27:04:753       StaticFields   =        0 bytes (       0 elements)
16:27:04:753    
16:27:04:753       Attributes      =        0 bytes (       0 elements)
16:27:04:753       TypeSpec        =        4 bytes (       1 elements)
16:27:04:753       Resources       =        0 bytes (       0 elements)
16:27:04:753       Resources Files =        0 bytes (       0 elements)
16:27:04:753       Resources Data  =        0 bytes
16:27:04:753       Strings         =      593 bytes
16:27:04:754       Signatures      =      279 bytes
16:27:04:754       ByteCode        =     3064 bytes
16:27:04:754    
16:27:04:754    
16:27:04:754       Assembly: mscorlib (1.15.6.0)   (4020 RAM - 31892 ROM - 19195 METADATA)
16:27:04:754    
16:27:04:755       AssemblyRef    =        0 bytes (       0 elements)
16:27:04:755       TypeRef        =        0 bytes (       0 elements)
16:27:04:755       FieldRef       =        0 bytes (       0 elements)
16:27:04:755       MethodRef      =        0 bytes (       0 elements)
16:27:04:755       TypeDef        =     1152 bytes (     144 elements)
16:27:04:755       FieldDef       =      196 bytes (      97 elements)
16:27:04:755       MethodDef      =     1592 bytes (     796 elements)
16:27:04:755       StaticFields   =      144 bytes (      12 elements)
16:27:04:756    
16:27:04:756       Attributes      =       40 bytes (       5 elements)
16:27:04:756       TypeSpec        =        4 bytes (       1 elements)
16:27:04:756       Resources       =        0 bytes (       0 elements)
16:27:04:756       Resources Files =        0 bytes (       0 elements)
16:27:04:756       Resources Data  =        0 bytes
16:27:04:756       Strings         =     2575 bytes
16:27:04:757       Signatures      =     2183 bytes
16:27:04:757       ByteCode        =     9993 bytes
16:27:04:757    
16:27:04:757    
16:27:04:757       Assembly: System.IO.Ports (1.1.84.0)   (840 RAM - 5640 ROM - 2765 METADATA)
16:27:04:757    
16:27:04:757       AssemblyRef    =       12 bytes (       3 elements)
16:27:04:757       TypeRef        =      116 bytes (      29 elements)
16:27:04:757       FieldRef       =        0 bytes (       0 elements)
16:27:04:758       MethodRef      =      112 bytes (      28 elements)
16:27:04:758       TypeDef        =       96 bytes (      12 elements)
16:27:04:758       FieldDef       =       64 bytes (      32 elements)
16:27:04:758       MethodDef      =      176 bytes (      88 elements)
16:27:04:758       StaticFields   =       36 bytes (       3 elements)
16:27:04:758    
16:27:04:759       Attributes      =        0 bytes (       0 elements)
16:27:04:759       TypeSpec        =        0 bytes (       0 elements)
16:27:04:759       Resources       =        0 bytes (       0 elements)
16:27:04:759       Resources Files =        0 bytes (       0 elements)
16:27:04:789       Resources Data  =        0 bytes
16:27:04:789       Strings         =     1432 bytes
16:27:04:789       Signatures      =      321 bytes
16:27:04:789       ByteCode        =     1316 bytes
16:27:04:789    
16:27:04:789    
16:27:04:789       Assembly: System.Device.Gpio (1.1.38.0)   (808 RAM - 5868 ROM - 2778 METADATA)
16:27:04:789    
16:27:04:789       AssemblyRef    =        8 bytes (       2 elements)
16:27:04:790       TypeRef        =       88 bytes (      22 elements)
16:27:04:790       FieldRef       =        4 bytes (       1 elements)
16:27:04:790       MethodRef      =       84 bytes (      21 elements)
16:27:04:790       TypeDef        =      120 bytes (      15 elements)
16:27:04:790       FieldDef       =       56 bytes (      28 elements)
16:27:04:790       MethodDef      =      180 bytes (      89 elements)
16:27:04:790       StaticFields   =       36 bytes (       3 elements)
16:27:04:791    
16:27:04:791       Attributes      =       32 bytes (       4 elements)
16:27:04:791       TypeSpec        =        0 bytes (       0 elements)
16:27:04:791       Resources       =        0 bytes (       0 elements)
16:27:04:791       Resources Files =        0 bytes (       0 elements)
16:27:04:791       Resources Data  =        0 bytes
16:27:04:791       Strings         =     1299 bytes
16:27:04:791       Signatures      =      362 bytes
16:27:04:792       ByteCode        =     1662 bytes
16:27:04:792    
16:27:04:792    
16:27:04:792       Assembly: nanoFramework.Hardware.Esp32 (1.6.12.0)   (1540 RAM - 12176 ROM - 5881 METADATA)
16:27:04:792    
16:27:04:792       AssemblyRef    =        8 bytes (       2 elements)
16:27:04:792       TypeRef        =      100 bytes (      25 elements)
16:27:04:792       FieldRef       =        0 bytes (       0 elements)
16:27:04:792       MethodRef      =      112 bytes (      28 elements)
16:27:04:793       TypeDef        =      392 bytes (      49 elements)
16:27:04:793       FieldDef       =      140 bytes (      70 elements)
16:27:04:793       MethodDef      =      376 bytes (     187 elements)
16:27:04:793       StaticFields   =       84 bytes (       7 elements)
16:27:04:793    
16:27:04:793       Attributes      =       32 bytes (       4 elements)
16:27:04:794       TypeSpec        =        0 bytes (       0 elements)
16:27:04:794       Resources       =        0 bytes (       0 elements)
16:27:04:794       Resources Files =        0 bytes (       0 elements)
16:27:04:794       Resources Data  =        0 bytes
16:27:04:794       Strings         =     4263 bytes
16:27:04:794       Signatures      =      673 bytes
16:27:04:794       ByteCode        =     1904 bytes
16:27:04:794    
16:27:04:794    
16:27:04:795       Assembly: nanoFramework.Runtime.Events (1.11.15.0)   (596 RAM - 3412 ROM - 1799 METADATA)
16:27:04:795    
16:27:04:819       AssemblyRef    =        4 bytes (       1 elements)
16:27:04:838       TypeRef        =       48 bytes (      12 elements)
16:27:04:838       FieldRef       =        0 bytes (       0 elements)
16:27:04:838       MethodRef      =       48 bytes (      12 elements)
16:27:04:839       TypeDef        =      120 bytes (      15 elements)
16:27:04:839       FieldDef       =       44 bytes (      22 elements)
16:27:04:839       MethodDef      =      104 bytes (      52 elements)
16:27:04:839       StaticFields   =       36 bytes (       3 elements)
16:27:04:839    
16:27:04:839       Attributes      =        0 bytes (       0 elements)
16:27:04:839       TypeSpec        =        0 bytes (       0 elements)
16:27:04:839       Resources       =        0 bytes (       0 elements)
16:27:04:840       Resources Files =        0 bytes (       0 elements)
16:27:04:840       Resources Data  =        0 bytes
16:27:04:840       Strings         =      739 bytes
16:27:04:840       Signatures      =      227 bytes
16:27:04:840       ByteCode        =      747 bytes
16:27:04:840    
16:27:04:840    
16:27:05:203    Resolving.
16:27:06:143       Assembly: mscorlib (1.15.6.0)   (4020 RAM - 31892 ROM - 19195 METADATA)
16:27:06:143    
16:27:06:143       AssemblyRef    =        0 bytes (       0 elements)
16:27:06:143       TypeRef        =        0 bytes (       0 elements)
16:27:06:143       FieldRef       =        0 bytes (       0 elements)
16:27:06:143       MethodRef      =        0 bytes (       0 elements)
16:27:06:143       TypeDef        =     1152 bytes (     144 elements)
16:27:06:144       FieldDef       =      196 bytes (      97 elements)
16:27:06:144       MethodDef      =     1592 bytes (     796 elements)
16:27:06:144       StaticFields   =      144 bytes (      12 elements)
16:27:06:144    
16:27:06:144       Attributes      =       40 bytes (       5 elements)
16:27:06:145       TypeSpec        =        4 bytes (       1 elements)
16:27:06:146       Resources       =        0 bytes (       0 elements)
16:27:06:159       Resources Files =        0 bytes (       0 elements)
16:27:06:159       Resources Data  =        0 bytes
16:27:06:159       Strings         =     2575 bytes
16:27:06:159       Signatures      =     2183 bytes
16:27:06:159       ByteCode        =     9993 bytes
16:27:06:159    
16:27:06:159    
16:27:06:159       Assembly: System.IO.Ports (1.1.84.0)   (840 RAM - 5640 ROM - 2765 METADATA)
16:27:06:159    
16:27:06:160       AssemblyRef    =       12 bytes (       3 elements)
16:27:06:160       TypeRef        =      116 bytes (      29 elements)
16:27:06:160       FieldRef       =        0 bytes (       0 elements)
16:27:06:160       MethodRef      =      112 bytes (      28 elements)
16:27:06:160       TypeDef        =       96 bytes (      12 elements)
16:27:06:160       FieldDef       =       64 bytes (      32 elements)
16:27:06:160       MethodDef      =      176 bytes (      88 elements)
16:27:06:160       StaticFields   =       36 bytes (       3 elements)
16:27:06:161    
16:27:06:161       Attributes      =        0 bytes (       0 elements)
16:27:06:162       TypeSpec        =        0 bytes (       0 elements)
16:27:06:174       Resources       =        0 bytes (       0 elements)
16:27:06:174       Resources Files =        0 bytes (       0 elements)
16:27:06:175       Resources Data  =        0 bytes
16:27:06:175       Strings         =     1432 bytes
16:27:06:175       Signatures      =      321 bytes
16:27:06:175       ByteCode        =     1316 bytes
16:27:06:175    
16:27:06:175    
16:27:06:175       Assembly: System.Device.Gpio (1.1.38.0)   (808 RAM - 5868 ROM - 2778 METADATA)
16:27:06:175    
16:27:06:175       AssemblyRef    =        8 bytes (       2 elements)
16:27:06:175       TypeRef        =       88 bytes (      22 elements)
16:27:06:176       FieldRef       =        4 bytes (       1 elements)
16:27:06:176       MethodRef      =       84 bytes (      21 elements)
16:27:06:176       TypeDef        =      120 bytes (      15 elements)
16:27:06:176       FieldDef       =       56 bytes (      28 elements)
16:27:06:176       MethodDef      =      180 bytes (      89 elements)
16:27:06:191       StaticFields   =       36 bytes (       3 elements)
16:27:06:191    
16:27:06:191       Attributes      =       32 bytes (       4 elements)
16:27:06:192       TypeSpec        =        0 bytes (       0 elements)
16:27:06:192       Resources       =        0 bytes (       0 elements)
16:27:06:192       Resources Files =        0 bytes (       0 elements)
16:27:06:192       Resources Data  =        0 bytes
16:27:06:192       Strings         =     1299 bytes
16:27:06:192       Signatures      =      362 bytes
16:27:06:192       ByteCode        =     1662 bytes
16:27:06:193    
16:27:06:193    
16:27:06:193       Assembly: nanoFramework.Hardware.Esp32 (1.6.12.0)   (1540 RAM - 12176 ROM - 5881 METADATA)
16:27:06:193    
16:27:06:193       AssemblyRef    =        8 bytes (       2 elements)
16:27:06:193       TypeRef        =      100 bytes (      25 elements)
16:27:06:193       FieldRef       =        0 bytes (       0 elements)
16:27:06:193       MethodRef      =      112 bytes (      28 elements)
16:27:06:193       TypeDef        =      392 bytes (      49 elements)
16:27:06:206       FieldDef       =      140 bytes (      70 elements)
16:27:06:206       MethodDef      =      376 bytes (     187 elements)
16:27:06:206       StaticFields   =       84 bytes (       7 elements)
16:27:06:206    
16:27:06:207       Attributes      =       32 bytes (       4 elements)
16:27:06:207       TypeSpec        =        0 bytes (       0 elements)
16:27:06:207       Resources       =        0 bytes (       0 elements)
16:27:06:207       Resources Files =        0 bytes (       0 elements)
16:27:06:207       Resources Data  =        0 bytes
16:27:06:207       Strings         =     4263 bytes
16:27:06:207       Signatures      =      673 bytes
16:27:06:208       ByteCode        =     1904 bytes
16:27:06:208    
16:27:06:208    
16:27:06:208       Assembly: nanoFramework.Runtime.Events (1.11.15.0)   (596 RAM - 3412 ROM - 1799 METADATA)
16:27:06:208    
16:27:06:208       AssemblyRef    =        4 bytes (       1 elements)
16:27:06:208       TypeRef        =       48 bytes (      12 elements)
16:27:06:208       FieldRef       =        0 bytes (       0 elements)
16:27:06:210       MethodRef      =       48 bytes (      12 elements)
16:27:06:210       TypeDef        =      120 bytes (      15 elements)
16:27:06:222       FieldDef       =       44 bytes (      22 elements)
16:27:06:222       MethodDef      =      104 bytes (      52 elements)
16:27:06:222       StaticFields   =       36 bytes (       3 elements)
16:27:06:222    
16:27:06:223       Attributes      =        0 bytes (       0 elements)
16:27:06:223       TypeSpec        =        0 bytes (       0 elements)
16:27:06:223       Resources       =        0 bytes (       0 elements)
16:27:06:223       Resources Files =        0 bytes (       0 elements)
16:27:06:223       Resources Data  =        0 bytes
16:27:06:223       Strings         =      739 bytes
16:27:06:237       Signatures      =      227 bytes
16:27:06:254       ByteCode        =      747 bytes
16:27:06:254    
16:27:06:254    
16:27:06:612    Resolving.
16:27:09:327    Le programme '[1] .NET nanoFramework application: Managé' s'est arrêté avec le code 0 (0x0).
16:27:09:646       Assembly: mscorlib (1.15.6.0)   (4020 RAM - 31892 ROM - 19195 METADATA)
16:27:09:646    
16:27:09:646       AssemblyRef    =        0 bytes (       0 elements)
16:27:09:646       TypeRef        =        0 bytes (       0 elements)
16:27:09:647       FieldRef       =        0 bytes (       0 elements)
16:27:09:647       MethodRef      =        0 bytes (       0 elements)
16:27:09:647       TypeDef        =     1152 bytes (     144 elements)
16:27:09:647       FieldDef       =      196 bytes (      97 elements)
16:27:09:647       MethodDef      =     1592 bytes (     796 elements)
16:27:09:647       StaticFields   =      144 bytes (      12 elements)
16:27:09:647    
16:27:09:648       Attributes      =       40 bytes (       5 elements)
16:27:09:648       TypeSpec        =        4 bytes (       1 elements)
16:27:09:648       Resources       =        0 bytes (       0 elements)
16:27:09:648       Resources Files =        0 bytes (       0 elements)
16:27:09:648       Resources Data  =        0 bytes
16:27:09:648       Strings         =     2575 bytes
16:27:09:648       Signatures      =     2183 bytes
16:27:09:648       ByteCode        =     9993 bytes
16:27:09:649    
16:27:09:649    
16:27:09:649       Assembly: System.IO.Ports (1.1.84.0)   (840 RAM - 5640 ROM - 2765 METADATA)
16:27:09:649    
16:27:09:649       AssemblyRef    =       12 bytes (       3 elements)
16:27:09:649       TypeRef        =      116 bytes (      29 elements)
16:27:09:649       FieldRef       =        0 bytes (       0 elements)
16:27:09:649       MethodRef      =      112 bytes (      28 elements)
16:27:09:649       TypeDef        =       96 bytes (      12 elements)
16:27:09:649       FieldDef       =       64 bytes (      32 elements)
16:27:09:650       MethodDef      =      176 bytes (      88 elements)
16:27:09:650       StaticFields   =       36 bytes (       3 elements)
16:27:09:650    
16:27:09:650       Attributes      =        0 bytes (       0 elements)
16:27:09:650       TypeSpec        =        0 bytes (       0 elements)
16:27:09:650       Resources       =        0 bytes (       0 elements)
16:27:09:650       Resources Files =        0 bytes (       0 elements)
16:27:09:650       Resources Data  =        0 bytes
16:27:09:651       Strings         =     1432 bytes
16:27:09:651       Signatures      =      321 bytes
16:27:09:651       ByteCode        =     1316 bytes

The only message I saw is this one:

16:27:09:327    Le programme '[1] .NET nanoFramework application: Managé' s'est arrêté avec le code 0 (0x0).

I do not understand what's going wrong. Could someone help me getting my device responding ?

Many thanks.


Solution

  • I finally find out where was the problem !

    In my code, I use some non-generic event, which can be usefull.

    public EventHandler<BytesReceivedEventArgs> ByteReceived;
    public EventHandler<MessageReceivedEventArgs> MessageReceived;
    

    I unfortunately forgot that nanoFramework does not support (yet) generic types. Once these events definition changed not to use the non generic form, I've been able to run/debug my application.

    NB: Not supported does not mean that we can't use generic events.

    ByteReceived?.Invoke(this, new BytesReceivedEventArgs { Bytes = buffer });
    
            private void SerialComByteReceived(object sender, EventArgs e)
            {
                if (commandProcessor == null) { return; }
                var arg = (BytesReceivedEventArgs)e;
                foreach (var value in arg.Bytes)
                {
                    commandProcessor.CheckCommand(value);
                }
            }