mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-06 03:53:42 +00:00
esp: add picolibc
With this change, it is possible to fully use CGo on ESP32/ESP8266
chips. The following will work:
tinygo flash -target=d1mini -port=/dev/ttyUSB0 ./testdata/cgo/
tinygo flash -target=esp32-mini32 -port=/dev/ttyUSB0 ./testdata/cgo/
Previously it would produce output like the following:
/tmp/tinygo905539688/main.o:(.literal.runtime.run$1$gowrapper+0x150): undefined reference to `strcpy'
/tmp/tinygo905539688/main.o:(.literal.runtime.run$1$gowrapper+0x154): undefined reference to `strlen'
This commit is contained in:
committed by
Ron Evans
parent
676a78776a
commit
d3d4acaadf
@@ -9,6 +9,7 @@
|
||||
"-mcpu=esp32"
|
||||
],
|
||||
"rtlib": "compiler-rt",
|
||||
"libc": "picolibc",
|
||||
"linkerscript": "targets/esp32.ld",
|
||||
"extra-files": [
|
||||
"src/device/esp/esp32.S",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"-mcpu=esp8266"
|
||||
],
|
||||
"rtlib": "compiler-rt",
|
||||
"libc": "picolibc",
|
||||
"linkerscript": "targets/esp8266.ld",
|
||||
"extra-files": [
|
||||
"src/device/esp/esp8266.S",
|
||||
|
||||
Reference in New Issue
Block a user