LicheeRV-Nano-Build icon indicating copy to clipboard operation
LicheeRV-Nano-Build copied to clipboard

Shared memory between FreeRTOS and Linux cores

Open ret7020 opened this issue 1 year ago • 0 comments

I want to share some memory region in RAM that can been accessed by both cores. I will use mailbox for memory access control, but for now, I just want to write some data in RAM region from Linux core and read this data from FreeRTOS core.

I use devmem tool to write data from Linux:

devmem 0x89500000 b 0x123

And such code to read register from FreeRTOS (this code runs in task and check value each second):

volatile uint32_t *reg_addr = (uint32_t *)(0x89500000);
uint32_t value = *reg_addr;
printf("Reg data: %x \r\n", value);

When I changing register value from Linux it doesn't changes in FreeRTOS. But it I reboot board, FreeRTOS will print LAST value of register from Linux. Why?

ret7020 avatar Mar 13 '25 21:03 ret7020