Hello!
On a nrf5340dk devboard with NCS-2.4.1 I'd like to run the BLE beacon sample of Zephyr (zephyr/samples/bluetooth/beacon
). It's not a big deal to compile and burn into the flash, and it's running. If I'm not wrong, the layout is something like this:
- APP core runs a Zephyr instance + BLE host (configurably Zephyr or Nordic) + BLE HCI;
- BLE HCI communicates with the SoftDevice controller on NET core via some kind of RPC, I think through shared memory;
- APP core can run my custom code too (by editing
main.c
etc);
- NET core runs a Zephyr instance with different config than on APP core;
- NET core runs the SoftDevice controller, which is responsible for low-level, timing critical BLE atomic operations;
- NET core is on the other side of the RPC channel, processes requests from APP core (BLE host);
Please confirm if the above are at least roughly/conceptionally true...
Now these're all nice and good, but I want to utilize the peripherals on the NET core too. In other words, I want to write my custom code to NET core too by keeping the existing SoftDevice/RPC structures. And I simply haven't found any sample which would cover this, nor any reference here in the Q&A forum. What is not clear:
- how does the build system solve automatically that by having
CONFIG_BT=y
it compileshci_rpmsg
as a child image;- from which components (sources) does it generate the final NET .hex?
- where's the
main(...)
function of the NET core app running the BLE beacon sample app? - how can I add my custom code without destroying existing BLE code on NET core? As a start, I'd be extreme happy just to
printk(...)
something in a loop while BLE beacon is running;
nrf/samples/multicore/hello_world
is stated to run on both cores, but in fact for NET core no code is generated. Anyway, if it compiled to NET core too, it wouldn't even demonstrate how to develop to both cores when BLE funcionality is also required.
I'd also be very happy to get an empty BLE beacon project which keeps on printk(...)
-ing some sort of string on the NET core, so I could continue my development by inspecting that.
Thanks, regards,