I have custom nRF5340 code that includes application and bootloader for both cores. For reliability reasons, I need to run bluetooth behaviour from both the netcore application before the appcore application runs, and in the appcore application.
It seems that the standard way to do this is to use RPMSG with the appcore as the master (CONFIG_RPMSG_SERVICE_MODE_MASTER=y) and the netcore as the remote (CONFIG_RPMSG_SERVICE_MODE_REMOTE=y). However, when I enable RPMSG in the netcore, it blocks until the appcore application runs (It gets blocked in "rpmsg_service_init -> rpmsg_init_vdev -> rpmsg_virtio_wait_remote_ready"). This is not acceptable as I need to be able to interact with the netcore application prior to the appcore application commencing.
I cannot add RPMSG to the appcore bootloader as it is a single-threaded bootloader (CONFIG_MULTITHREADING=n).
I have tried using SYS_INIT to start my bluetooth behaviour and make sure that it's priority is after CONFIG_KERNEL_INIT_PRIORITY_DEVICE but before CONFIG_RPMSG_SERVICE_INIT_PRIORITY so that bt_enable will work, but this causes crashes under some BLE behaviour.
Is there a way to enable RPMSG in the netcore application without waiting for the appcore application starting?