Skip to content

Commit

Permalink
WIP:riscv64-qemu target
Browse files Browse the repository at this point in the history
tinygo/src/examples/test$ tinygo build -target riscv64-qemu -monitor .
Call parameter type does not match function signature!
i8 8
 i32  %0 = call %runtime.hashmap* @runtime.hashmapMake(i8 8, i8 4, i32 1, i8 1, i8* undef), !dbg !31
Call parameter type does not match function signature!
i8 8
 i32  %6 = call %runtime.hashmap* @runtime.hashmapMake(i8 8, i8 4, i32 2, i8 1, i8* undef), !dbg !99
Call parameter type does not match function signature!
i8 8
 i32  %28 = call %runtime.hashmap* @runtime.hashmapMake(i8 8, i8 0, i32 8, i8 2, i8* undef), !dbg !1600
error: verification error after compiling package github.com/tinygo-org/tinygo/src/examples/test

Signed-off-by: Ronald G. Minnich <[email protected]>
  • Loading branch information
rminnichcodeu committed Mar 13, 2023
1 parent 0d56dee commit dc5cc78
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
8 changes: 8 additions & 0 deletions targets/riscv64-qemu.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"inherits": ["riscv32"],
"features": "+a,+c,+m,-relax,-save-restore",
"build-tags": ["virt", "qemu"],
"default-stack-size": 4096,
"linkerscript": "targets/riscv-qemu.ld",
"emulator": "qemu-system-riscv32 -machine virt -nographic -bios none -kernel {}"
}
16 changes: 16 additions & 0 deletions targets/riscv64-qemu.ld
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

/* Memory map:
* https://github.com/qemu/qemu/blob/master/hw/riscv/virt.c
* RAM and flash are set to 1MB each. That should be enough for the foreseeable
* future. QEMU does not seem to limit the flash/RAM size and in fact doesn't
* seem to differentiate between it.
*/
MEMORY
{
FLASH_TEXT (rw) : ORIGIN = 0x80000000, LENGTH = 0x100000
RAM (xrw) : ORIGIN = 0x80100000, LENGTH = 0x100000
}

_stack_size = 2K;

INCLUDE "targets/riscv.ld"

0 comments on commit dc5cc78

Please sign in to comment.