drivers icon indicating copy to clipboard operation
drivers copied to clipboard

BMP180 Driver Error

Open rammanokar opened this issue 6 years ago • 1 comments

Getting below error when running bmp180 example code.

Program Code:

https://raw.githubusercontent.com/tinygo-org/drivers/release/examples/bmp180/main.go

Command Executed:

 tinygo build -o test.hex -target arduino bmp180.go

Tinygo Version: tinygo version 0.15.0 linux/amd64 (using go version go1.15.2 and LLVM version 10.0.1)

tinygo env

GOOS="linux"
GOARCH="amd64"
GOROOT="/home/***/sdk/go1.15.2"
GOPATH="/home/***/go:/home/ram/tinygo:"
GOCACHE="/home/***/.cache/tinygo"
CGO_ENABLED="1"
TINYGOROOT="/usr/local/lib/tinygo"

Error:

tinygo build -o test.hex -target arduino bmp180.go 
/tmp/tinygo299647481/main.o: In function `runtime.printfloat32':
bmp180.go:(.text.runtime.printfloat32+0x3a): undefined reference to `__extendsfdf2'
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: Dwarf Error: found dwarf version '0', this reader only handles version 2, 3 and 4 information.
bmp180.go:(.text.runtime.printfloat32+0x74): undefined reference to `__adddf3'
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: Dwarf Error: found address size '9', this reader can not handle sizes greater than '8'.
bmp180.go:(.text.runtime.printfloat32+0xc2): undefined reference to `__eqdf2'
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: Dwarf Error: found dwarf version '12', this reader only handles version 2, 3 and 4 information.
bmp180.go:(.text.runtime.printfloat32+0xec): undefined reference to `__unorddf2'
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: Dwarf Error: found dwarf version '0', this reader only handles version 2, 3 and 4 information.
bmp180.go:(.text.runtime.printfloat32+0x140): undefined reference to `__eqdf2'
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: Dwarf Error: found dwarf version '0', this reader only handles version 2, 3 and 4 information.
bmp180.go:(.text.runtime.printfloat32+0x16a): undefined reference to `__unorddf2'
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: Dwarf Error: found dwarf version '4866', this reader only handles version 2, 3 and 4 information.
bmp180.go:(.text.runtime.printfloat32+0x2aa): undefined reference to `__subdf3'
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: Dwarf Error: found dwarf version '13312', this reader only handles version 2, 3 and 4 information.
bmp180.go:(.text.runtime.printfloat32+0x2ca): undefined reference to `__divdf3'
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: Dwarf Error: found dwarf version '256', this reader only handles version 2, 3 and 4 information.
bmp180.go:(.text.runtime.printfloat32+0x2d6): undefined reference to `__gedf2'
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: Dwarf Error: found dwarf version '65535', this reader only handles version 2, 3 and 4 information.
bmp180.go:(.text.runtime.printfloat32+0x316): undefined reference to `__ltdf2'
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: Dwarf Error: found dwarf version '19', this reader only handles version 2, 3 and 4 information.
bmp180.go:(.text.runtime.printfloat32+0x330): undefined reference to `__divdf3'
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: Dwarf Error: found dwarf version '15619', this reader only handles version 2, 3 and 4 information.
bmp180.go:(.text.runtime.printfloat32+0x368): undefined reference to `__gedf2'
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: Dwarf Error: found dwarf version '0', this reader only handles version 2, 3 and 4 information.
bmp180.go:(.text.runtime.printfloat32+0x386): undefined reference to `__muldf3'
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: Dwarf Error: found dwarf version '0', this reader only handles version 2, 3 and 4 information.
bmp180.go:(.text.runtime.printfloat32+0x3c2): undefined reference to `__adddf3'
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: Dwarf Error: found dwarf version '0', this reader only handles version 2, 3 and 4 information.
bmp180.go:(.text.runtime.printfloat32+0x3dc): undefined reference to `__ltdf2'
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: Dwarf Error: found dwarf version '1537', this reader only handles version 2, 3 and 4 information.
bmp180.go:(.text.runtime.printfloat32+0x3fa): undefined reference to `__divdf3'
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: Dwarf Error: found dwarf version '0', this reader only handles version 2, 3 and 4 information.
bmp180.go:(.text.runtime.printfloat32+0x46e): undefined reference to `__fixdfsi'
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: Dwarf Error: found dwarf version '0', this reader only handles version 2, 3 and 4 information.
bmp180.go:(.text.runtime.printfloat32+0x484): undefined reference to `__floatsidf'
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: Dwarf Error: found dwarf version '1792', this reader only handles version 2, 3 and 4 information.
bmp180.go:(.text.runtime.printfloat32+0x49e): undefined reference to `__subdf3'
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: Dwarf Error: found dwarf version '0', this reader only handles version 2, 3 and 4 information.
bmp180.go:(.text.runtime.printfloat32+0x4b8): undefined reference to `__muldf3'
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: Dwarf Error: found dwarf version '19458', this reader only handles version 2, 3 and 4 information.
/tmp/tinygo299647481/main.o: In function `LBB19_3':
bmp180.go:(.text.command-line-arguments.main+0x53e): undefined reference to `__lshrsi3'
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: Dwarf Error: found dwarf version '13312', this reader only handles version 2, 3 and 4 information.
/tmp/tinygo299647481/main.o: In function `LBB19_38':
bmp180.go:(.text.command-line-arguments.main+0xce4): undefined reference to `__ashlsi3'
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: Dwarf Error: found dwarf version '256', this reader only handles version 2, 3 and 4 information.
/tmp/tinygo299647481/main.o: In function `LBB19_44':
bmp180.go:(.text.command-line-arguments.main+0xdc8): undefined reference to `__lshrsi3'
collect2: error: ld returned 1 exit status
error: failed to link /tmp/tinygo299647481/main: exit status 1

rammanokar avatar Sep 26 '20 09:09 rammanokar

This is a duplicate of https://github.com/tinygo-org/tinygo/issues/1415, so closing it. It is not a problem with the BMP180 driver but with AVR support in TinyGo.

aykevl avatar Sep 27 '20 12:09 aykevl