Cannot find any entrypoint

I had some working programs with Fez Cobra III on .net micro. No I want to move to TinyCLR (preview 2) . I just began with the very start. Hello World. When I press F5, it starts fine.

In the Output window I see:
Found debugger!

Create TS.

Loading Deployment Assemblies.

Resolving.

The debugging target runtime is loading the application assemblies and starting execution.
Ready.

Cannot find any entrypoint!

Done.

I updated my Fez CobraIII with Bootloader v2.04 and with the latest firmware using TinyCLR config.

If I connect the new Fez board and use the same project, it just works fine.

I already tried to erase the app and even reloaded bootloader v2 and the G120 v1.0.0-preview2 firmware.

What can be wrong with the Cobra III?

Hi,
I had a similar problem not long ago, it may be the size of your application exceeds the memory capacity of your Cobra III: the entry point was overwritten during the deployment of your executable. Take a look on the Output deployment window:

“Deploying assemblies for a total size of 889348 bytes”

If you just have a program that shows Hello World, check the size of your resource files because they are automatically loaded into memory, even if they are not used.

Thanks for your reaction, but the problem must be something else.
The total size of the deployed assemblies is only around 71000 bytes.
The Fez board has less resources than the Cobra III and that worked fine with the same VS project and the same firmware version.

Make a new TinyCLR project, add nothing to it and deploy it. Does it work?

I am having similar problem G120E: "Cannot find any entrypoint" ¡ Issue #520 ¡ ghi-electronics/TinyCLR-Ports ¡ GitHub and working on it.

Hi Gus, thanks for your reaction.
Even with an empty project, I got the same problem.
The configuration looks fine to me.

In the output windows, you can see that the resources are not big and the same error occurs with the empty project. I hope you have a suggestion.

Output2

Thanks for your reply. I hope it is the same problem and that mine is solved as well when you figured it out. I sent some screen captures to Gus to give all the information.

To confirm: can you erase everything on the G120 from BL1 then reload BL2 and the latest TinyCLR, then deploy a brand new and empty project. Can you deploy or do you get the same entry point error?

Do you have a second G120E based board that you can try (not the new FEZ)?

Hi John,
Thanks for your response.
I erased the bootloader with Teraterm and loaded version 2.04 again.
Then I put the firmware on it with TinyCLR config.
I created a new VS2017 C# TinyCLR application.
I right clicked on the project and selected 'Manage Nuget Packages…
I made sure the GHIElectronics.TinyCLR.Core v1.0.0-preview2 was installed.
In Project menu, Properties I checked at TinyCLR OS if the Device was selected (G120_120).
In Application ther is a Startup project . I removed the unused usings, and added System.Diagnostics.
I added "Debug.WriteLine(“Hello World!”); in the Main procedure
Then I clicked F5.
It depoloys fine it seems, but then I got the same error.
Cannot find any entrypoint.

Apart from the Cobra III board with G120, I don’t have a board with the G120E.
I do have a Panda III board, this board works fine and the new Fez as well with the same project.

I hope you have enough information.
I look forward to your reaction (and the new preview).
Is going back to preview1 an option? What steps do I have to take in that case?

Can you please verify 2 things below:

  1. If deploy same C# project (without modifying any code), from second deploying, the board shouldn’t Erase sector…xx, Writing…xx. But in your case the board always does Erase and Writing every time hit F5.

  2. Try a simple project, just blink LED. I know when deploy you will see “Can’t find entry point” but only hit Reset button, is the led blinking?

We ask to make sure we are same issue.

Hi Dat,

I verified the 2 things you suggested:

  1. If I deploy the same C# project again by hitting F5 the board is erasing sector1 65… bytes and then writing sector 1 again. This is indeed happening each time I hit F5.
  2. I deployed the Blinking Led project. I see the ‘Can’t find entry point’ in the output Window. After hitting the Reset button the led starts blinking. Only it stops after one or two minutes.After a reset a starts blinking again. I hope this will give you enough information. Thanks.

Hi, EDuijvestijn, thank you too much for your helping.

I think your issue is same as mine.

If your project doesn’t require FileSystem and Graphics yet, and you are comfortable with GCC,Github, and you don’t want to stop the project until we have final decision on next release, you can recompile G120 firmware from our git branch (use tag v1.0.0-Preview2).

Somehow in my case, pin P3.30 effect to miso pin P0.8 internally, cause loading firmware incorrectly. So in …\Devices\G120\Device.h, at line LPC17_GPIO_PINS:

First step, find where the pin P3.30 is, replace DEFAULT() to NO_INIT() (at line /P3x/, column 30).

In my board G120E, that is enough to fix the issue, but your board is G120. I hope they are same issue on same pin, but in case different pin, you can replace all pins from DEFAULT() to NO_INIT() and re-compile again.

It is so embarrassing to need you for help, but as we figured out, this issue doesn’t come from software, it is rarely on some module. It can be because P3.30 in mine, but can be different pin on different boards, that why we don’t have final decision yet until we are sure that only pin P3.30 on most of the cases.

Hi Dat,

Thank you for your reply.
I have no experience recompiling the firmware (I guess it is C++?), but I will try it later this week.
On the other hand, do you expect it will take long before preview 3 will be available? Or could going back to preview 1 solve my problem? In fact I need the file system. I use the controller to regulate a test pressure and store the latest parameters in the SD card. If the controller has to be restarted for some reason, it will read the SD card first to be able to continue with the same parameters before the restart.

Right now all this is just for testing. We don’t have any word on when preview3 will be available just yet. We don’t have specific knowledge on whether or not preview1 will fix it for you, but you are certainly welcome to try.

To build the firmware, if you want to try, you can follow the steps on http://docs.ghielectronics.com/software/tinyclr/native/porting.html. You don’t need to write any code: just install gcc, copy some files, and run a batch script. This test firmware won’t have filesystem or graphics, but it’s just to test this issue.

Once you have a test firmware built that works, then you can change the one thing Dat mentioned and rebuild and retest.

I have the same problem on my G120E development board but its working fine on my G120TH board.

If possible, can you try the above steps and build a test firmware?

Sure… I’ll give it shot when I get in from work later tonight.

Hi John,

I tested last weekend and built the test firmware as you suggested. The simple “Hello World!” startup example worked at least with this firmware. However, I need the file system, so probably I go back to .net micro 4.3 for a while. But TinyCLROS looks promising and I hope I can switch to it in the near future.

This was just a test. The official firmware will be available soon, likely in a week if all went on schedule.

1 Like

Hello, what did you change when recompile the firmware, please?

Only NO_INIT() for pin P3.30 or you had to replace NO_INIT() for all pins?

Thanks