This post shows you how to fix OpenSTM32’s System Workbench “ERROR_DOWNLOAD_TASK_START_ISSUE” when it cannot find the StdPeriph firmware to download.
STMicroelectronics STM32 MCUs (MicroController Units) which are based on ARM Cortex-M cores can be programmed using a customised version of the Eclipse IDE which is known as System Workbench and published by ST via the OpenSTM32.org platform.
If you are new to the System Workbench IDE and trying to create a new “Ac6 STM32 MCU GCC” project to program your specific variety of the STM32 MCU (e.g. STM32F407VGT6 in my case) then you will find that there are different types of “firmware” (or to put it simple “software libraries”) that you can choose to create your projects with:
- Standard Peripheral Library (StdPeriph)
- Hardware Abstraction Layer (Cube HAL)
Cube HAL is a newer library which the IDE can find online and download and it works out of box with no issues (at least with the version I have used which was the “OpenSTM32 IDE version 18.104.22.168904120827 with Id fr.ac6.feature.mcu.ide.feature.group”).
StdPeriph library, on the other hand, is older and a lot of articles, tutorials and open-source code out there on the Internet are developed using this older library. The problem is that if you try to select that library for your project then the IDE will most likely fail to find and download the firmware package. You will get an “ERROR_DOWNLOAD_TASK_START_ISSUE” error message like the screenshot below:
This issue can be resolved by manually finding the correct firmware package (in zip file format) from ST website directly and placing it under the right location on your system for the IDE to find it.
NOTE: Once you are done with these steps make sure you start the project creation process from the beginning as the IDE might not find the package if you perform these steps while you are stuck in the middle of the projection creation process.
Here are the steps how I fixed this issue:
- Find the relevant package from ST’s website. To do this I searched the phrase “stsw-stm32” on this page and went through a lot of hits to find the one that looked right (the description included “standard peripherals library“): https://www.st.com/content/st_com/en/search.html#q=stsw-stm32-t=tools-page=3
- Download the associated zip file using the link on the record that you found in step 1. In my case this was STSW-STM32065 with the descrition “STM32F4 DSP and standard peripherals library” (Note you will need to create an account on ST’s website to accept their license and download the file.)
- Find the downloaded file on your system (in my case this was called “en.stm32f4_dsp_stdperiph_lib.zip” under my Downloads folder) and move to where the IDE can find the package. This location depends on your system and your installation of the IDE but in my case this was “C:\Users\Mosaic3DX\AppData\Roaming\Ac6\SW4STM32\firmwares\” (Note the “S” at the end of the “firmwares” folder name. That is how the folder is named even though it is not the correct spelling of the word in English)
- Now rename the zip file to match what the IDE expects. In my case this had to be “stm32f4_dsp_stdperiph_lib_v180.zip“. This is where it gets tricky. I had to find this out by searching through a large XML file named “stm32targets.xml” that the IDE uses to figure the names. In my installation the XML file was under “C:\STM32_ac6_Open_System_Workbench\plugins\fr.ac6.mcu.ide_22.214.171.124904120827\resources\board_def\stm32targets.xml” because I had installed the IDE under “C:\STM32_ac6_Open_System_Workbench\“. You can see the part of the file where I found the file name below:
<family id="stm32f4" > <name>STM32F4</name> <status>Active</status> <familyId>stm32</familyId> <firmwares > <firmware type="StdPeriph" > <name></name> <url>stm32f4_dsp_stdperiph_lib_v180.zip</url> ... </firmware> ... </firmwares> ... </family>
- Once renamed, start the process of making a new project over. And when you get to the step where you select StdPeriph option click on “Download Target Firmware”. This time the IDE will find the zip package on your local disk and installs it locally. You are good to go!
That’s all. Leave your comments about how you fixed this problem with other MCUs, on other platforms or with other versions of the System Workbench IDE.