Arduino Nano Every

Hello everyone! I’m having trouble uploading to my board. When I select the Nano Every-board I get these options in the Registers emulation box:

Atmega328 or “None (Atmega4809)”

On the board there is a component named Atmel MEGA 4809 so I guess I should use that one but when I do I get error:

Choosing the other option gets the same result.
I bought 3 of the same boards directly from the Arduino website and have tried two of them without any luck.

Does anyone have any ideas?

Hi, @dnl. What is your board? Exactly. Name, spec, etc.

Hey, @gabbapeople. Unsure if it is what you’re looking for but I took it from the tech specs on the Arduino website:

Datasheet links:

Microcontroller

USB

Can you copy here the full upload log. With the place where the c++ error is mentioned.

Full log after pressing upload with atmega4809 option:

Begin compiling code for the board Arduino Nano Every :package:

Using board ‘nona4809’ from platform in folder: C:\Users\zette\xod_packages_\packages\arduino\hardware\megaavr\1.8.6
Using core ‘arduino’ from platform in folder: C:\Users\zette\xod_packages_\packages\arduino\hardware\megaavr\1.8.6

Detecting libraries used…

“C:\Users\zette\xod\packages\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_NANO_EVERY -DARDUINO_ARCH_MEGAAVR -DMILLIS_USE_TIMERB3 -DNO_EXTERNAL_I2C_PULLUP “-IC:\Users\zette\xod\packages\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/deprecated” “-IC:\Users\zette\xod\packages\packages\arduino\hardware\megaavr\1.8.6\cores\arduino” “-IC:\Users\zette\xod\packages\packages\arduino\hardware\megaavr\1.8.6\variants\nona4809” “C:\Users\zette\AppData\Local\Temp\arduino-sketch-2C48414F1A19C0639C6A8B2AC396BE9B\sketch\xod_1592402051898_sketch.ino.cpp” -o nul

Alternatives for WS2812.h: [WS2812_NoBufffer]
ResolveLibrary(WS2812.h)
-> candidates: [WS2812_NoBufffer]

“C:\Users\zette\xod\packages\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_NANO_EVERY -DARDUINO_ARCH_MEGAAVR -DMILLIS_USE_TIMERB3 -DNO_EXTERNAL_I2C_PULLUP “-IC:\Users\zette\xod\packages\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/deprecated” “-IC:\Users\zette\xod\packages\packages\arduino\hardware\megaavr\1.8.6\cores\arduino” “-IC:\Users\zette\xod\packages\packages\arduino\hardware\megaavr\1.8.6\variants\nona4809” “-IC:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\libraries\WS2812_NoBufffer” “C:\Users\zette\AppData\Local\Temp\arduino-sketch-2C48414F1A19C0639C6A8B2AC396BE9B\sketch\xod_1592402051898_sketch.ino.cpp” -o nul

“C:\Users\zette\xod\packages\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_NANO_EVERY -DARDUINO_ARCH_MEGAAVR -DMILLIS_USE_TIMERB3 -DNO_EXTERNAL_I2C_PULLUP “-IC:\Users\zette\xod\packages\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/deprecated” “-IC:\Users\zette\xod\packages\packages\arduino\hardware\megaavr\1.8.6\cores\arduino” “-IC:\Users\zette\xod\packages\packages\arduino\hardware\megaavr\1.8.6\variants\nona4809” “-IC:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\libraries\WS2812_NoBufffer” “C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\libraries\WS2812_NoBufffer\esp8266.c” -o nul

Generating function prototypes…

“C:\Users\zette\xod\packages\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_NANO_EVERY -DARDUINO_ARCH_MEGAAVR -DMILLIS_USE_TIMERB3 -DNO_EXTERNAL_I2C_PULLUP “-IC:\Users\zette\xod\packages\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/deprecated” “-IC:\Users\zette\xod\packages\packages\arduino\hardware\megaavr\1.8.6\cores\arduino” “-IC:\Users\zette\xod\packages\packages\arduino\hardware\megaavr\1.8.6\variants\nona4809” “-IC:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\libraries\WS2812_NoBufffer” “C:\Users\zette\AppData\Local\Temp\arduino-sketch-2C48414F1A19C0639C6A8B2AC396BE9B\sketch\xod_1592402051898_sketch.ino.cpp” -o “C:\Users\zette\AppData\Local\Temp\arduino-sketch-2C48414F1A19C0639C6A8B2AC396BE9B\preproc\ctags_target_for_gcc_minus_e.cpp”

“C:\Users\zette\xod\packages\packages\builtin\tools\ctags\5.8-arduino11/ctags” -u --language-force=c++ -f - --c+±kinds=svpf --fields=KSTtzns --line-directives “C:\Users\zette\AppData\Local\Temp\arduino-sketch-2C48414F1A19C0639C6A8B2AC396BE9B\preproc\ctags_target_for_gcc_minus_e.cpp”

Compiling sketch…

“C:\Users\zette\xod\packages\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_NANO_EVERY -DARDUINO_ARCH_MEGAAVR -DMILLIS_USE_TIMERB3 -DNO_EXTERNAL_I2C_PULLUP “-IC:\Users\zette\xod\packages\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/deprecated” “-IC:\Users\zette\xod\packages\packages\arduino\hardware\megaavr\1.8.6\cores\arduino” “-IC:\Users\zette\xod\packages\packages\arduino\hardware\megaavr\1.8.6\variants\nona4809” “-IC:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\libraries\WS2812_NoBufffer” “C:\Users\zette\AppData\Local\Temp\arduino-sketch-2C48414F1A19C0639C6A8B2AC396BE9B\sketch\xod_1592402051898_sketch.ino.cpp” -o “C:\Users\zette\AppData\Local\Temp\arduino-sketch-2C48414F1A19C0639C6A8B2AC396BE9B\sketch\xod_1592402051898_sketch.ino.cpp.o”

C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino:491:13: error: reference to ‘HardwareSerial’ is ambiguous
virtual HardwareSerial* toHardwareSerial() {
^~~~~~~~~~~~~~
C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino:458:7: note: candidates are: class HardwareSerial
class HardwareSerial;
^~~~~~~~~~~~~~
In file included from C:\Users\zette\xod_packages_\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/ArduinoAPI.h:32:0,
from C:\Users\zette\xod_packages_\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Arduino.h:23,
from C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino:18:
C:\Users\zette\xod_packages_\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/HardwareSerial.h:87:7: note: class arduino::HardwareSerial
class HardwareSerial : public Stream
^~~~~~~~~~~~~~

C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino: In member function ‘arduino::Stream* xod::Uart::toStream()’:
C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino:508:34: error: ‘toHardwareSerial’ was not declared in this scope
Stream* stream = (Stream*) toHardwareSerial();
^~~~~~~~~~~~~~~~

C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino:508:34: note: suggested alternative: ‘HardwareSerial’
Stream* stream = (Stream*) toHardwareSerial();
^~~~~~~~~~~~~~~~
HardwareSerial
C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino: At global scope:
C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino:516:5: error: reference to ‘HardwareSerial’ is ambiguous
HardwareSerial* _serial;
^~~~~~~~~~~~~~
C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino:458:7: note: candidates are: class HardwareSerial
class HardwareSerial;
^~~~~~~~~~~~~~
In file included from C:\Users\zette\xod_packages_\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/ArduinoAPI.h:32:0,
from C:\Users\zette\xod_packages_\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Arduino.h:23,
from C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino:18:
C:\Users\zette\xod_packages_\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/HardwareSerial.h:87:7: note: class arduino::HardwareSerial
class HardwareSerial : public Stream
^~~~~~~~~~~~~~
C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino:519:32: error: expected ‘)’ before ‘&’ token
HardwareUart(HardwareSerial& hserial, uint32_t baud = 115200) : Uart(baud) {
^
C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino:542:5: error: reference to ‘HardwareSerial’ is ambiguous
HardwareSerial* toHardwareSerial() {
^~~~~~~~~~~~~~
C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino:458:7: note: candidates are: class HardwareSerial
class HardwareSerial;
^~~~~~~~~~~~~~
In file included from C:\Users\zette\xod_packages_\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/ArduinoAPI.h:32:0,
from C:\Users\zette\xod_packages_\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Arduino.h:23,
from C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino:18:
C:\Users\zette\xod_packages_\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/HardwareSerial.h:87:7: note: class arduino::HardwareSerial
class HardwareSerial : public Stream
^~~~~~~~~~~~~~

C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino: In member function ‘virtual bool xod::HardwareUart::available()’:
C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino:528:21: error: ‘_serial’ was not declared in this scope
return (bool) _serial->available();
^~~~~~~

C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino:528:21: note: suggested alternative: ‘Serial’
return (bool) _serial->available();
^~~~~~~
Serial
C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino: In member function ‘virtual bool xod::HardwareUart::writeByte(uint8_t)’:
C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino:532:21: error: ‘_serial’ was not declared in this scope
return (bool) _serial->write(byte);
^~~~~~~

C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino:532:21: note: suggested alternative: ‘Serial’
return (bool) _serial->write(byte);
^~~~~~~
Serial
C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino: In member function ‘virtual bool xod::HardwareUart::readByte(uint8_t*)’:
C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino:536:18: error: ‘_serial’ was not declared in this scope
int data = _serial->read();
^~~~~~~

C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino:536:18: note: suggested alternative: ‘Serial’
int data = _serial->read();
^~~~~~~
Serial
C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino: In member function ‘virtual void xod::HardwareUart::begin()’:
C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino:549:3: error: ‘_serial’ was not declared in this scope
_serial->begin(getBaudRate());
^~~~~~~

C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino:549:3: note: suggested alternative: ‘Serial’
_serial->begin(getBaudRate());
^~~~~~~
Serial
C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino: In member function ‘virtual void xod::HardwareUart::end()’:
C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino:553:3: error: ‘_serial’ was not declared in this scope
_serial->end();
^~~~~~~

C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino:553:3: note: suggested alternative: ‘Serial’
_serial->end();
^~~~~~~
Serial
C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino: In member function ‘virtual void xod::HardwareUart::flush()’:
C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino:556:3: error: ‘_serial’ was not declared in this scope
_serial->flush();
^~~~~~~

C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\xod_1592402051898_sketch\xod_1592402051898_sketch.ino:556:3: note: suggested alternative: ‘Serial’
_serial->flush();
^~~~~~~
Serial

Multiple libraries were found for “WS2812.h”
Used: C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\libraries\WS2812_NoBufffer

Using library WS2812_NoBufffer in folder: C:\Users\zette\AppData\Local\Temp\xod_temp_sketchbook020syg\libraries\WS2812_NoBufffer (legacy)

Error: exit status 1
Compilation failed.
Compilation failed
Command Process exited with code 1
The generated C++ code contains errors. It can be due to a bad node implementation or if your board is not compatible with XOD runtime code. The original compiler error message is above. Fix C++ errors to continue. If you believe it is a bug, report the problem to XOD developers.

@dnl smth is wrong with the UART node use.

virtual HardwareSerial* toHardwareSerial() {
^~~~~~~~~~~~~~
  • nano “classic”: Serial is “shared” between the USB and RX/TX pins, so Serial1 is not available (or share the same bus?).
  • new nano EVERY: Serial is the USB, Serial1 is RX and TX, both available independently and concurrently.

What is your patch? can you attach a screenshot?

I think by patch you mean this

@dnl,

There is a small bug during upload to Arduino Nano Every board (not Arduino Nano). We will fix it in the next XOD release.

For those who want to flash the Every board right now, there are two ways.

  1. Use the dev XOD build. Pre-adding the condition to the packages/xod-arduino/platform/uart.h file.
#ifdef ARDUINO_ARCH_MEGAAVR
class arduino::HardwareSerial;
#else
class HardwareSerial;
#endif
class SoftwareSerial;
  1. Flash the patch using the Arduino IDE. Compile the Arduino IDE code by clicking the Show code for Arduino IDE button in XOD. Then, find the line class HardwareSerial; in the code and replace it with class arduino:: HardwareSerial;

We apologize for this inconvenience.

Hi @gabbapeople,

the work on XOD you do is really fine! So you dont have to apologize for a bug like that!

I tried to solve your first solution, but can’t finde the right path. I found uart.h at that place:


I add the condition youre send but that doesn’t work and that only uart.h i could finde at this place.
I would appreciate it if you could guide me

Your second solution work fine, but I use the st7735 library & graphics and Arduino IDE can’t compile it.

The first solution works only for DEV assembly, Linux\MacOS.
For the second solution you can manually add files from XOD IDE\resources\workspace\__ardulib__\Graphics and C:\Program Files\XOD IDE\resources\workspace\__ardulib__\ST7735 to your Arduino IDE project folder.