RISC-V Microcontrollers DISCUSSION

RISC-V firmware links successfully but traps: could march and mabi be mismatched?

Started by mowafaq RISC-VGCC marchABI compatibilityillegal instructionembedded toolchain
3 replies 248 views 4 participants
Latest activity · 27 Sep 2026

RISC-V firmware links successfully but traps: could march and mabi be mismatched?

mowafaq RISC-V Microcontrollers Forum
#1

Community replies 3

Re: RISC-V firmware links successfully but traps: could march and mabi be mismatched?

#2

Compare the exact core's supported ISA extensions with the compiler's -march setting. An instruction accepted by the assembler is not necessarily implemented by the target. Record the trap cause and failing instruction address, then disassemble that location using the same build's ELF file.

Re: RISC-V firmware links successfully but traps: could march and mabi be mismatched?

#3

Check -mabi separately because it controls the calling convention, including how floating-point arguments are passed. Objects and libraries must use compatible conventions. A hard-float library and a soft-float application are not made compatible merely by enabling floating-point instructions in one source file.

Re: RISC-V firmware links successfully but traps: could march and mabi be mismatched?

#4

Build a minimal call that reproduces the fault and inspect startup code, stack alignment and library selection. Keep the toolchain version and complete options with the artifact. Avoid choosing extensions because a different RISC-V board used them successfully.

TEP COMMUNITY