Hello Tiago,
Happy to hear that you are using OpenThread and nRF52840!
nRF52840 platform can be built without any platform's transport (UART, USB or SPI). We have added a new Makefile option called DISABLE_TRANSPORTS, that should solve the presented problem.
You need just to set this flag to 1, e.g. call
make -f examples/Makefile-nrf52840 DISABLE_TRANSPORTS=1 ...OTHER_FLAGS...
Also, this change was incorporated in the newest SDK in version 3.1.0 (the SDK 2.0.0 does not have this feature), so I encourage you to switch to this version and generate OpenThread libraries that satisfy your application.
Note, that with this flag set to 1, you can't use CLI or NCP application, the build system will generate only the needed OpenThread libraries.
Let me know if that helps.
Regards,
Łukasz Duda