In the RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio demo example, main.c uses the following PLIC addresses (lines 67 and 68).
#define mainPLIC_PENDING_0 ( * ( ( volatile uint32_t * ) 0x0C001000UL ) )
#define mainPLIC_PENDING_1 ( * ( ( volatile uint32_t * ) 0x0C001004UL ) )
In lines 145 and 146, there is a write access.
/* Clear all pending interrupts. */
mainPLIC_PENDING_0 = 0UL;
mainPLIC_PENDING_1 = 0UL;
However, the addresses are read only, see page 45 in SiFive FE310-G002 Manual v19p04, and should be used different.
I would appreciate if someone could take a look.
Cheers,
Matt