aboutsummaryrefslogtreecommitdiffhomepage
path: root/targets/esp8266.json
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2021-02-10 23:48:18 +0100
committerRon Evans <[email protected]>2021-02-11 10:50:29 +0100
commitd3d4acaadf6c5414f4434dde2594605d3261b332 (patch)
tree7b8f3708c1037aca29fa4ec8477f4dc8a0baaccd /targets/esp8266.json
parent676a78776afcf42ca7c694a8b36ee9b7129fc204 (diff)
downloadtinygo-d3d4acaadf6c5414f4434dde2594605d3261b332.tar.gz
tinygo-d3d4acaadf6c5414f4434dde2594605d3261b332.zip
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'
Diffstat (limited to 'targets/esp8266.json')
-rw-r--r--targets/esp8266.json1
1 files changed, 1 insertions, 0 deletions
diff --git a/targets/esp8266.json b/targets/esp8266.json
index 593d0769e..e1304d245 100644
--- a/targets/esp8266.json
+++ b/targets/esp8266.json
@@ -9,6 +9,7 @@
"-mcpu=esp8266"
],
"rtlib": "compiler-rt",
+ "libc": "picolibc",
"linkerscript": "targets/esp8266.ld",
"extra-files": [
"src/device/esp/esp8266.S",