Flash DAPLink firmware for stlink v2

Brief description

I recently used the senior’s wireless debugger for an RM competition and found it very convenient. I just recently wanted to find a project by myself. So with this idea, I wanted to make a wireless debugger. (Because of time, I’m going to dove, the following is mainly about flashing the firmware of stlink to stlink) DAPLink
has been open sourced on github

Clone the project and configure the environment

There is a requirements.txtfile on the project homepage on github. Google later found that this is a pip package management tool for python. The installed package can be output through the pip freeze command.
Use the following command to install the package in the file.

pip install -r requirements.txt

Generate keil project file

By referring to the method in [1], use the progen command to generate the keil project file.

More information about progen can be found at:
https://pypi.org/project/project-generator/

Wiki tutorial:
https://github.com/project-generator/project_generator/wiki/Getting_started

After using the progen command, a projectfiles folder will be generated, which contains the uVision project files. After compiling, I get an error: It
Insert picture description here
should be a problem with the environment configuration, which may be related to the installation of anaconda.
I had no choice but to open the uVision file in the command line and
Insert picture description here
recompile, and still reported an error. I
Insert picture description here
tried several times and found that keil could not be opened, so I had to reinstall it.
Continue to open with the command line, this time the compilation is successful (you need to open the compilation in the python environment, remember to add python to the PATH if you don't use anaconda, see the error report above).
Insert picture description here
Generate hex file with keil

Flash firmware

The method of flashing the firmware is the same as stlink[3], the specific method can be searched on the Internet

reference

[1]:https://blog.csdn.net/qq_42926939/article/details/110249159
[2]:https://blog.csdn.net/liwen209/article/details/105326534
[3]:https://blog.csdn.net/qq_20222919/article/details/111631286

Guess you like

Origin blog.csdn.net/lqysgdb/article/details/115315125