cancel
Showing results for 
Search instead for 
Did you mean: 

Developing in CubeIDE on network drive - corruption.

PCamp.2
Associate III

I was initially getting away with developing on a network drive.

However it has all started to come apart.

If I attempt to create a new project while the %HOME%\STM32Cube\Repository is on a network drive I get things like "Unable to unzip firmware..."

When I put the workspace on a network drive an create a new project, the project is incomplete. Sometimes it's very incomplete and won't compile. In others it compiles and deploys but is missing entire .o files! from the build and functionality is completely missing.... no errors!

When I build on the network drive I get incomplete, but non-erroring builds.

In short the network drives appear to be entirely asynchronous and there are no file locks and nothing is waiting or checking that files exist, don't exist "yet" or have slightly different timestamps than expected.

This is not limited to STM32CubeIDE, but I'm also seeing corruption like behviour with Pycharm and VSC.

Windows explorer says the drive is fine.

I get lots of errors like "Is not a directory", but opening it, it is indeed a directory. Then the opposite. "Error: main.cpp is a directory"

It's driving me nuts and google is not helping.

I'm just reaching out in case anyone has any ideas what I've broken.

The dev machine is a VM. The network drive is a Samba share from the VM Host.

I want everything I can get on network drives and I don't want STM32's MEGA GIGABYTE firmware folder on my SSD thanks. (grrr).

I just can't figure it out.

5 REPLIES 5
MM..1
Chief II

If your %HOME% is very long and or use spaces you are in ....

Same for projects paths....

Too sometimes samba have limited count of open files etc.

The paths are short. It's just they are network paths.

Either \\host\share\path or H:\path formats where H: is a network drive.

I'll look into open files, but at the moment my suspicions are pointing to the VM and the host having timing issues. It looks like files are being created in the future or something causing issues.

As an example, I was trying to diagnose why it created an STM32F030 project with a completely dead SysTick. I was looking into the start__.s file where the interupt vectors are defined and the file disappeared and closed.

I opened it again, but it immediately closed with an error about the file not existing. Then as I sat and watched, the file appeared.... disappeared... appeared... disappeared. When I tried to build it, I got a different error every time. Rebuilding the project produced the same results.

I started a whole new project, in a whole new workspace (still on network drive) and created a brand new F411RE project. The code generation and project set up completed without error and presented me with a nearly empty project with no main.cpp as I waited parts of the project appeared and then disappeared.

I went looking on the filesystem and at least the files that "appear" from time to time are there and seem to stay there.

It's baffling and very frustrating.

Pavel A.
Evangelist III

This can be caused by many things: incompatible server (is it a Linux machine with samba? some kind of appliance/NAS box?)

If you cannot fix it easily, do not use the SMB share directly. Build on a local disk, then sync what is needed to the server. Do not let it slow you down or distract.

PCamp.2
Associate III

It seems I am, in fact, not going insane. I have tracked this down to a Windows update issue. Yes it's a bug in Windows 10. I have found 2 or 3 other people who have similar issues and the root cause is found in the server and client SMB logs.

Millions upon millions of these:

 create_connection_session_info: guest user (from session setup) not permitted to access this share (paul)

One for each and every single file access done from windows. Each and every single one of them is first rejected and then followed by an authenticated attempt. This is obviously working in some areas, but not in high demand/through put areas just as using for IDE backing storage.

The partial solution, for now, is not satisfactory and involves turning

guest user = ok

For my personal home directory share!

That stops the guest requests from being rejected. Guest won't have file permissions, but enabling guest access has got a significant security risk when it comes to household items like SmartTVs. They WILL scan your file shares and they WILL try anon and guest access. Apple MACs go even further and try brute force attacks on common workgroups and account names with passwords like "Password", "password123".

So enabling this kind of access, as you can see if a bad idea. (thankfully most of my SmartTVs and work laptops are barred onto a guest network and firewalled for that very reason.

PCamp.2
Associate III

In the case of the Microsoft forum support thread, the MS rep "immediately" went straight to.... "Oh, we would need a network trace to diagnose this and that's not available through the forums, please contact your Microsoft rep. Bye!"

So I expect it's not a bug, it's an intentional feature and this is just a side effect of it and they won't touch it. Either that or they are again trying to mare the name of Linux servers by behaving like a tantrumus child again.