I checked the information on the Internet for two days one after another and found three very useful articles. One is about firmware, one is about hardware design, and the other is to teach you how to flash firmware for stm32 with usb interface. With these three materials, it should be no problem to make a Jlink ob by yourself. Put the link below.
Firmware: http://www.openedv.com/thread-73979-1-1.html
Hardware design articles: https://blog.csdn.net/wolf_tong/article/details/76599265
Flashing in the firmware via USB: https://blog.csdn.net/zhjmyx/article/details/53056176