pulp-platform / pulp-riscv-gnu-toolchain

Other
68 stars 50 forks source link

CSRW Instruction error during compilation using PULP-RISC-V toolchain #34

Open reinaldoasf opened 2 years ago

reinaldoasf commented 2 years ago

Hello! I'm having an issue when I try to compile an OS using the PULP-RISC-V toolchain. During the process, I've reached this Error: Instruction csrw requires absolute expression. The mentioned function is the following:

static inline void rv32gc_satp_write(rv32gc_word_t val) { asm volatile( "csrw satp, %0;" : : "r" (val) ); }