Skip to content
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

undefined reference to `analogReference' #6410

Closed
6 tasks done
tablatronix opened this issue Aug 10, 2019 · 1 comment · Fixed by #7809
Closed
6 tasks done

undefined reference to `analogReference' #6410

tablatronix opened this issue Aug 10, 2019 · 1 comment · Fixed by #7809

Comments

@tablatronix
Copy link
Contributor

tablatronix commented Aug 10, 2019

Basic Infos

  • This issue complies with the issue POLICY doc.
  • I have read the documentation at readthedocs and the issue is not addressed there.
  • I have tested that the issue is present in current master branch (aka latest git).
  • I have searched the issue tracker for a similar issue.
  • If there is a stack dump, I have decoded it.
  • I have filled out all fields below.

Platform

  • Hardware: [ESP-12|ESP-01|ESP-07|ESP8285 device|other]
  • Core Version: latest
  • Development Env: [Arduino IDE|Platformio|Make|other]
  • Operating System: [Windows|Ubuntu|MacOS]

Settings in IDE

  • Module: [Generic ESP8266 Module|Wemos D1 mini r2|Nodemcu|other]
  • Flash Mode: [qio|dio|other]
  • Flash Size: [4MB/1MB]
  • lwip Variant: [v1.4|v2 Lower Memory|Higher Bandwidth]
  • Reset Method: [ck|nodemcu]
  • Flash Frequency: [40Mhz]
  • CPU Frequency: [80Mhz|160MHz]
  • Upload Using: [OTA|SERIAL]
  • Upload Speed: [115200|other] (serial upload only)

Problem Description

undefined reference to 'analogReference' when compiling libs that use it.

[ Deviot 2.3.0.dev12 ] Starting...
Processing esp12e (platform: espressif8266; board: esp12e; framework: arduino)
--------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/esp12e.html
PLATFORM: Espressif 8266 2.2.2 > Espressif ESP8266 ESP-12E
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES: toolchain-xtensa 2.40802.190218 (4.8.2), tool-esptool 1.413.0 (4.13), tool-esptoolpy 1.20600.0 (2.6.0), framework-arduinoespressif8266 2.20502.0 (2.5.2)
Converting basicntc.ino
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 141 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <thermistor> 1.0.2
Compiling .pio/build/esp12e/src/basicntc.ino.cpp.o
Linking .pio/build/esp12e/firmware.elf
/Users/shawn/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: .pio/build/esp12e/lib23e/libthermistor_ID354.a(thermistor.cpp.o):(.text._ZN10THERMISTOR4readEv+0x34): undefined reference to `analogReference'
/Users/shawn/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: .pio/build/esp12e/lib23e/libthermistor_ID354.a(thermistor.cpp.o):(.text._ZN10THERMISTOR4readEv+0x6f): undefined reference to `analogReference'
collect2: error: ld returned 1 exit status
*** [.pio/build/esp12e/firmware.elf] Error 1
========================== [ERROR] Took 5.30 seconds ==========================

[Sat Aug 10 08:51:42 2019]

def exists in arduino.h

Looks like it was discussed but never implemented?
here #443

@tablatronix
Copy link
Contributor Author

This is probably not fixable as there is no reference and tout must be floating which makes this mostly impossible. But fix it to throw a compiler warning or assert to prevent libraries from failing to compile.

earlephilhower added a commit to earlephilhower/Arduino that referenced this issue Jan 5, 2021
Fixes esp8266#6410

We actually provide a function prototype for `analogReference()` in
`Arduino.h`, but no implementation.  Add a dummy one that only supports
DEFAULT (like other Arduino boards).
earlephilhower added a commit that referenced this issue Jan 8, 2021
Fixes #6410

We actually provide a function prototype for `analogReference()` in
`Arduino.h`, but no implementation.  Add a dummy one that only supports
DEFAULT (like other Arduino boards).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant