YosysHQ / picorv32

PicoRV32 - A Size-Optimized RISC-V CPU
ISC License
3.08k stars 748 forks source link

firmware: fix unaligned symbol problem #218

Closed retrhelo closed 6 months ago

retrhelo commented 2 years ago

This PR fixes the problem mentioned in Issue #210 .

The symbol irq_regs in firmware/start.S is possibly unaligned when compiled to support compressed instructions. However, irq_regs is further loaded into sp register and involved in memory access, which results in unaligned memory access problem.

This PR forces irq_regs to always be aligned with .balign 0x200, by doing this solves the problem.