Build process unable to delete contents of code gen dir. Error: Failed to delete...lcpsoc3

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I added some LED off/on/off/on code and when I clicked Build, I get the following error message:

   

Build process unable to delete contents of code gen dir.  Error: Failed to delete...lcpsoc3:  Access to the path...lcpsoc3' is denied

   

I believe that I can delete it after a boot from shut down, but is there a way to delete this to allow build to proceed now rather than later?

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Check your access rights of the path and the files. Sometimes when files are copied from extern the rights are set to read-only.

   

 

   

Bob

View solution in original post

0 Likes
4 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Check your access rights of the path and the files. Sometimes when files are copied from extern the rights are set to read-only.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Thanks Bob. First, I was correct in that the problem was solved after evening shut down and morning start up, that file was magically gone!

   

Second, I found that there was an access rights issue, Windows 10 wouldn't let me change them to allow me to delete that file. I need to research this to solve it. I also tried deleting it using command prompt with admin rights, but nope. Windows 10 doesn't provide an admin sign in when it tells you that you need them. Oh well...I'll figure it out.

0 Likes

hello 
i had the same issue with windows 10

is it possible you tell   me how did you fix it 

0 Likes

I solved it by first manually deleting "lcpsoc3" once, then by going in "Project > Build Settings" and "ARM GCC > User Commands" and entering the following for "Pre Build":

cmd /c rmdir /s /q .\codegentemp\lcpsoc3 2>nul & exit 0

However, if code generation fails (e.g. due to a schematic error), this command won't be executed and you might have to manually delete "lcpsoc3" once again.

0 Likes