# Uploading issues w/ compilation

**URL:** https://forums.maslowcnc.com/t/uploading-issues-w-compilation/17976
**Category:** Troubleshooting
**Created:** [April 29, 2022, 3:17pm UTC](https://forums.maslowcnc.com/t/uploading-issues-w-compilation/17976 "2022-04-29T15:17:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Weirdrobotsounds](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/weirdrobotsounds/32/21355_2.png) [@Weirdrobotsounds](https://forums.maslowcnc.com/u/Weirdrobotsounds)
#### Post date: [April 29, 2022, 3:17pm UTC](https://forums.maslowcnc.com/t/uploading-issues-w-compilation/17976/1 "2022-04-29T15:17:38Z")

</div>

Hi I’m super new to this and I’m just trying to get the board up and running but keep running into a brick wall. When I try to upload I keep getting the below message. Any direction or help would be great!

C:\Users\zkuhl\AppData\Local\Temp\ccinNTr4.ltrans0.ltrans.o: In function `read': C:\Users\zkuhl\OneDrive\Desktop\Firmware-1.26\cnc_ctrl_v1/SimavrSerial.cpp:26: undefined reference to `Serial’  
C:\Users\zkuhl\OneDrive\Desktop\Firmware-1.26\cnc\_ctrl\_v1/SimavrSerial.cpp:26: undefined reference to `Serial' C:\Users\zkuhl\OneDrive\Desktop\Firmware-1.26\cnc_ctrl_v1/SimavrSerial.cpp:26: undefined reference to `HardwareSerial::read()’  
C:\Users\zkuhl\AppData\Local\Temp\ccinNTr4.ltrans0.ltrans.o: In function `available': C:\Users\zkuhl\OneDrive\Desktop\Firmware-1.26\cnc_ctrl_v1/SimavrSerial.cpp:22: undefined reference to `Serial’  
C:\Users\zkuhl\OneDrive\Desktop\Firmware-1.26\cnc\_ctrl\_v1/SimavrSerial.cpp:22: undefined reference to `Serial' C:\Users\zkuhl\OneDrive\Desktop\Firmware-1.26\cnc_ctrl_v1/SimavrSerial.cpp:22: undefined reference to `HardwareSerial::available()’  
C:\Users\zkuhl\AppData\Local\Temp\ccinNTr4.ltrans0.ltrans.o: In function `write': C:\Users\zkuhl\OneDrive\Desktop\Firmware-1.26\cnc_ctrl_v1/SimavrSerial.cpp:11: undefined reference to `Serial’  
C:\Users\zkuhl\OneDrive\Desktop\Firmware-1.26\cnc\_ctrl\_v1/SimavrSerial.cpp:11: undefined reference to `Serial' C:\Users\zkuhl\OneDrive\Desktop\Firmware-1.26\cnc_ctrl_v1/SimavrSerial.cpp:11: undefined reference to `HardwareSerial::write(unsigned char)’  
C:\Users\zkuhl\OneDrive\Desktop\Firmware-1.26\cnc\_ctrl\_v1/SimavrSerial.cpp:12: undefined reference to `Serial' C:\Users\zkuhl\OneDrive\Desktop\Firmware-1.26\cnc_ctrl_v1/SimavrSerial.cpp:12: undefined reference to `Serial’  
C:\Users\zkuhl\OneDrive\Desktop\Firmware-1.26\cnc\_ctrl\_v1/SimavrSerial.cpp:12: undefined reference to `HardwareSerial::flush()' C:\Users\zkuhl\AppData\Local\Temp\ccinNTr4.ltrans0.ltrans.o: In function `global constructors keyed to 65535\_0\_Axis.cpp.o.5002’:  
C:\Users\zkuhl\OneDrive\Desktop\Firmware-1.26\cnc\_ctrl\_v1/Axis.h:21: undefined reference to `String::String(char const*)' C:\Users\zkuhl\OneDrive\Desktop\Firmware-1.26\cnc_ctrl_v1/Axis.h:21: undefined reference to `String::String(char const\*)’  
C:\Users\zkuhl\AppData\Local\Temp\ccinNTr4.ltrans0.ltrans.o: In function `__static_initialization_and_destruction_0': C:\Users\zkuhl\OneDrive\Desktop\Firmware-1.26\cnc_ctrl_v1/GCode.cpp:25: undefined reference to `String::~String()’  
C:\Users\zkuhl\OneDrive\Desktop\Firmware-1.26\cnc\_ctrl\_v1/GCode.cpp:24: undefined reference to `String::~String()' c:/users/zkuhl/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/../lib/gcc/avr/7.3.0/../../../../avr/lib/avr6/crtatmega2560.o:(.init9+0x0): undefined reference to `main’  
collect2.exe: error: ld returned 1 exit status

Compilation error: exit status 1

---

<div class="post-metadata">

### Author: ![Orob](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/orob/32/16344_2.png) [@Orob](https://forums.maslowcnc.com/u/Orob)
#### Post date: [April 29, 2022, 4:36pm UTC](https://forums.maslowcnc.com/t/uploading-issues-w-compilation/17976/2 "2022-04-29T16:36:44Z")

</div>

Looks like you are using windows and you are compiling code for the arduino Mega 2560 controller.

Is this error within the arduino IDE or are you trying to use platformIO in vscode?

If arduino IDE, often the dependency error occurs when the firmware .ino file is opened from within a zip file. If you extracted the zip file and are still having this error, then it may be that you have selected the wrong compile target or have not selected one and it is defaulting to the uno. Do you have arduino mega 2560 selected as the device to compile to? There is a guide in the wiki area that walks through step by step how to do most of this [here](https://forums.maslowcnc.com/t/arduino-ide-basics/15018/).

If you are using an M2 controller, this firmware version won’t work.

---

<div class="post-metadata">

### Author: ![dlang](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/dlang/32/859_2.png) [@dlang](https://forums.maslowcnc.com/u/dlang)
#### Post date: [April 29, 2022, 4:39pm UTC](https://forums.maslowcnc.com/t/uploading-issues-w-compilation/17976/3 "2022-04-29T16:39:09Z")

</div>

sounds as if you don’t have the proper comm port defined to communicate with the  
maslow.

David Lang
