mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-03-26 00:28:15 -04:00
fw: Replace custom picorv32 instructions in qemu target
This commit is contained in:
parent
2cb5f2eca6
commit
d239b952b0
@ -204,6 +204,7 @@ simfirmware.elf: $(FIRMWARE_OBJS) $(P)/fw/tk1/firmware.lds
|
||||
$(CC) $(CFLAGS) $(FIRMWARE_OBJS) $(LDFLAGS) -o $@ > $(basename $@).map
|
||||
|
||||
qemu_firmware.elf: CFLAGS += -DQEMU_DEBUG
|
||||
qemu_firmware.elf: ASFLAGS += -DQEMU_DEBUG
|
||||
qemu_firmware.elf: firmware.elf
|
||||
mv firmware.elf qemu_firmware.elf
|
||||
|
||||
|
@ -4,8 +4,19 @@
|
||||
*/
|
||||
|
||||
#include <tkey/tk1_mem.h>
|
||||
|
||||
#ifdef QEMU_DEBUG
|
||||
|
||||
#define picorv32_retirq_insn(...) \
|
||||
mv ra, x3; \
|
||||
ret
|
||||
|
||||
#else
|
||||
|
||||
#include "picorv32/custom_ops.S" // PicoRV32 custom instructions
|
||||
|
||||
#endif
|
||||
|
||||
#define illegal_insn() .word 0
|
||||
|
||||
// Variables in bss
|
||||
|
@ -1,5 +1,13 @@
|
||||
#ifdef QEMU_DEBUG
|
||||
|
||||
#define picorv32_maskirq_insn(...)
|
||||
|
||||
#else
|
||||
|
||||
#include "../tk1/picorv32/custom_ops.S"
|
||||
|
||||
#endif
|
||||
|
||||
.section ".text"
|
||||
.globl syscall_enable
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user