Does Nordic provide Zephyr sample code for sending Inter-Processor Communication (IPC) messages from app core and receiving response from net core?
Does Nordic provide Zephyr sample code for sending Inter-Processor Communication (IPC) messages from app core and receiving response from net core?
Hi snowuyl,
Yes, please take a look at the IPC service sample: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.0/nrf/samples/ipc/ipc_service/README.html.
Hieu
Thanks for you suggesting ipc_service sample. I can build and flash image but I can't see any log messages of NET core.
Procedure to reproduce this issue is as follows.
1. cd D:\ncs\v2.3.0\nrf\samples\ipc\ipc_service
2. west build -b nrf5340dk_nrf5340_cpuapp
3. west flash
4. Lauching RTT Viwer and slecting NRF5340_XXAA_NET target device
5. RTT Viwer shows "LOG: RTT Viewer connected" but doesn't show any log messages.
I don't have a nRF5340 hardware to test at the moment. Do you know if both cores were flashed when you run west flash? If you are not able to tell, please give me the log of west flash.
Thanks for your reply! I try to find command for generating west flag log file. But I can’t find command from docs.zephyrproject.org/.../build-flash-debug.html
You just need to show me what the command line prints out immediately after west flash.
Please also check which log backend the network core is logging to. See in <network core child image build folder>/zephyr/.conf file, and search for all the CONFIG.*LOG_BACKEND configurations.
I see the following configuration in D:\ncs\v2.3.0\nrf\samples\ipc\ipc_service\build\remote\zephyr\.config file.
#
# Backends
#
# CONFIG_LOG_BACKEND_SWO is not set
CONFIG_LOG_BACKEND_UART=y
CONFIG_LOG_BACKEND_UART_BUFFER_SIZE=1
CONFIG_LOG_BACKEND_UART_AUTOSTART=y
CONFIG_LOG_BACKEND_UART_OUTPUT_TEXT=y
# CONFIG_LOG_BACKEND_UART_OUTPUT_DICTIONARY is not set
# CONFIG_LOG_BACKEND_UART_OUTPUT_CUSTOM is not set
CONFIG_LOG_BACKEND_UART_OUTPUT_DEFAULT=0
# CONFIG_LOG_BACKEND_IPC_SERVICE is not set
# end of Backends
Do you have suggestion to set log backend to RTT?
The following are west flag log messages.
D:\ncs\v2.3.0\nrf\samples\ipc\ipc_service>west flash
-- west flash: rebuilding
[0/4] Performing build step for 'remote_subimage'
ninja: no work to do.
-- west flash: using runner nrfjprog
Using board 801036305
-- runners.nrfjprog: Flashing file: D:\ncs\v2.3.0\nrf\samples\ipc\ipc_service\build\zephyr\merged_domains.hex
-- runners.nrfjprog: D:\ncs\v2.3.0\nrf\samples\ipc\ipc_service\build\zephyr\merged_domains.hex targets both nRF53 coprocessors; splitting it into: D:\ncs\v2.3.0\nrf\samples\ipc\ipc_service\build\zephyr\GENERATED_CP_NETWORK_merged_domains.hex and D:\ncs\v2.3.0\nrf\samples\ipc\ipc_service\build\zephyr\GENERATED_CP_APPLICATION_merged_domains.hex
[ #################### ] 3.340s | Erase file - Done erasing
[ #################### ] 0.307s | Program file - Done programming
[ #################### ] 0.304s | Verify file - Done verifying
[ #################### ] 1.731s | Erase file - Done erasing
[ #################### ] 0.362s | Program file - Done programming
[ #################### ] 0.343s | Verify file - Done verifying
Applying pin reset.
-- runners.nrfjprog: Board with serial number 801036305 flashed successfully.
Hi Snowuyl,
Hieu is on holiday now and this case has been transferred to me. From your many other cases I can see that you have gotten RTT working.
However, after trying to actually run the IPC_service sample on NCS v2.3.0, I should copy here what I told you in another case (in case other DevZone users read this):
It turns out that the IPC service sample (and some others, I suspect), are completely broken on NCS 2.3.0.
I believe that earlier NCS versions worked, and I can confirm that NCS v2.4.0 works as well. Are you early enough in development that you could upgrade your NCS version to v2.4.0? I would strongly recommend it.
Best regards,
Raoul
Hi Snowuyl,
Hieu is on holiday now and this case has been transferred to me. From your many other cases I can see that you have gotten RTT working.
However, after trying to actually run the IPC_service sample on NCS v2.3.0, I should copy here what I told you in another case (in case other DevZone users read this):
It turns out that the IPC service sample (and some others, I suspect), are completely broken on NCS 2.3.0.
I believe that earlier NCS versions worked, and I can confirm that NCS v2.4.0 works as well. Are you early enough in development that you could upgrade your NCS version to v2.4.0? I would strongly recommend it.
Best regards,
Raoul