mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-15 08:23:41 +00:00
riscv: implement VirtIO target
This allows running RISC-V tests in CI using QEMU, which should help catch bugs.
This commit is contained in:
committed by
Ron Evans
parent
c4fd19be99
commit
980068543a
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"inherits": ["riscv"],
|
||||
"features": ["+a", "+c", "+m"],
|
||||
"build-tags": ["virt", "qemu"],
|
||||
"linkerscript": "targets/riscv-qemu.ld",
|
||||
"emulator": ["qemu-system-riscv32", "-machine", "virt", "-nographic", "-bios", "none", "-kernel"]
|
||||
}
|
||||
@@ -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"
|
||||
Reference in New Issue
Block a user