Local\Temp\ccdpvBmu.s for writing: Permission denied ...compilation terminated. exit status 1 Error compiling for board Generic STM32F103C series

I am running simple blink code for STM32 Blue pill but getting below error

C:\Users\deepe\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2021.5.31\variants\generic_stm32f103c\board.cpp:1:0: fatal error: can't open C:\Users\deepe\AppData\Local\Temp\ccdpvBmu.s for writing: Permission denied
/******************************************************************************
^
compilation terminated.
exit status 1
Error compiling for board Generic STM32F103C series.

Anyone know what could be the problem?
I tried below-

  1. Ran Arduino IDE as Adminstrator.
  2. Cleaned %Temp% folder.
  3. Reastarted PC.
  4. Ran same code in Ubuntu with same hardware setup working fine.
  5. Tried disabling Antivirus.

Thanks

The path shown in the error message is unusual:

The Arduino IDE creates a dedicated build folder under C:\Users\deepe\AppData\Local\Temp, and that build folder is used for all the build process working files and artifacts. So it's not clear what is trying to write to a file in the root temporary folder.

You might be able to get a better idea of what is happening by examining the verbose compilation output, which will show the full command that produced the error. You can share it here as well to see if any of the forum member are able to interpret it.

  1. Select File > Preferences from the Arduino IDE's menus.
  2. Check the box next to "Show verbose output during: [] compilation".
  3. Click the OK button.
  4. Select Sketch > Verify/Compile from the Arduino IDE's menus.
  5. After the compilation fails you'll see a button on the right side of the orange bar in the Arduino IDE: Copy error messages. Click that button. This copies the full output to the clipboard.
  6. Open a forum reply here by clicking the Reply button.
  7. Click the </> icon on the post composer toolbar. This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code block
  8. Press Ctrl+V. This will paste the compilation output into the code block.
  9. Move the cursor outside of the code tags before you add any additional text to your reply.
  10. Click the Reply button to post the output.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.