This repository was archived by the owner on Apr 16, 2021. It is now read-only.
This repository was archived by the owner on Apr 16, 2021. It is now read-only.
Missing implementations of ltoa, ultoa #6
Closed
Description
Using:
- ArduinoCore-nRF528x-mbedos @ 7c86454
- ArduinoCore-API @ arduino/ArduinoCore-API@862fb23
As stated in ArduinoCore-API's itoa.h:
https://github.com/arduino/ArduinoCore-API/blob/namespace_arduino/api/itoa.h#L21-L23
// Standard C functions required in Arduino API
// If these functions are not provided by the standard library, the
// core should supply an implementation of them.
but this core does not provide implementations of ltoa
and ultoa
:
#include <api/itoa.h>
void setup() {
char foo[3];
ltoa(42, foo, 10);
ultoa(42, foo, 10);
}
void loop() {}
C:\Users\per\AppData\Local\Temp\arduino_modified_sketch_625769/MissingConversions.ino:4: undefined reference to `ltoa'
C:\Users\per\AppData\Local\Temp\arduino_modified_sketch_625769/MissingConversions.ino:5: undefined reference to `ultoa'
This breaks the long
and unsigned long
overloads of the String
class's constructor and concat
:
void setup() {
String bar1 = String((long)42);
String bar2 = String((unsigned long)42);
String foobar = "asdf";
foobar.concat((long)42);
foobar.concat((unsigned long)42);
}
void loop() {}
C:\Users\per\AppData\Local\Temp\arduino_build_659526/..\arduino_cache_182898\core\core_arduino_mbed_nano33ble_d56c57e38ae8cd7b62a9772ac9829484.a(String.cpp.o): In function `arduino::String::String(long, unsigned char)':
C:\Users\per\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.1.1\cores\arduino\api/String.cpp:100: undefined reference to `ltoa'
C:\Users\per\AppData\Local\Temp\arduino_build_659526/..\arduino_cache_182898\core\core_arduino_mbed_nano33ble_d56c57e38ae8cd7b62a9772ac9829484.a(String.cpp.o): In function `arduino::String::String(unsigned long, unsigned char)':
C:\Users\per\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.1.1\cores\arduino\api/String.cpp:108: undefined reference to `ultoa'
C:\Users\per\AppData\Local\Temp\arduino_build_659526/..\arduino_cache_182898\core\core_arduino_mbed_nano33ble_d56c57e38ae8cd7b62a9772ac9829484.a(String.cpp.o): In function `arduino::String::concat(long)':
C:\Users\per\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.1.1\cores\arduino\api/String.cpp:316: undefined reference to `ltoa'
C:\Users\per\AppData\Local\Temp\arduino_build_659526/..\arduino_cache_182898\core\core_arduino_mbed_nano33ble_d56c57e38ae8cd7b62a9772ac9829484.a(String.cpp.o): In function `arduino::String::concat(unsigned long)':
C:\Users\per\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.1.1\cores\arduino\api/String.cpp:323: undefined reference to `ultoa'
Metadata
Metadata
Assignees
Labels
No labels