Open f-zl opened 2 weeks ago
@tnmysh : Do you have any idea what the issue might be?
@arnopo zynq7000 use and development is not active for long time. So, I am not sure. I think libmetla support will be deprecated on zynq7000 platform, so I am not sure if I will get chance to debug this.
I'm using ZYNQ 7000 and want to use spinlock to synchronize the two cores (baremetal). The problem is
metal_spinlock_acquire
loops forever.The code of core0's main.c:
metal_spinlock_acquire
compiles to this:In
metal_spinlock_acquire
,strexb
always fails, so it loops forever, even when core1 is halted by a debugger and never accesses the lock.I find this link that says ZYNQ 7000 doesn't support exclusive access of OCM. But the behavior is still the same if
SHARED_MEM_BASE_ADDR
is a DDR address. How to make spinlock work on ZYNQ 7000?P.S.:
Xil_SetTlbAttributes(SHARED_MEM_BASE_ADDR, 0x14de2)
is called in both cores' init function as in xapp1079, to mark the address as sharable-DUSE_AMP=1
is added in core1's bsp