"Waiting for device to initialize"

Did that and it seems that it can enter debug, with the sample app:


image

But that way, the dev app cannot upload:
image

I know :). So far usb good, your pc good, extension good.

Now you need to check on extend heap and try with small application. Only extend heap for now.

Let us know what you see.

Extended just the heap. The small test app is still working.

OK, now this time to enable extend deployment.

then try with small application, if it works then you can try with your large app.

With external deployment, the small app still works. The large app, still doesn’t. It uploads, but debugging doesn’t start.
Small app:
image
Large app:
image

Now, you deploy again, with large app, do not change anything in your code, just hit deploy.

Do you still see “Erasing sector…”?

If you can share to us the project, we can investigate. I think the external deployment flash has something wrong or your application has something. Did you use Erase all before, some cases it will help.

You can try simple project with “hello world” above but add ~1MB of resource. Just pick some files, change extension to .bin and add into resource.

Sorry for the “erasing” in the screenshots.

The first screenshot was taken when trying the small app after having tried the large app, because I forgot the screenshot on the first successful attempt. The first attempt did not have “erasing” in it.

The second screenshot was from the large app. No erasing, there.

Unfortunately, I cannot share the large app. But consider that a minute before the breakdown, it worked. And I tried previous versions, that were previously certainly working, and now don’t.

Tried the small app with around 1mb of resource added. Still works.

“Erase application” already tried, but no changes. And also “erase all” before attempts with firmware update.

Can you take a screenshot where it says erasing or writing… Add few more thing make sure the test project is bigger than your app.

With 1mb it was still a bit smaller than the large app:
image

Tried with a larger resource (around 1.7mb) and it’s now larger than the large dev app. But still working.
image

Then the problem could be something in your project, did you change anything after it worked?
Can you just add something large than 4k to your project, same as you add resouce on test project. Probably your project has special size cause a bug we dont know yet. So add something to get different size and 4k so the end sector will be different.

But I guess something in your project cause issue.

I tried adding a resource of 37k to the dev app. Still nothing.

The dev app uploads but no debug. If I reset the device, the app starts on the device and works properly, but no debug is possible from Visual Studio.

Consider, as I said before and tested before submitting this topic, that also previous versions of the app can no more debug (and they could previously, of course). If it was something changed in the app, I’d expect the previous working versions still working, at least with a total erase, or with one of the two dev boards.

Something likely happened between one debugging session and the next (the app was working just a few seconds before, in the previous debug session) and from that point on, no version - also previous ones! - worked.

I really have no idea and I get it’s hard for you too to have hints. I appreciate your support with this and thanks for your time till now. Any other idea would be most welcome.

Did you change debug / release mode by accident? That is last thing I can guess.

In the dev app we have three configs: release, debug, and dev (clone from debug). All three working before, none of them working now. I don’t remember if I was in debug or dev, but it certainly didn’t change between before and after the “corruption”.

Is it debug now? Seems to me you are in release mode.

Does deleting the .vs directories help?

1 Like

Always in debug mode, in these tests.

@C_Born , I’ve no words for that. IT SOLVED!
Now it explains all the mystery around the tests.
Two days on that. I’m in debt!

2 Likes

@Dat_Tran , even if the previous tests didn’t give us the final solution, you provided plenty of information useful for the future in these cases.
Thank you so much for your support, so quick, patient, and precise!

1 Like