Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boards/risc-v/k210: Fix arch flag since NuttX don't support FPU #2590

Closed
wants to merge 1 commit into from

Conversation

no1wudi
Copy link
Contributor

@no1wudi no1wudi commented Dec 23, 2020

Summary

NuttX don't support FPU for risc-v now, let's fix the arch flag to avoid compiler generate hardware float instruction, it would cause fault (e.g. libdsp & dsptest)

Impact

None

Testing

Tested on maix-bit:nsh \ maix-bit:smp with float operation

…isc-v now

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
@no1wudi
Copy link
Contributor Author

no1wudi commented Dec 23, 2020

CI failure: actions/upload-artifact#116

@btashton
Copy link
Contributor

@no1wudi :( Looks like GitHub actually made a fix recently in the base library so hopefully this will go away, but in the mean time I opened this #2592 to at least make it not fail the build.

I will also restart the run here.

@xiaoxiang781216
Copy link
Contributor

Should we support fpu instead?

@no1wudi
Copy link
Contributor Author

no1wudi commented Dec 23, 2020

Should we support fpu instead?

I think FPU support is another topic, because current rv32/rv64 arch support have many duplicated code, maybe we should cleanup the code base to let them share common code like zephyr first?

@xiaoxiang781216
Copy link
Contributor

Yes, 32bit and 64bit share the same specification and the designer intentionally support both arch by one code base. The design philosophy is totally different from arm and arm64, so rv32im and rv64gc should merge into one to reduce the maintain cost.

@xiaoxiang781216
Copy link
Contributor

Create an issue(#2593) to track the problem.

@no1wudi no1wudi closed this Dec 31, 2020
@xiaoxiang781216
Copy link
Contributor

We already have the code to save and restore fpu registers for rv32im:
https://github.com/apache/incubator-nuttx/blob/master/arch/risc-v/src/rv32im/riscv_fpu.S
Since the register definition is same(except the register width), it should be easy to enhance 32bit version to support 64bit(part of #2822).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants