I am attempting to use Arjen Sten's "Arduino String Class alternative (against memory-fragmentation)" in an effort to reduce memory loss in my UNO WiFi Rev2.
Link: Arduino String Class alternative (against memory-fragmentation) - Arjen Stens
Unfortunately there is an architecture related compile error generated by the compiler. Is there a workaround for this issue?
include <StackString.hpp>
#using namespace Stack;
void setup()
{
Serial.begin(9600);
char myString[8] = {'A', 'r', 'd', 'u', 'i', 'n', 'o', '\0'};
char myNewString[32];
String temporaryString = String(myString); // Create String from char[]
temporaryString.concat(" is awesome."); // Add some text
temporaryString.toCharArray(myNewString, 32); // Store all text in myNewString
Serial.println(myNewString); // "Arduino is awesome."
}
WARNING: library StackString claims to run on avr architecture(s) and may be incompatible with your current board which runs on megaavr architecture(s).
/tmp/ccJicsIc.ltrans0.ltrans.o: In function `main':
/home/ed/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/main.cpp:46: undefined reference to `loop'
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino Uno WiFi Rev2.