Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Cannot find any entrypoint! - The program '[16] Micro Framework application: Managed' has exited with code 0 (0x0).

netduino plus 2

  • Please log in to reply
10 replies to this topic

#1 jdouglas18

jdouglas18

    New Member

  • Members
  • Pip
  • 5 posts

Posted 05 May 2015 - 05:00 AM

Hi Netduino Forums!

 

I'm fairly new to Netduino, but have been using Arduino for awhile. I'm using a Netduino Plus 2 and after trying quite a bit with v4.3.1 firmware, I decided I'd try v4.3.2. I can confirm that simple programs that include the LED blinking will indeed work and attach to the debugger(https://gist.github....20a8667d975a41d), but it seems anything that has to do with Digital I/O(Pins) seems to crash well before it can even invoke the main program and thus the debugger never gets connected. Currently I'm unable to get past an error stating:

 

Cannot find any entrypoint!

 

Which then leads to the following in the Microframework Logs:

 

The program '[16] Micro Framework application: Managed' has exited with code 0 (0x0).

 

I do have a fairly simple Program.cs:

 

public static void Main()
        {
            using (var led = new Microsoft.SPOT.Hardware.OutputPort (Pins.ONBOARD_LED, false)) {

                for (var i = 0; i < 3; i++) {
                    led.Write (true);
                    Thread.Sleep (250);
                    led.Write (false);
                    Thread.Sleep (250);
                }
            }

         }

 

Debug Output:

 

https://gist.github....69f7c0f24cf63d1

 

MFDeploy Version Information:

 

https://gist.github....7e8e7aa468b9d53

 

.NET Microframework Device Deployment:

 

https://gist.github....49cff321828efe6

 

I have tried to re-flash this board multiple times now just in case I missed something in terms of versions. I've also tried to get the board to a "fresh" state by either using the Updater and clearing the applications, or using MFDeploy -> Clear.

 

Any help would be appreciated!



#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 05 May 2015 - 05:11 AM

Hi jdouglas18,

This is a frustrating bug with the NETMF 4.3 SDK that crops up from time to time. Basically it deploys to the board--but doesn't actually deploy. What you're seeing in the boot data is that there's no app loaded on the board.

If you redeploy the same app a second time, does it deploy correctly? If not we'll need to dig further.

There are a bunch of bugfixes around these kinds of scenarios in the upcoming NETMF 4.4 SDK. I know that doesn't help right now--but quite a bit of NETMF 4.4 was shown off at //build/ so hopefully we'll be able to get a 4.4-based SDK with core SDK bugfixes out in the near future.

Chris

#3 JoopC

JoopC

    Advanced Member

  • Members
  • PipPipPip
  • 148 posts

Posted 05 May 2015 - 06:00 AM

i do like this ....


Remove Microsoft NetMF, Netduino sdk
stop all other input/output activeties to other devices, (eg stop internet radio)
install NetMF and the latest Netduino sdk.

use a NEW usb poort on your computer.

#4 jdouglas18

jdouglas18

    New Member

  • Members
  • Pip
  • 5 posts

Posted 05 May 2015 - 04:01 PM

@Chris

 

The redeployment of the app just does the same thing, which is the respective errors in the first post. Do you perhaps have any troubleshooting ideas that I might have overlooked? I'm targeting 4.3 in my projects, so I don't suppose an issue is the target framework?

 

@JoopC

 

I started with the following post: http://forums.netdui...showtopic=10479

 

To which I updated my firmware to 4.3.1.

 

I had the following versions installed:
 

.NET Microframework v4.3 QFE1 SDK

Netduino 4.3.1 SDK

 

This wouldn't let me deploy anything to my board, so I then looked around for the latest version of Microframework:

 

https://netmf.codepl...ads/get/1423115- (Dated Jan 26 2015)

 

After installing this, I was able to install and debug my simple LED program.

 

I had the following versions installed:

 

.NET Microframework v4.3 QFE2-RTM SDK

Netduino 4.3.1 SDK

 

Out of curiosity yesterday, I saw a very recent firmware release for 4.3.2(http://forums.netdui...-firmware-v432/), so I decided to update to that. It still lets me deploy my LED program, but not the Digital I/O program.

 

I would go ahead and try .NET MF 4.4, but I believe Netduino needs a 4.4 SDK for this to work:

 

https://github.com/N...Getting Started

 

I will try your suggestion tonight and report back!



#5 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 05 May 2015 - 05:49 PM

Hi jdouglas18,

If JoopC's suggestion doesn't work, we'll want to try a few debug steps:

1. We'll want to grab a copy of your actual Visual Studio solution, to see if deploying it from our machines to NETMF 4.3.1 on another board has the same effect.

2. We'll want to image your board after deployment, to compare the image against the factory-fresh (Netduino Update-flashed) image. This will let us know if the files are getting deployed from Visual Studio or if the issue is on the runtime side.

3. We'll want to verify that everything is correct with your NETMF and Netduino SDK installation. There's a possibility that the NETMF SDK is getting confused due to a DLL mismatch etc. (which shouldn't happen but...)

Let's get you up and running here...

Chris

#6 jdouglas18

jdouglas18

    New Member

  • Members
  • Pip
  • 5 posts

Posted 06 May 2015 - 03:53 AM

Hi Chris and JoopC!

 

I tried this out last night and no cigar.

 

1) The solution can be downloaded here: https://github.com/x...cro.Robotroller

 

(Full Sample in case a missing project reference - https://github.com/x...ps/Robotroller)

 

Please note that I did some small refactoring for my specific board:

 

Changed Reference: SecretLabs.NETMF.Hardware.Netduino -> SecretLabs.NETMF.Hardware.NetduinoPlus

 

Changed Pins.ONBOARD_BTN  to Pins.ONBOARD_SW1(As I believe that is the Netduino 2 Plus equivalent from peeking in a decompiler)

 

Netduino:

 

   [EditorBrowsable(EditorBrowsableState.Never)]
    public static Cpu.Pin ONBOARD_SW1
    {
      get
      {
        return (Cpu.Pin) 29;
      }
    }
 
    public static Cpu.Pin ONBOARD_BTN
    {
      get
      {
        return (Cpu.Pin) 29;
      }
    }

 

Netduino 2 Plus:

 

public static Cpu.Pin ONBOARD_SW1
    {
      get
      {
        return SecretLabs.NETMF.Hardware.Netduino.Pins.ONBOARD_SW1;
      }
    }
 

2) Do you have a guide on this topic so I can provide this image? I'd really be interested in how I can figure out if this is an issue between VS deploying or runtime

 

3) I've tried various combinations, and all seem to have the same result. What can I provide here that isn't in my MFDeploy / etc?

 

One of my sneaking suspicions is that this code might not work as "nicely" as on a regular Netduino 2. I decided to go with the Plus as I wanted to do a bit more tinkering and it seemed like the best option at the time. I know that the Netduino 3 is coming out soon and that looks quite awesome as well! Is it possible that this could be a Netduino 2 vs Netduino 2 Plus issue?

 

Finally, I really appreciate you both helping me out and looking into this specific problem. I know each of you are taking time out of your day to help me, so thanks!



#7 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 06 May 2015 - 04:06 AM

Hi jdouglas18,

Changed Reference: SecretLabs.NETMF.Hardware.Netduino -> SecretLabs.NETMF.Hardware.NetduinoPlus

Before we go any further...can you undo that change really quickly? SecretLabs.NETMF.Hardware.NetduinoPlus.dll is a backwards-compatibility assembly for the original Netduino Plus 1. All gen2 and gen3 boards use a consolidated DLL, SecretLabs.NETMF.Hardware.Netduino.dll. [We've actually removed the "Plus" version by default in the new 4.3.2 SDK.]

Does that fix your issue? If not, we'll move to the next item in the list...

Chris

#8 jdouglas18

jdouglas18

    New Member

  • Members
  • Pip
  • 5 posts

Posted 06 May 2015 - 07:15 AM

Hi Chris,

 

Unfortunately that did not resolve the issue. I still get the same error:

 

The program '[2] Micro Framework application: Managed' has exited with code 0 (0x0).

 

I also changed my MSBuild output verbosity to diagnostic to see if I might be able to dig deeper, but it doesn't seem to provide anything ontop of the minimal.

 

Onto the next item!



#9 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 06 May 2015 - 10:49 PM

Hi jdouglas18,

Do you have a copy of DfuSe Demo (as linked in the firmware update thread)?

1. Hold down your board's pushbutton while plugging in your board to your PC via USB.
2. Open DfuSe Demo v3.0.4
- In the "available DFU devices" pull-down, you should see "STM device in DFU mode"
3. In the "Upload Action" box, there are two buttons. Press "Choose..." and create a new file (DFU hex dump).
4. Press the "Upload" button to save your board's contents to the file you created.
5. Attach a ZIP of your complete solution _and the DFU file_ to a post in this thread.

We'll compare the contents of that DFU file to the base Netduino firmware to see if they match. If they contani the same empty deployment sector then nothing is getting to your board. If they don't, then it's possible that the NETMF runtime is having issues reading the files. But that will give us a starting point.

Thank you, and sorry for the extra work to get up and running here; luckily new problems are fun to solve :)

Chris

#10 jdouglas18

jdouglas18

    New Member

  • Members
  • Pip
  • 5 posts

Posted 20 May 2015 - 08:01 PM

Hi Chris,

 

Sorry for the late reply, here are my findings:

 

#1) I wasn't able to run DfuSe Demonstration on my laptop(As it would just crash everytime I hit "Upload"), so I installed everything on a fresh desktop and still ran into the errors above. I then was able to run DfuSe Demonstration from my desktop to produce a dump.

 

#2) Attached is my full solution with the dump.dfu inside:

 

https://www.dropbox....tduino.zip?dl=0

 

To run this project, open the Monkey.Robotics-master folder and then navigate to "Sample Apps/Robotroller/Robotroller.sln"

 

Please note for the Netduino specific items, you will find two projects:

 

* - Robotics.Micro.Core

 

* - Robotics.Micro.Robotroller.Netduino (References Robotics.Micro.Core)

 

These can be found under the "NetduinoRobot" folder and you can simply exclude all the "MobileApp" solution items.

 

Once again, I really appreciate all your help with me getting this code deployed to my Netduino 2 Plus!



#11 Sukasa

Sukasa

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts
  • LocationNanaimo, BC

Posted 22 May 2015 - 02:56 AM

This might be silly, but what are your build configurations?  I commonly get this error when either no deploy checkboxes are filled in, or more than one is.







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.