Replies: 14 comments 7 replies
-
Hello @mihaisvcc, |
Beta Was this translation helpful? Give feedback.
-
Hello @maniglia , Thank you for the help offer, My DfuSE custom boadr, with custom boot loader Regards, |
Beta Was this translation helpful? Give feedback.
-
Hello @mihaisvcc ,
The FileOpen function has also been changed, it now returns all the segments present in the file. Obviously the hardest part is creating the .stldr file. Regards |
Beta Was this translation helpful? Give feedback.
-
Hello @maniglia Thank you for the update, I want to share my knowledge also. Now for the external loader *.stldr . I have found that the CubeProgrammer_API is transferring the *.stldr program with the help of STLink inside the sram of the microcontroller and it got executed from there. ST has documentation on how to create an external loader and how to map external flash. In my case I need to do do this without the help of the STLink and that is why I have developed a custom bootloader that initialize and map external and internal flash. Kind Regards, |
Beta Was this translation helpful? Give feedback.
-
Hello @maniglia Thanks for the appreciation, At this point the only solution that comes to mind is to somehow create a .hex file that contains all the firmware, both for the internal and external flesh, what do you think? I will comment on this: It should be made with another tool...in my opinion this extra step is not necessary and I will go in detail. Another project is an HMI. This time in the external flash are stored the extra grafic elements. Why don't you want to use the external loader? Because in the case of external loader, an STLink is needed. In my case the requirement is to be able to perform firmware upgrade with the only help of a micro USB cable.In the case of the old DfuSe was possible to do this. Kind Regards, |
Beta Was this translation helpful? Give feedback.
-
Hello @maniglia I could do a very simple experiment and modify an xml file to confirm this hypothesis. Please do it, If you have time, i will try also here. In the meanwhile I 'm in contact with ST and and try to see if they can help me. Unfortunately until now they didn't want to share the source code of the CubeProgrammer nor the source code for the API dll. The old DfuSE had the source code, it was easier to work with. According to the AN3156 USB DFU protocol used in the STM32 bootloader, the CubeProgrammer_API.dll is designed to perform according to the USB1.1a for the STM32 microcontrollers. The USB 1.1a is the ST DFU protocol derived and with some modifications on the communication concept from the more generic USB1.1 I want to mention here as a side note, an interesting project that is allowing to perform firmware upgrade from the USB port without using the CubeProgrammer_API.dll (using LibUSBNotNet to implement the USB DFU protocol) Getting back to the stldr files what I know for sure, that in the case of external memory they are firmware for ST that is started in SRAM and are initializing the USB and the QSPI in order to perform file transfer in the extern OSPI. Regards, |
Beta Was this translation helpful? Give feedback.
-
Hello @mihaisvcc |
Beta Was this translation helpful? Give feedback.
-
Hello @maniglia, I have tested the LibUSBDfu and it is working, I was able to do the flashing in case I have only one firmware element and don't want do selective sector erasing.It can be used as an alternative to the CubeProgrammer_API.dll. The source code is available and can be checked. The drawback is the laking of selective sector delete, retrieve the memory model, verify function, option bytes etc. It should be further developed. In the last week I was busy with other things I was not able to further research on the CubeProgrammer_API.dll. I'm still in contact and pound ST to give me a solution for my case. Until now I got frustrated, because ST was not willing to share any information about their CubeProgrammer_API.dll. I'm still waiting for a solution on how to use the functions GetStorageStructure() and GetDeviceGeneralInf() with my customised bootloader. It should work somehow because I have build my custom bootloader according to the ST official documentation UM1734 If you look at chapter 6.3.1 and specially on page 43 you will see that is possible to add external memory and there is a template in this direction. I just want to share with you how i've build my customized bootloader. Regards, |
Beta Was this translation helpful? Give feedback.
-
Hello @mihaisvcc Regards |
Beta Was this translation helpful? Give feedback.
-
Hello @maniglia, I don't need the DfuSEDemo to convert the dfu file in hex. I have my own dfu parser...this part is not so difficult... Regards, |
Beta Was this translation helpful? Give feedback.
-
Exactly, that's exactly what I was thinking of doing:
Searching online I found this: do you think it can be adapted fore dfu instead of uart? |
Beta Was this translation helpful? Give feedback.
-
My custom C# flashing program is capable now to identify automatically the driver STDFU.dll or CubeProgrammer_API.dll Thanks for you UART suggestion...I know the link... I have similar implementation in a older project. UART offers simplicity, but the major drawback is the slow speed. Kind Regards, |
Beta Was this translation helpful? Give feedback.
-
Small updateI finally found the time to try out the functions GetStorageStructure and GetDeviceGeneralInf by editing .xml files, |
Beta Was this translation helpful? Give feedback.
-
Hello @maniglia, This is a big update, 👍 thank you, i see it as a step forward, I didn't had the time to test it, I will try to customise the xml files from Data_Base to adapt them to my custom bootloader flash configuration. Do you know how is the xml file selected , based on the read controller ID, e.g 0x451 for the F7 ? If I can make the two above mentioned functions work, with my custom bootloader then my problem is solved. |
Beta Was this translation helpful? Give feedback.
-
@maniglia
Do you have experience, or you have tested the functions for the external loader ?
For example the functions setExternalLoaderPath, getExternalLoaderPath
I have an HMI project based on STM32F4 and I have attached also an external QSPI flash and for the moment I'm writing my own custom bootloader. It should produce at the end a custom *.stldr file
I attached a ST training link for reference.
Kind Regards,
Beta Was this translation helpful? Give feedback.
All reactions