USB Firmware updates and serial communication over the same port

I have a 7002dk dev kit. Currently for evaluating the nrf5340, which will be used in my product.

Currently i am trying to evaluate if it is possible to use the nRF5340 USB port for both Firmware updates, be it via DFU, or Serial Recovery( via usb-cdc-acm), as well as serial output for logging/communication with my Desktop app. Right now I don't care which way to go, but I need to know if I can enable both.

For testing i got both these 2 examples working:
Nordic Academy Chapter 9.4 https://github.com/NordicDeveloperAcademy/ncs-inter/tree/main/v2.9.0-v2.7.0/l9/l9_e4_sol for serial cdc acm using AuTerm,
as well as: This USB-DFU example using dfu-util:
https://github.com/nrfconnect/sdk-zephyr/tree/main/samples/subsys/usb/dfu

So right now i don't have a working example for either of those 2 where i can still use normal usb communication, or even serial communication via usb with my device.

How could i add this functionality into either of those 2 examples? (I prefer the first, as this has already mcuboot included)

Related