2025-02-28 7:10 AM
I created an external flash STLDR file for my board, with STM32H750VB chip and W25Q64 QSPI FLASH. After copying the STLDR file to the cubeprographer directory, it can perform normal external flash read/write and sector erase functions. However, when selecting full chip erase, the cubeprographer prompts me "please select external loader before performing external full chip erase". But I am sure that my code contains the correct int MassErase (void) function, and I used the readelf command in Ubuntu environment to read the STLDR file I created, which also includes the MassErase function. But it seems that this function cannot be correctly detected by the cubeprographer. How can I locate the cause and solve this problem?
Wishing you peace
2025-02-28 10:11 AM
>>How can I locate the cause and solve this problem?
Hard to know with the detail presented, you look to be looking in the right places.
Perhaps attach the .ELF / .STLDR, or a structure dump via OBJDUMP, OBJCOPY, or whatever.
Perhaps the address or attributes of the function? The case?
Perhaps compare the structure of how your's dumps vis-a-v all the other examples in the ExternalLoader subdirectory.
Screen shots of error, showing loader that's loaded, the Log at Verbosity Level 3..
2025-03-01 6:46 AM - edited 2025-03-01 7:03 AM
thank you for your replay!
this is my Screen shots and error message
This stldr file can help me perform external flash read, write, and fast erase functions, but full chip erase cannot be used.
I saved the output of objdump and readelf commands in CMDobjdump.txt and CMDreadlef.txt files. It can be found that the masserase function exists in both files. However, when executing external full chip erase, the error shown in the figure above is always prompted. I put part of these two files here for easy display, as well as my cubeide project. By the way, the cubeide I use is the Linux version, and the development environment is ubuntu22.04.5LTS.
This problem has bothered me for a week
Thank you again for your reply
this is source code screen shots
about of the cubeprogrammer
about of the cubeide
2025-03-01 7:59 AM
I'll take a look. Make sure the most current version of your loader is in the STM32 Cube Programmer External Loader directory
This is the one I built as a constrast
2025-03-02 4:14 AM - edited 2025-03-02 4:37 AM
I have used the stldr file you provided, It can perform left and right external flash operations normally in ubuntu environment without any errors, and I sent an email to ask if I could donate to get the source code, remember?^_^
Last night, I used the stldr file I made to do some other tests and found some new problems. The same stldr file can be used in cubeprogrammer under windows environment, all functions are normal, but in ubuntu, cubeprogrammer only reports an error for full external flash erase. However, in ubuntu command line, using the command "STM32_Programmer_CLI -c port=SWD freq=4000 -el /home/user/keanlee/stm32/hope/hope_h750_w25q64jv_stldr/hope_h750_w25q64jv_stldr/Debug/hope_h750_w25q64jv_stldr.stldr -e all", the mass erase function can be executed normally to complete the full chip erase. I don't know why this happens. I hope to get some supplements and solutions in this regard. Thank you again for your reply, which is very important to me.
In the Ubuntu CubeIDE environment, I set up the CubeIDE project as follows:
Is it possible that these settings may cause errors?