NO COM port after flashing

Hi,
I’m trying to make and upload my own firmware to FC(and I am using omnibusf4pro). So before I start it, l built a code with waf on Windows10 using wsl with original ardupilot files and flashed a firmware(apj file) via the MissionPlanner to my FC. However after doing this, COM port appears just a few seconds then it disappears. I tried with several computers but it was all same.
When I flashed a firmware in http://firmware.ardupilot.org/Copter/, it works properly so I think it’s not the problem of a usb cable and a FC.
What could the problem be?

Most likely perfectly , the bootloader is ok,and you could flash.
Try Linux, there is no driver hell there, and QGC or AP2 should be able to flash it properly just fine.

Thank you for answering.
But I am new in here so I didn’t get it entirely.
Does ‘Try Linux’ mean build the code in Linux and then flash it through QGC or AP2?

no, just boot up some Linux distro, like Ubuntu, install current/latest AP2 (APMPlanner2) or QGC QgroundControl, and upload.
no need to compile it yourself unless you want.
This method saves you from all the annoyances and issues caused by windows.

Thank you.
I just tried as you said but it still doesn’t work.
I am doing a new project so I need to compile a firmware for my project.
I built my code with ubuntu and used QGC to flash a bin file.

Ardupilot stable firmware works fine but my fimware is problem.

I’ve had similar problems when loading ChibiOS - it seems to require a different driver which my windows machine is not very comfortable with. NuttX works better. One thing I did which helped was reinstall MissonPlanner using the installer - that way you get the latest windows drivers.

Thank you for answering andy.
I reinstalled the MissionPlanner but still same.
I read some people expierence problems with ChibiOS. I want to use NuttX but I can’t find how can I use it.
Is there any document which I can get some help from? Could you tell me how to bulid with NuttX if you don’t mind?

Pretty sure you are out of luck with an omnibus f4 - it’s ChibiOS only

Is there any aurdupilot hardware option which can use NuttX? It’s important to me to build own firmware.

All the pixhawk-type boards support NuttX, but note that NuttX is going away in 3.7.

Unfortunately the pixhawk-type boards are not available in here. I think I should go through with my omnibusf4.
Would it be helpful using Mac instead of Window?

I finally solved the problem. I built the code in Ubuntu and everything works fine. I used VMware to download Ubuntu. Thank you for answering everyone.