Solved: StackString: is it compatible with UNO WiFi Rev2 architecture?

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() 
    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.

The error stopping the compiler is the lack of the loop function - every sketch is required to have the setup and loop functions.

The warning is caused by the library not specifically indicating that it is compatible with the megaavr architecture of the atmega4809 processor on the UNO WiFi Rev2 board - that may or may not be a problem.

EVERY sketch..... ALL of them.... gotta have a loop function.... sheesh I feel like my brain is mush right

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.