Add a test for the unicode package
This massively increases .data size, possibly because loads of unused globals are included. I'll need to investigate what's going on here. For now, increase the RAM size for nrf chips (the nrf52 has 64kB of RAM).
Этот коммит содержится в:
родитель
36a5af9e6d
коммит
f9f92de1c3
2 изменённых файлов: 6 добавлений и 1 удалений
2
arm.ld
2
arm.ld
|
@ -2,7 +2,7 @@
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
FLASH_TEXT (rw) : ORIGIN = 0x00000000, LENGTH = 256K /* .text */
|
FLASH_TEXT (rw) : ORIGIN = 0x00000000, LENGTH = 256K /* .text */
|
||||||
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 16K
|
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 64K
|
||||||
}
|
}
|
||||||
|
|
||||||
_stack_size = 2K;
|
_stack_size = 2K;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
import "unicode"
|
||||||
|
|
||||||
type Thing struct {
|
type Thing struct {
|
||||||
name string
|
name string
|
||||||
}
|
}
|
||||||
|
@ -46,6 +48,9 @@ func main() {
|
||||||
println("Stringer.String():", s.String())
|
println("Stringer.String():", s.String())
|
||||||
|
|
||||||
runFunc(hello, 5) // must be indirect to avoid obvious inlining
|
runFunc(hello, 5) // must be indirect to avoid obvious inlining
|
||||||
|
|
||||||
|
// test library functions
|
||||||
|
println("lower to upper char:", 'h', "->", unicode.ToUpper('h'))
|
||||||
}
|
}
|
||||||
|
|
||||||
func runFunc(f func(int), arg int) {
|
func runFunc(f func(int), arg int) {
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче