Skip to content

Printf causes random hard faults #1266

@timboldt

Description

@timboldt

I discovered that trying to print floating point numbers results in random hard faults, on a Feather M0.

For example, this was problematic:

tinyfont.WriteLine(&display, &proggy.TinySZ8pt7b, 0, 6, []byte(
fmt.Sprintf("%.1f'C %.2f V",
temperature,
batteryVoltage)),
color.RGBA{255, 255, 255, 255})

Context:
https://github.com/timboldt/epaper-display/blob/e5169a18099b5f1563cbaab0452d9a360fa76351/main.go
TinyGo version: tinygo version 0.13.1 linux/amd64 (using go version go1.14.3 and LLVM version 10.0.1)
Hardware: Adafruit Feather M0 Express

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions