-
Notifications
You must be signed in to change notification settings - Fork 929
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tinygo build -target riscv64-qemu -monitor . malloc(): corrupted top size error: failed to link /tmp/tinygo3535057034/main: signal: aborted rminnich@glenda:/usr/local/src/tinygo/src/examples/test$ Signed-off-by: Ronald G. Minnich <[email protected]>
- Loading branch information
1 parent
0d56dee
commit 7d0d7a1
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"inherits": ["riscv64"], | ||
"features": "+a,+c,+m,-relax,-save-restore", | ||
"build-tags": ["virt", "qemu"], | ||
"default-stack-size": 4096, | ||
"linkerscript": "targets/riscv64-qemu.ld", | ||
"emulator": "qemu-system-riscv32 -machine virt -nographic -bios none -kernel {}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |