Skip to content
Commit b1242522 authored by Carlo Caione's avatar Carlo Caione Committed by Anas Nashif
Browse files

riscv: Use STRINGIFY for CSR helpers



We usually want to be able to access CSR using:

1. the explicit name of the register:
     csr_read(mstatus);

2. the numeric equivalent of the register:
     csr_read(0xB00);

3. the numeric equivalent of the register using some defines:
     #define REG 0xB00
     csr_read(REG)

Currently Zephyr only allows the first two cases, throwing an error when
trying to use the case 3.

Fix this and support all the cases by forcing the CSR helpers to use the
STRINGIFY() macro.

Signed-off-by: default avatarCarlo Caione <ccaione@baylibre.com>
parent b6dcdb17
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment