Skip to content

SAM D5x based boards crash when using floating point operations #944

@wdevore

Description

@wdevore

When I upload the code to the feather-m4 it appears to crash. Double-resetting then shows the resultant blob on the device. I can restore the controller if I upload a known working program, for example, blinky. I have narrowed the code down to this:

package main

import (
	"fmt"
	"time"
)

func main() {
	i := 0.0
	for {
		s := fmt.Sprintf("%f", i) // "i" causes it to fail.
		println("flt: ", s)  <--- this causes the failure. remove this and it works.
		i += 1.0
		time.Sleep(time.Millisecond * 100)
	}
}

I was trying to do a simple ADC example and I can get it to work as long as I don't try to print floats but instead print int64s or something.
I don't have a JTAG setup so I can't see whats going on.

Any thoughts?

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