Skip to main content
Visitor II
April 9, 2018
Question

STM32CubeProgrammer - can't open file and program MCU after removing folder

  • April 9, 2018
  • 4 replies
  • 4358 views
Posted on April 09, 2018 at 19:40

Summary:

Once you remove a folder you used lately the STM32CubeProgrammer cannot open a file and consequently program the MCU.

How to reproduce:

1. Select 'Erasing & Programming' window, open a file (either hex or bin) and program the MCU (I tested RAM programming through UART but ST-Link mode seems to be also affected)

The file 'testCode.bin' was located here:

C:\Users\abg015\Desktop\serilal-proto\test-code\

2. Remove/Rename (this is crucial) the folder where the file is located, e.g.

rename the folder:

C:\Users\abg015\Desktop\serilal-proto\test-code\

to:

C:\Users\abg015\Desktop\serilal-proto\test-code2\

3. Since then you cannot navigate to any folder using 'Browse' button, The 'Browser' button do es NOT react to mouse clicking. So you cannot open any file, neither program the MCU since then.

4. Once you restore the folder (previously removed/renamed) you can open any new file.

0690X0000060AUoQAM.png
    This topic has been closed for replies.

    4 replies

    Visitor II
    April 9, 2018
    Posted on April 09, 2018 at 19:47

    Leaving the STM32CubeProgrammer and starting it again does NOT fix the issue. You need to restore the removed/renamed folder.

    Some details about the PC:

    - 64 bit, Windows 8.1

    Visitor II
    April 12, 2018
    Posted on April 12, 2018 at 11:15

    This is beginer programmer error.

    You can fix this by deleting config.properties file.

    In Ubuntu, file is located at: /home/<USER>/.STM32CubeProgrammer

    Visitor II
    April 12, 2018
    Posted on April 12, 2018 at 11:28

    This is beginer programmer error.

    Exactly.

    Another version I know of is a path string in the config file that exceeds the internal file name buffer length.

    I know applications that crash on those ...

    Visitor II
    April 12, 2018
    Posted on April 12, 2018 at 12:26

    The buffer overflow violates basic app security requirements.

    I believe the ST has the security compliance review (and testing) process process implemented although in case the problem is rather related to (more advanced) functional testing.

    Anyway, it's not critical issue but might be surprising to someone who uses temporary folder structure.

    Technical Moderator
    April 13, 2018
    Posted on April 13, 2018 at 10:45

    Hello,

    Your comments are shared internally for further review.

    We will keep you informed about the taken actions or explanation if needed.

    Best Regards,

    Imen

    Explorer II
    December 12, 2023

    Hi @Bogdan Golab 

     

    I realise this is sometime after your initial post but I think I've found a workaround after I was hit by the same bug you experienced and wanted to share it incase others are impacted.

    This bug occurs because STM32CubeProgrammer remembers the last file path it attempted to access and in the event of an error gets locked up and can no longer access files. This can happen either because there was an error with the file you attempted to open, or simply that the path you last accessed with the program no longer exists, like a network drive.

     

    There is a file called config.properties which by default is located in:

    <Your User Path>\STMicroelectronics\STM32CubeProgrammer

    By deleting the saved values for readFileLastPathWB, readLastOpenFile, and readFileLastPath I was able to restart STM32CubeProgrammer and open files again.

    Explorer
    January 11, 2024

    Hello,

    i have the same issue and successfully solve with your solution, i deleted very long/corrupted paths inside config.properties, after all work fine i make a copy of this file for future use :)

    Uninstall all STM SW did not help,i spend many hours with this...

     

    regards