Skip to content

"undefined reference to time.startTimer" at a switch case <-time.After, for Arduino #1510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
chadmiller opened this issue Nov 24, 2020 · 2 comments
Labels
avr AVR (Arduino Uno, etc.)

Comments

@chadmiller
Copy link

Use docker tinygo 0.15.0 to compile simple program

package main

import (
        "time"
)

func main() {
        select {
                case <-time.After(time.Millisecond): {}
        }
}
docker run -v   `pwd`:/go -e "GOPATH=/go" tinygo/tinygo:latest env --chdir=/go tinygo build \
    -o /go/bugdemo -target arduino -scheduler tasks --no-debug pathto/bug/main.go
/tmp/tinygo855212794/main.o: In function `command-line-arguments.main':
main.go:(.text.command-line-arguments.main+0x96): undefined reference to `time.startTimer'
collect2: error: ld returned 1 exit status
error: failed to link /tmp/tinygo855212794/main: exit status 1

I understand it's not implemented yet.

The other bug I'm reporting is that this kind of thing should be in the FAQ.

@aykevl
Copy link
Member

aykevl commented Dec 1, 2020

The other bug I'm reporting is that this kind of thing should be in the FAQ.

There are many things not yet implemented. It would be a massive amount to list them all, although this one is maybe frequent enough to warrant a FAQ entry.

However, see #1402 for some WIP code.

@deadprogram deadprogram added the avr AVR (Arduino Uno, etc.) label Jan 27, 2021
@niaow
Copy link
Member

niaow commented Nov 4, 2022

Fixed by #2954

@niaow niaow closed this as completed Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
avr AVR (Arduino Uno, etc.)
Projects
None yet
Development

No branches or pull requests

4 participants