nxp-mcuxpresso / rpmsg-lite

RPMsg implementation for small MCUs
BSD 3-Clause "New" or "Revised" License
228 stars 73 forks source link

rpmsg_lite_remote_init function call fails for MIMX8MM6_m4 #51

Open Johannes-Schuler opened 2 days ago

Johannes-Schuler commented 2 days ago

Hi,

I'm trying to port rpmsg-lite for a MIMX8MM6_m4 core using Zephyr. I've created a rpmsg_platform_zephyr_ipm.c (which I basically just copied from imxrt1170), I changed the CMakeLists.txt and I'm able to build my application. My main is the zephyr/samples/rpmsglite_pingpong/remote/src/main.c

My Overlay looks like this:

/ {
  chosen {
    zephyr,ipc_shm = &sramx;
    zephyr,ipc = &mailbox0;
  };

  sramx: memory@B8000000 {
    compatible = "mmio-sram";
    reg = <0xB8000000 DT_SIZE_K(16)>;
  };
};

and my prj.conf looks like this:

CONFIG_IPM=y
CONFIG_EVENTS=y
CONFIG_PRINTK=y
CONFIG_RPMSGLITE=y
CONFIG_STDOUT_CONSOLE=n
CONFIG_TIMESLICE_SIZE=1
CONFIG_HEAP_MEM_POOL_SIZE=4096
CONFIG_PLATFORM_SPECIFIC_INIT=n
CONFIG_SEGGER_RTT_BUFFER_SIZE_UP=4096
CONFIG_SECOND_CORE_MCUX=y

# Uncomment for Debugging Support
CONFIG_INIT_STACKS=y
CONFIG_NO_OPTIMIZATIONS=y
CONFIG_DEBUG_THREAD_INFO=y
CONFIG_THREAD_STACK_INFO=y

When I start to debug, it will fail on gp_rpmsg_dev_inst = rpmsg_lite_remote_init(shared_memory, RPMSG_LITE_LINK_ID, RL_NO_FLAGS, &g_rpmsg_ctxt);. I can't do a "Step Into" and if I set a breakpoint at the beginning of this function, the debug process will never reach it. What is happening here? The init function should work without a working master on the A53 core, right?

I'm very grateful for a quick response!