I imitate the "zynq Hybrid design" scheme, use "dual processor+shared memory",but instead of openMAC IP with EmacPs and NO OS platform (bare-metal),the demo_mn_embedded run on CPU0 and Kernel stack part run on CPU1 .
during powerlink MN running,a issue occurs:"assertion "pInstance_p != ((void*)0)" failed : file "stack/src/common/circbuf/circbuffer.c", line 607,function circbuf_getDataCount",
What really puzzles me is the demo_mn_embedded always printf "Kernel stack has gone,exiting..." because the ctrlk_process() function in daemon.c running on the CPU1 always Enter the dead cycle,so the ctrlk_updateHeartbeat() function does not run.
Powerlink-team Kalycito said:
++++++++++++++++++++++++++++++++++++++++++++++
Powerlink-team Kalycito - 2018-05-30
Hi Hassen,
For your first question:
Regarding memory segment, common memory is used for exchanging control and information. Shared memory is used for bulk data exchange.
For your second question: openPOWERLINK daemon application is running on Microblaze and it gets the value of PDO from shared memory location which is mapped into the user space to provide direct access to the user stack. (Source file location: stack/src/user/pdo/pdou.c)
For your third question:
After receiving a frame, openMAC sends an interrupt to Microblaze and there is no dependency on what POWERLINK frame it receives.
during powerlink MN running,a issue occurs:"assertion "pInstance_p != ((void*)0)" failed : file "stack/src/common/circbuf/circbuffer.c", line 607,function circbuf_getDataCount()",
What is the reason for this issue?
=========================
my Macro defines that related to dualprocshm are :
The circbuffer.c file provides an implementation of circular buffer library. The circular buffer library is designed in such a way that different instances(threads, processes, etc.) can concurrently access the circular buffer. So, a shared memory which is accessible by all instances and a lock mechanism to lock the critical sections is required.
We understand that you have modified the SHARED_MEM_SPAN and SHARED_MEM_BASE value other than default values available in the stack. The SHARED_MEM_SPAN value of 0x10000000 that you have used is already allocated as ARM memory. The issue you face may be because the pointers are trying to access a address which is not allocated to it.
Kindly assign proper memory base values and see if the issue is fixed.
Thanks,
Powerlink-Team-Kalycito
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I imitate the "zynq Hybrid design" scheme, use "dual processor+shared memory",but instead of openMAC IP with EmacPs and NO OS platform (bare-metal),the demo_mn_embedded run on CPU0 and Kernel stack part run on CPU1 .
during powerlink MN running,a issue occurs:"assertion "pInstance_p != ((void*)0)" failed : file "stack/src/common/circbuf/circbuffer.c", line 607,function circbuf_getDataCount",
the Macro defines are :
/#define COMMON__MEM_BASE 0x2c000000
/#define SHARED_MEM_SPAN 0x10000000
/#define SHARED_MEM_BASE 0x30000000
attachment file is my emacps drivers.
What's the cause of this issue? thanks
Last edit: liu zhi qiang 2018-07-10
What really puzzles me is the demo_mn_embedded always printf "Kernel stack has gone,exiting..." because the ctrlk_process() function in daemon.c running on the CPU1 always Enter the dead cycle,so the ctrlk_updateHeartbeat() function does not run.
++++++++++++++++++++++++++++++++++
drivers/xilinx-zynqarm/drv_daemon/daemon.c
.....
static void backgroundProcess(void)
{
BOOL fExit = FALSE;
}
++++++++++++++++++++++++++++++++
can anybody tell me what does it happend?
thanks very much!!!
screen shoting
in the topic (https://sourceforge.net/p/openpowerlink/discussion/newbie/thread/43ae9c65/) posted by Hassen G - 2017-12-04,
Powerlink-team Kalycito said:
++++++++++++++++++++++++++++++++++++++++++++++
Powerlink-team Kalycito - 2018-05-30
Hi Hassen,
For your first question:
Regarding memory segment, common memory is used for exchanging control and information. Shared memory is used for bulk data exchange.
For your second question:
openPOWERLINK daemon application is running on Microblaze and it gets the value of PDO from shared memory location which is mapped into the user space to provide direct access to the user stack. (Source file location: stack/src/user/pdo/pdou.c)
For your third question:
After receiving a frame, openMAC sends an interrupt to Microblaze and there is no dependency on what POWERLINK frame it receives.
Thanks,
Powerlink-Team-Kalycito
+++++++++++++++++++++++++++++++++++++++++++++++
is the shared memory must be located in daemon application(microblaze or ARM-CPU1) instead of demo_mn_embedded?
thanks very.
Last edit: liu zhi qiang 2018-07-10
Hi Liu zhi qiang,
The shared memory must be located in the microblaze side.
Thanks,
Powerlink-Team-Kalycito
Last edit: Powerlink-team Kalycito 2018-07-10
to :Powerlink-team Kalycito
during powerlink MN running,a issue occurs:"assertion "pInstance_p != ((void*)0)" failed : file "stack/src/common/circbuf/circbuffer.c", line 607,function circbuf_getDataCount()",
What is the reason for this issue?
=========================
my Macro defines that related to dualprocshm are :
/#define COMMON__MEM_BASE 0x2c000000
/#define SHARED_MEM_SPAN 0x10000000
/#define SHARED_MEM_BASE 0x30000000
thanks
liu zhi qiang
Last edit: liu zhi qiang 2018-07-10
Hi Liu zhi qiang,
The circbuffer.c file provides an implementation of circular buffer library. The circular buffer library is designed in such a way that different instances(threads, processes, etc.) can concurrently access the circular buffer. So, a shared memory which is accessible by all instances and a lock mechanism to lock the critical sections is required.
We understand that you have modified the SHARED_MEM_SPAN and SHARED_MEM_BASE value other than default values available in the stack. The SHARED_MEM_SPAN value of 0x10000000 that you have used is already allocated as ARM memory. The issue you face may be because the pointers are trying to access a address which is not allocated to it.
Kindly assign proper memory base values and see if the issue is fixed.
Thanks,
Powerlink-Team-Kalycito