SERIAL_BUFFER_SIZE error / SERIAL_BUFFER_SIZE-Fehler

roontoon

Member
Ich habe ein Problem beim Kompilieren von SunRay. Ich erhielt einen Fehler bei der Größe des seriellen Puffers und bei der Fehlerbehebung habe ich beschlossen, eine brandneue Kopie von Sunray zu besorgen, um zu sehen, ob ich sie einfach kompilieren kann, ohne die Firmware auf meinen M4 zu flashen. Der Compiler gibt den Fehler aus:

In der Datei /Users/roontoon/Documents/GitHubLocalRepository/Sunray/sunray/buzzer.cpp:8:
/Users/roontoon/Documents/GitHubLocalRepository/Sunray/sunray/config.h:495: Warnung: "SERIAL_BUFFER_SIZE" neu definiert
495 | #define SERIAL_BUFFER_SIZE 1024

Ich habe die Anweisung #define SERIAL_BUFFER_SIZE 1024 auskommentiert und sie wird immer noch nicht kompiliert und ich bin mir nicht sicher, was die Anweisungen in der Konfigurationsdatei von mir erwarten.

// Folgendes wird von der Arduino-Bibliothek RingBuffer.h verwendet - um diese Arduino-Bibliotheksdatei zu überprüfen:
// 1. Arduino IDE->Datei->Preferences->Klicken Sie unten auf 'preferences.txt'
// 2. Suchen Sie die Datei 'packages/arduino/hardware/sam/xxxxx/cores/arduino/RingBuffer.h

#define SERIAL_BUFFER_SIZE 1024

Danke für jede Hilfe von den erfahreneren.
Dan


I am having an issue compiling SunRay. I was getting a Serial Buffer size error and in the process of troubleshooting the issue, I decided to get a brand new copy of Sunray to see if I could just compile it without flashing the firmware to my M4. The compiler throws the error:

In file included from /Users/roontoon/Documents/GitHubLocalRepository/Sunray/sunray/buzzer.cpp:8:
/Users/roontoon/Documents/GitHubLocalRepository/Sunray/sunray/config.h:495: warning: "SERIAL_BUFFER_SIZE" redefined
495 | #define SERIAL_BUFFER_SIZE 1024

I have commented out the #define SERIAL_BUFFER_SIZE 1024 statement and it still will not compile and I am not sure what the instructions in the config file want me to do.

// the following will be used by Arduino library RingBuffer.h - to verify this Arduino library file:
// 1. Arduino IDE->File->Preferences->Click on 'preferences.txt' at the bottom
// 2. Locate file 'packages/arduino/hardware/sam/xxxxx/cores/arduino/RingBuffer.h

#define SERIAL_BUFFER_SIZE 1024

Thanks for any help from the more experienced.

Dan
 
Guten Morgen @roontoon,
ich bin zwar kein Erfahrener, hoffe aber, dass Dir die Antwort trotzdem weiter hilft.
Das Video ArduMower Tutorials Programmierung bei YouTube erklärt ab 19:18 was es mit der Serial Buffer Size auf sich hat und wie vorzugehen ist.
Für mich war und ist die Arduino IDE noch Neuland. Ich konnte aber anhand des Tutorials diese erfolgreich einrichten und die aktuelle Sunray kompilieren. Ich habe die in dem Tutorial empfohlen Bibliotheksversionen installiert.

Gruß Sven
 
Probiere doch mal folgende Version:

Die neuste FW kann ich bei mir kompilieren, geht also grundsätzlich.
Den Serial Buffer Size würde ich trotz allem direkt in der packages\adafruit\hardware\samd\xxxxx\cores\arduino\RingBuffer.h festlegen, unabhängig davon was in der config.h steht.
 
Thanks for the reply @kermi and @Svolo. @Svolo unfortunately my German skills are limited to Mr. Google. Is there another document in English that will explain what to do with this error?

Thanks for the answer @kermi and @Svolo. @Svolo unfortunately my knowledge of German is limited to Mr. Google. Is there another document in English that explains what to do with this error?
 
Hello @roontoon,
sorry, but because of the good german translation i thought, that you are very familiar with the german language.

As far as I know, there is no English version of the tutorial and there is currently no English-language documentation available of the installation steps that are described in the tutorial.
It is recommended to increase the serial ring buffer size to 1024 in the settings for the board used to avoid checksum errors in the GPS communication.

What @kermi wanted to say was:

- click in the Arduino IDE under file on preferences.
- in the window that opens, click on the link for the "preferences.txt". The packages folder of the Arduino IDE will open.
- click on packages\adafruit\hardware\samd\xxxxx\cores\arduino\RingBuffer.h (xxxxx is a spaceholder for the version number)
- search for #define SERIAL_BUFFER_SIZE in the RingBuffer.h and change the value to 1024 and safe the file.

Try to compile again.

Best regards
Sven
 
Hello Sven,

the path for me for the ringbuffer.h looks like this: C: \ Users \ Stephan \ AppData \ Local \ Arduino15 \ packages \ adafruit \ hardware \ samd \ 1.6.7 \ cores \ arduino \ ringbuffer.h

I set the following value to 2048:
#ifndef SERIAL_BUFFER_SIZE
#define SERIAL_BUFFER_SIZE 2048
#endif
 
Hallo @kermi,
ich hatte mich auf den Dateipfad, den Du in der Antwort an roontoon genannt hattest, beziehen wollen und den Weg dahin erklärt, wie es in dem Tutorial auf deutsch beschrieben wird. Einfacher ist wahrscheinlich deine Variante über das User Verzeichnis zu der Datei zu gelangen.

Hast Du mit 2048 bessere Erfahrungen gemacht, bzw. hattest Du mit 1024 GPS checksum Fehler?

Gruß
Sven
 
no, with 1024 I had no checksum errors. I only have 2048 because the M4 has enough RAM, I don't know if it's better now.

greeting
Stephan
 
Oben