mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-08 13:03:39 +00:00
all: add HiFive1 rev B board with RISC-V architecture
This page has been a big help in adding support for this new chip: https://wiki.osdev.org/HiFive-1_Bare_Bones
This commit is contained in:
committed by
Ron Evans
parent
f0eb4eef5a
commit
ffa38b183b
@@ -3,8 +3,6 @@
|
||||
package runtime
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
|
||||
"device/arm"
|
||||
)
|
||||
|
||||
@@ -13,29 +11,6 @@ const GOARCH = "arm"
|
||||
// The bitness of the CPU (e.g. 8, 32, 64).
|
||||
const TargetBits = 32
|
||||
|
||||
//go:extern _heap_start
|
||||
var heapStartSymbol unsafe.Pointer
|
||||
|
||||
//go:extern _heap_end
|
||||
var heapEndSymbol unsafe.Pointer
|
||||
|
||||
//go:extern _globals_start
|
||||
var globalsStartSymbol unsafe.Pointer
|
||||
|
||||
//go:extern _globals_end
|
||||
var globalsEndSymbol unsafe.Pointer
|
||||
|
||||
//go:extern _stack_top
|
||||
var stackTopSymbol unsafe.Pointer
|
||||
|
||||
var (
|
||||
heapStart = uintptr(unsafe.Pointer(&heapStartSymbol))
|
||||
heapEnd = uintptr(unsafe.Pointer(&heapEndSymbol))
|
||||
globalsStart = uintptr(unsafe.Pointer(&globalsStartSymbol))
|
||||
globalsEnd = uintptr(unsafe.Pointer(&globalsEndSymbol))
|
||||
stackTop = uintptr(unsafe.Pointer(&stackTopSymbol))
|
||||
)
|
||||
|
||||
// Align on word boundary.
|
||||
func align(ptr uintptr) uintptr {
|
||||
return (ptr + 3) &^ 3
|
||||
|
||||
Reference in New Issue
Block a user