riscv-software-src / riscv-software-src/opensbi

riscv_encoding.h: redefinition issue

Open
#243 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
1.5k
Forks
712
PR merge metrics
No merged PRs in 30d

Description

During integration with Apache NuttX RTOS we faced an issue that many warning about redefinition of values from riscv_encoding.h. The definitions with the same name are present in RTOS arch header files so both can't be included in a single compilation unit.
Maybe it is a good idea to add SBI_ or OPENSBI_ prefix to defines in riscv_encoding.h? Or any other proposals this can be solved?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing riscv_encoding.h and the RISC-V architecture headers in Apache NuttX that define the same names. Determine a naming or inclusion approach that avoids redefinition when both headers are included, then verify that an integration compilation unit no longer emits redefinition warnings.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.