How to align interrupt vector base address in FE310?

FE310 manual says that the interrupt vector base address in mtvec requires be 64 byte alignment.
Does this mean my trap routine need a .align 64 prior the code in assembly?

Yes. Except that’s .align 6 as 2^6 = 64

.align is ambiguous for historical reasons, different vendors gave it different meanings. You can avoid the ambiguity by using .balign (byte align) or .p2align (power of 2 align) instead.

1 Like