Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpmsg_lite_remote_init function call fails for MIMX8MM6_m4 #51

Closed
Johannes-Schuler opened this issue Sep 17, 2024 · 3 comments
Closed
Assignees
Labels

Comments

@Johannes-Schuler
Copy link

Johannes-Schuler commented Sep 17, 2024

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!

@MichalPrincNXP
Copy link
Contributor

Hello @Johannes-Schuler , I am sorry for late response. Unfortunately I am not able to address your question, @TomasGalbickaNXP could you please help with that? Note, Tomas is currently on vacation and his response could be delayed.

@Johannes-Schuler
Copy link
Author

Hello @MichalPrincNXP ,
thanks for your response. I already fixed this issue. I needed to comment out the debug configuration parameters, except CONFIG_NO_OPTIMIZATIONS. After this, I was able to debug.
I've still not finished the porting but this particular problem is not causing any issues anymore.

@MichalPrincNXP
Copy link
Contributor

Thank you @Johannes-Schuler for confirming your issue have been solved. And, I am sorry for late response again. Have a nice day.
Regards
Michal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants